diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-08-08 18:39:32 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-08-08 18:39:32 -0500 |
commit | 9d466f4825e4d70f9d531b8dccd9c7e856307ede (patch) | |
tree | 32621cf65f34983eeee743bea2ce3b4375af634c | |
parent | de6fd1852e0b0a267d654106795af77f8d9533d1 (diff) | |
download | tde-style-qtcurve-9d466f4825e4d70f9d531b8dccd9c7e856307ede.tar.gz tde-style-qtcurve-9d466f4825e4d70f9d531b8dccd9c7e856307ede.zip |
Style API update
-rw-r--r-- | style/qtc_kstyle.cpp | 11 | ||||
-rw-r--r-- | style/qtc_kstyle.h | 4 | ||||
-rw-r--r-- | style/qtcurve.cpp | 4 | ||||
-rw-r--r-- | style/qtcurve.h | 2 |
4 files changed, 11 insertions, 10 deletions
diff --git a/style/qtc_kstyle.cpp b/style/qtc_kstyle.cpp index 7d73476..d29451b 100644 --- a/style/qtc_kstyle.cpp +++ b/style/qtc_kstyle.cpp @@ -154,10 +154,11 @@ void TQtCKStyle::unPolish( TQStyleControlElementData ceData, ControlElementFlags // Style changes (should) always re-polish popups. -void TQtCKStyle::polishPopupMenu( TQPopupMenu* p ) +void TQtCKStyle::polishPopupMenu( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr ) { - if (!p->testWState( WState_Polished )) - p->setCheckable(true); + if ( !(ceData.windowState & WState_Polished ) ) { + widgetActionRequest(ceData, elementFlags, ptr, WAR_SetCheckable); + } } @@ -363,7 +364,7 @@ void TQtCKStyle::drawKStylePrimitive( KStylePrimitive kpe, } -int TQtCKStyle::kPixelMetric( KStylePixelMetric kpm, const TQWidget* /* widget */) const +int TQtCKStyle::kPixelMetric( KStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget* /* widget */) const { int value; switch(kpm) @@ -1130,7 +1131,7 @@ void TQtCKStyle::drawComplexControl( ComplexControl control, } // Draw all the branches... - static int thickness = kPixelMetric( KPM_ListViewBranchThickness ); + static int thickness = kPixelMetric( KPM_ListViewBranchThickness, ceData, elementFlags ); int line; // index into dotlines TQRect branchrect; TQStyle::StyleFlags branchflags; diff --git a/style/qtc_kstyle.h b/style/qtc_kstyle.h index 855558e..63fa4fc 100644 --- a/style/qtc_kstyle.h +++ b/style/qtc_kstyle.h @@ -249,13 +249,13 @@ class TQtCKStyle: public TQCommonStyle KPM_ListViewBranchThickness = 0x00000100 }; - int kPixelMetric( KStylePixelMetric kpm, const TQWidget* widget = 0 ) const; + int kPixelMetric( KStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget* widget = 0 ) const; // --------------------------------------------------------------------------- void polish( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void * ); void unPolish( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void * ); - void polishPopupMenu( TQPopupMenu* ); + void polishPopupMenu( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr ); void drawPrimitive( PrimitiveElement pe, TQPainter* p, diff --git a/style/qtcurve.cpp b/style/qtcurve.cpp index c56a99e..8314397 100644 --- a/style/qtcurve.cpp +++ b/style/qtcurve.cpp @@ -6905,14 +6905,14 @@ int TQtCurveStyle::pixelMetric(PixelMetric metric, TQStyleControlElementData ceD } } -int TQtCurveStyle::kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) const +int TQtCurveStyle::kPixelMetric(KStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const { switch(kpm) { case KPM_MenuItemSeparatorHeight: return 2; default: - return BASE_STYLE::kPixelMetric(kpm, widget); + return BASE_STYLE::kPixelMetric(kpm, ceData, elementFlags, widget); } } diff --git a/style/qtcurve.h b/style/qtcurve.h index a4debc1..c3492a2 100644 --- a/style/qtcurve.h +++ b/style/qtcurve.h @@ -175,7 +175,7 @@ class TQtCurveStyle : public BASE_STYLE TQRect querySubControlMetrics(TQ_ComplexControl, TQStyleControlElementData ceData, ControlElementFlags elementFlags, SubControl, const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const; int pixelMetric(PixelMetric, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget= 0) const; - int kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) const; + int kPixelMetric(KStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget) const; TQSize sizeFromContents(ContentsType, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQSize &, const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0) const; int styleHint(StyleHint, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQStyleOption & = TQStyleOption::Default, |