From 0008bc5bcd95694b38b0d0322aac2ea6fdb21298 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 5 Aug 2012 01:00:53 -0500 Subject: Update style API to function without an active widget object --- src/styles/qmotifstyle.h | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'src/styles/qmotifstyle.h') diff --git a/src/styles/qmotifstyle.h b/src/styles/qmotifstyle.h index c26337c..969064c 100644 --- a/src/styles/qmotifstyle.h +++ b/src/styles/qmotifstyle.h @@ -75,6 +75,8 @@ public: // new style API void drawPrimitive( PrimitiveElement pe, QPainter *p, + QStyleControlElementData ceData, + ControlElementFlags elementFlags, const QRect &r, const QColorGroup &cg, SFlags flags = Style_Default, @@ -82,15 +84,18 @@ public: void drawControl( ControlElement element, QPainter *p, - const QWidget *widget, + QStyleControlElementData ceData, + ControlElementFlags elementFlags, const QRect &r, const QColorGroup &cg, SFlags how = Style_Default, - const QStyleOption& = QStyleOption::Default ) const; + const QStyleOption& = QStyleOption::Default, + const QWidget *widget = 0 ) const; void drawComplexControl( ComplexControl control, QPainter *p, - const QWidget* widget, + QStyleControlElementData ceData, + ControlElementFlags elementFlags, const QRect& r, const QColorGroup& cg, SFlags how = Style_Default, @@ -100,26 +105,31 @@ public: SCFlags sub = (uint)SC_All, #endif SCFlags subActive = SC_None, - const QStyleOption& = QStyleOption::Default ) const; + const QStyleOption& = QStyleOption::Default, + const QWidget* widget = 0 ) const; QRect querySubControlMetrics( ComplexControl control, - const QWidget *widget, + QStyleControlElementData ceData, + ControlElementFlags elementFlags, SubControl sc, - const QStyleOption& = QStyleOption::Default ) const; + const QStyleOption& = QStyleOption::Default, + const QWidget *widget = 0 ) const; - int pixelMetric( PixelMetric metric, const QWidget *widget = 0 ) const; + int pixelMetric( PixelMetric metric, QStyleControlElementData ceData, ControlElementFlags elementFlags, const QWidget *widget = 0 ) const; QSize sizeFromContents( ContentsType contents, - const QWidget *widget, + QStyleControlElementData ceData, + ControlElementFlags elementFlags, const QSize &contentsSize, - const QStyleOption& = QStyleOption::Default ) const; + const QStyleOption& = QStyleOption::Default, + const QWidget *widget = 0 ) const; - QRect subRect( SubRect r, const QWidget *widget ) const; + QRect subRect( SubRect r, QStyleControlElementData ceData, ControlElementFlags elementFlags, const QWidget *widget ) const; - QPixmap stylePixmap(StylePixmap, const QWidget * = 0, const QStyleOption& = QStyleOption::Default) const; + QPixmap stylePixmap(StylePixmap, QStyleControlElementData ceData, ControlElementFlags elementFlags, const QStyleOption& = QStyleOption::Default, const QWidget * = 0) const; - int styleHint(StyleHint sh, const QWidget *, const QStyleOption & = QStyleOption::Default, - QStyleHintReturn* = 0) const; + int styleHint(StyleHint sh, QStyleControlElementData ceData, ControlElementFlags elementFlags, const QStyleOption & = QStyleOption::Default, + QStyleHintReturn* = 0, const QWidget * = 0) const; private: bool highlightCols; -- cgit v1.2.1