diff options
Diffstat (limited to 'src/styles/qcommonstyle.h')
-rw-r--r-- | src/styles/qcommonstyle.h | 141 |
1 files changed, 129 insertions, 12 deletions
diff --git a/src/styles/qcommonstyle.h b/src/styles/qcommonstyle.h index 3bed7b0..e6378e6 100644 --- a/src/styles/qcommonstyle.h +++ b/src/styles/qcommonstyle.h @@ -55,6 +55,8 @@ public: QCommonStyle(); ~QCommonStyle(); + // Old API + // DEPRECATED void drawPrimitive( PrimitiveElement pe, QPainter *p, const QRect &r, @@ -62,22 +64,63 @@ public: SFlags flags = Style_Default, const QStyleOption& = QStyleOption::Default ) const; + // New API + void drawPrimitive( PrimitiveElement pe, + QPainter *p, + QStyleControlElementData ceData, + ControlElementFlags elementFlags, + const QRect &r, + const QColorGroup &cg, + SFlags flags = Style_Default, + const QStyleOption& = QStyleOption::Default ) const; + + // Old API + // DEPRECATED void drawControl( ControlElement element, - QPainter *p, - const QWidget *widget, - const QRect &r, - const QColorGroup &cg, - SFlags how = Style_Default, - const QStyleOption& = QStyleOption::Default ) const; + QPainter *p, + const QWidget *widget, + const QRect &r, + const QColorGroup &cg, + SFlags how = Style_Default, + const QStyleOption& = QStyleOption::Default ) const; + // New API + void drawControl( ControlElement element, + QPainter *p, + QStyleControlElementData ceData, + ControlElementFlags elementFlags, + const QRect &r, + const QColorGroup &cg, + SFlags how = Style_Default, + const QStyleOption& = QStyleOption::Default, + const QWidget *widget = 0 ) const; + + // Old API + // DEPRECATED void drawControlMask( ControlElement element, - QPainter *p, - const QWidget *widget, - const QRect &r, - const QStyleOption& = QStyleOption::Default ) const; + QPainter *p, + const QWidget *widget, + const QRect &r, + const QStyleOption& = QStyleOption::Default ) const; + // New API + void drawControlMask( ControlElement element, + QPainter *p, + QStyleControlElementData ceData, + ControlElementFlags elementFlags, + const QRect &r, + const QStyleOption& = QStyleOption::Default, + const QWidget *widget = 0 ) const; + + // Old API + // DEPRECATED QRect subRect( SubRect r, const QWidget *widget ) const; + // New API + QRect subRect( SubRect r, const QStyleControlElementData ceData, const ControlElementFlags elementFlags, const QWidget *widget ) const; + + // Old API + // DEPRECATED void drawComplexControl( ComplexControl control, QPainter *p, const QWidget *widget, @@ -92,35 +135,111 @@ public: SCFlags subActive = SC_None, const QStyleOption& = QStyleOption::Default ) const; + // New API + void drawComplexControl( ComplexControl control, + QPainter *p, + QStyleControlElementData ceData, + ControlElementFlags elementFlags, + const QRect &r, + const QColorGroup &cg, + SFlags how = Style_Default, +#ifdef Q_QDOC + SCFlags sub = SC_All, +#else + SCFlags sub = (uint)SC_All, +#endif + SCFlags subActive = SC_None, + const QStyleOption& = QStyleOption::Default, + const QWidget *widget = 0 ) const; + + // Old API + // DEPRECATED void drawComplexControlMask( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QStyleOption& = QStyleOption::Default ) const; + // New API + void drawComplexControlMask( ComplexControl control, + QPainter *p, + const QStyleControlElementData ceData, + const ControlElementFlags elementFlags, + const QRect &r, + const QStyleOption& = QStyleOption::Default, + const QWidget *widget = 0 ) const; + + // Old API + // DEPRECATED QRect querySubControlMetrics( ComplexControl control, const QWidget *widget, SubControl sc, const QStyleOption& = QStyleOption::Default ) const; + // New API + QRect querySubControlMetrics( ComplexControl control, + QStyleControlElementData ceData, + ControlElementFlags elementFlags, + SubControl sc, + const QStyleOption& = QStyleOption::Default, + const QWidget *widget = 0 ) const; + + // Old API + // DEPRECATED SubControl querySubControl( ComplexControl control, const QWidget *widget, const QPoint &pos, const QStyleOption& = QStyleOption::Default ) const; + // New API + SubControl querySubControl( ComplexControl control, + QStyleControlElementData ceData, + ControlElementFlags elementFlags, + const QPoint &pos, + const QStyleOption& = QStyleOption::Default, + const QWidget *widget = 0 ) const; + + // Old API + // DEPRECATED int pixelMetric( PixelMetric m, const QWidget *widget = 0 ) const; + // New API + int pixelMetric( PixelMetric m, QStyleControlElementData ceData, ControlElementFlags elementFlags, const QWidget *widget = 0 ) const; + + // Old API + // DEPRECATED QSize sizeFromContents( ContentsType s, const QWidget *widget, const QSize &contentsSize, const QStyleOption& = QStyleOption::Default ) const; + // New API + QSize sizeFromContents( ContentsType s, + QStyleControlElementData ceData, + ControlElementFlags elementFlags, + const QSize &contentsSize, + const QStyleOption& = QStyleOption::Default, + const QWidget *widget = 0 ) const; + + // Old API + // DEPRECATED int styleHint(StyleHint sh, const QWidget *, const QStyleOption &, QStyleHintReturn *) const; + // New API + int styleHint(StyleHint sh, QStyleControlElementData ceData, ControlElementFlags elementFlags, const QStyleOption &, QStyleHintReturn *, const QWidget * w) const; + + // Old API + // DEPRECATED QPixmap stylePixmap( StylePixmap sp, const QWidget *widget = 0, const QStyleOption& = QStyleOption::Default ) const; + // New API + QPixmap stylePixmap( StylePixmap sp, + QStyleControlElementData ceData, + ControlElementFlags elementFlags, + const QStyleOption& = QStyleOption::Default, + const QWidget *widget = 0 ) const; private: // Disabled copy constructor and operator= @@ -130,8 +249,6 @@ private: #endif }; - - #endif // QT_NO_STYLE #endif // QCOMMONSTYLE_H |