diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-10-30 20:22:56 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-11-06 12:05:32 +0100 |
commit | e05161edd26f00ee8d06403f6c4f946fa14464b5 (patch) | |
tree | fc760bc7d22159730a696a7098dde4881adeb8dc /vcl/qt5 | |
parent | c512af2bc6aea89b471c20927372c8769c8f866d (diff) |
QT5 unify Graphics constructors
Change-Id: I85ce73e0e79927fa9233230bc4a9134db4c513dc
Diffstat (limited to 'vcl/qt5')
-rw-r--r-- | vcl/qt5/Qt5Graphics.cxx | 15 | ||||
-rw-r--r-- | vcl/qt5/Qt5Graphics.hxx | 7 |
2 files changed, 9 insertions, 13 deletions
diff --git a/vcl/qt5/Qt5Graphics.cxx b/vcl/qt5/Qt5Graphics.cxx index 7c33c2781df4..e49c959879a8 100644 --- a/vcl/qt5/Qt5Graphics.cxx +++ b/vcl/qt5/Qt5Graphics.cxx @@ -26,19 +26,12 @@ #include <QtGui/QImage> -Qt5Graphics::Qt5Graphics( Qt5Frame *pFrame ) +Qt5Graphics::Qt5Graphics( Qt5Frame *pFrame, QImage *pQImage ) : m_pFrame( pFrame ) - , m_pQImage( nullptr ) - , m_pFontCollection( nullptr ) - , m_pFontData{ nullptr, } - , m_pTextStyle{ nullptr, } - , m_aTextColor( MAKE_SALCOLOR(0x00, 0x00, 0x00) ) -{ -} - -Qt5Graphics::Qt5Graphics( QImage *pQImage ) - : m_pFrame( nullptr ) , m_pQImage( pQImage ) + , m_aLineColor( MAKE_SALCOLOR(0x00, 0x00, 0x00) ) + , m_aFillColor( MAKE_SALCOLOR(0xFF, 0xFF, 0XFF) ) + , m_eCompositionMode( QPainter::CompositionMode_SourceOver ) , m_pFontCollection( nullptr ) , m_pFontData{ nullptr, } , m_pTextStyle{ nullptr, } diff --git a/vcl/qt5/Qt5Graphics.hxx b/vcl/qt5/Qt5Graphics.hxx index 30fcc2f7d5fe..6077f4122e12 100644 --- a/vcl/qt5/Qt5Graphics.hxx +++ b/vcl/qt5/Qt5Graphics.hxx @@ -52,11 +52,14 @@ class Qt5Graphics : public SalGraphics Qt5Font *m_pTextStyle[ MAX_FALLBACK ]; SalColor m_aTextColor; + Qt5Graphics( Qt5Frame *pFrame, QImage *pQImage ); void PreparePainter( QPainter &rPainter, sal_uInt8 nTransparency = 0xff ); public: - Qt5Graphics( Qt5Frame *pFrame ); - Qt5Graphics( QImage *pImage ); + Qt5Graphics( Qt5Frame *pFrame ) + : Qt5Graphics( pFrame, nullptr ) {} + Qt5Graphics( QImage *pQImage ) + : Qt5Graphics( nullptr, pQImage ) {} virtual ~Qt5Graphics() override; void ChangeQImage( QImage *pImage ); |