diff options
author | François Andriot <francois.andriot@free.fr> | 2016-03-26 23:56:30 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-03-27 00:06:43 +0100 |
commit | d4a24866b531801cace227c1d09fda763cbca8ac (patch) | |
tree | 1bf3f3d9c7d137c70ecbee0e73b7838b4ee18dc6 /src/widget/ia_ora.h | |
parent | 3ae9f9432e0df88db99fc7aaadaea3b35bda1f9a (diff) | |
download | tde-style-ia-ora-d4a24866b531801cace227c1d09fda763cbca8ac.tar.gz tde-style-ia-ora-d4a24866b531801cace227c1d09fda763cbca8ac.zip |
Update to new style API
Signed-off-by: François Andriot <francois.andriot@free.fr>
Diffstat (limited to 'src/widget/ia_ora.h')
-rw-r--r-- | src/widget/ia_ora.h | 76 |
1 files changed, 50 insertions, 26 deletions
diff --git a/src/widget/ia_ora.h b/src/widget/ia_ora.h index aaac040..68b05fb 100644 --- a/src/widget/ia_ora.h +++ b/src/widget/ia_ora.h @@ -51,22 +51,26 @@ public: MandrivaStyle(); virtual ~MandrivaStyle(); - void polish( TQWidget* widget ); - void unPolish( TQWidget* widget ); - void polish( TQApplication *app ); + void polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *); + void unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *); + void applicationPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *); void renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup &cg, const TQPopupMenu* popup ) const; void drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, - const TQWidget* widget, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, - const TQStyleOption& = TQStyleOption::Default ) const; + const TQStyleOption& = TQStyleOption::Default, + const TQWidget* widget = 0 ) const; void drawPrimitive( PrimitiveElement pe, TQPainter* p, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, @@ -74,54 +78,72 @@ public: void drawControl( ControlElement element, TQPainter *p, - const TQWidget *widget, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, - const TQStyleOption& = TQStyleOption::Default ) const; + const TQStyleOption& = TQStyleOption::Default, + const TQWidget *widget = 0 ) const; void drawControlMask( ControlElement element, TQPainter *p, - const TQWidget *widget, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, const TQRect &r, - const TQStyleOption& = TQStyleOption::Default ) const; + const TQStyleOption& = TQStyleOption::Default, + const TQWidget *widget = 0 ) const; void drawComplexControl( ComplexControl control, TQPainter *p, - const TQWidget *widget, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, SCFlags controls = SC_All, SCFlags active = SC_None, - const TQStyleOption& = TQStyleOption::Default ) const; + const TQStyleOption& = TQStyleOption::Default , + const TQWidget *widget = 0 ) const; void drawComplexControlMask( ComplexControl control, TQPainter *p, - const TQWidget *widget, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, const TQRect &r, - const TQStyleOption& = TQStyleOption::Default ) const; + const TQStyleOption& = TQStyleOption::Default, + const TQWidget *widget = 0 ) const; int pixelMetric( PixelMetric m, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, const TQWidget *widget = 0 ) const; TQSize sizeFromContents( ContentsType contents, - const TQWidget *widget, - const TQSize &contentSize, - const TQStyleOption& opt ) const; + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQSize &contentSize, + const TQStyleOption& opt, + const TQWidget *widget = 0 ) const; TQRect subRect( SubRect r, - const TQWidget *widget ) const; + const TQStyleControlElementData &ceData, + const ControlElementFlags elementFlags, + const TQWidget *widget ) const; // Fix TQt3's wacky image positions TQPixmap stylePixmap( StylePixmap stylepixmap, - const TQWidget *widget = 0, - const TQStyleOption& = TQStyleOption::Default ) const; + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget *widget = 0 ) const; TQRect querySubControlMetrics( ComplexControl control, - const TQWidget* widget, - SubControl subcontrol, - const TQStyleOption& opt = TQStyleOption::Default ) const; + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, + SubControl subcontrol, + const TQStyleOption& opt = TQStyleOption::Default, + const TQWidget* widget = 0 ) const; protected: enum Hover @@ -141,7 +163,7 @@ protected: }; - bool eventFilter( TQObject *object, TQEvent *event ); + virtual bool objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ); void renderGradient(TQPainter* p, const TQRect& r, @@ -225,11 +247,13 @@ private: bool active) const; void drawComboboxArrow( TQPainter *p, - const TQWidget *widget, + const TQStyleControlElementData &ceData, + ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags flags, - SCFlags active)const; + SCFlags active, + const TQWidget *widget)const; void drawMandrivaArrow( TQPointArray a, TQPainter *p, const TQRect &r, @@ -243,7 +267,7 @@ private: bool isFormWidget(const TQWidget* widget) const; bool excludeColor(const TQColor &col, bool active) const; void getShade (const TQColorGroup &cg, int shadenr, TQColor &res) const; - void updateHoverControl(const TQPoint &pos); + void updateHoverControl(const TQPoint &pos, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags); TQIntCache<MandrivaColorData> m_dataCache; static const double shading[8]; mutable bool formMode; |