diff options
author | Timothy Pearson <[email protected]> | 2012-08-10 00:39:07 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-08-10 00:39:07 -0500 |
commit | 4b78cab44f7a8a1c8e74ddf6ae386e3629731177 (patch) | |
tree | 6f2e4142841d819869f213c081841f1a0bb27d51 | |
parent | e2c83be461efca28a3a78031aadc0aa4b1c1ce62 (diff) | |
download | pytqt-4b78cab44f7a8a1c8e74ddf6ae386e3629731177.tar.gz pytqt-4b78cab44f7a8a1c8e74ddf6ae386e3629731177.zip |
Update to the new style API
-rw-r--r-- | sip/qt/qcdestyle.sip | 8 | ||||
-rw-r--r-- | sip/qt/qcommonstyle.sip | 42 | ||||
-rw-r--r-- | sip/qt/qmotifplusstyle.sip | 35 | ||||
-rw-r--r-- | sip/qt/qmotifstyle.sip | 40 | ||||
-rw-r--r-- | sip/qt/qplatinumstyle.sip | 18 | ||||
-rw-r--r-- | sip/qt/qsgistyle.sip | 30 | ||||
-rw-r--r-- | sip/qt/qstyle.sip | 203 | ||||
-rw-r--r-- | sip/qt/qwindowsstyle.sip | 42 |
8 files changed, 310 insertions, 108 deletions
diff --git a/sip/qt/qcdestyle.sip b/sip/qt/qcdestyle.sip index 3f6510e..2a6fcf4 100644 --- a/sip/qt/qcdestyle.sip +++ b/sip/qt/qcdestyle.sip @@ -51,14 +51,14 @@ public: const TQColorGroup &,bool,bool = 0,bool = 1); %End %If (TQt_3_0_0 -) - int pixelMetric(PixelMetric,const TQWidget * = 0) const; + int pixelMetric(PixelMetric,TQStyleControlElementData,ControlElementFlags,const TQWidget * = 0) const; - void drawControl(ControlElement,TQPainter *,const TQWidget *, + void drawControl(ControlElement,TQPainter *,TQStyleControlElementData,ControlElementFlags, const TQRect &,const TQColorGroup &, SFlags = Style_Default, - const TQStyleOption & = TQStyleOption()) const; + const TQStyleOption & = TQStyleOption(),const TQWidget *=0) const; - void drawPrimitive(PrimitiveElement,TQPainter *,const TQRect &, + void drawPrimitive(PrimitiveElement,TQPainter *,TQStyleControlElementData,ControlElementFlags,const TQRect &, const TQColorGroup &,SFlags = Style_Default, const TQStyleOption & = TQStyleOption()) const; %End diff --git a/sip/qt/qcommonstyle.sip b/sip/qt/qcommonstyle.sip index 6985ec2..3fd18ab 100644 --- a/sip/qt/qcommonstyle.sip +++ b/sip/qt/qcommonstyle.sip @@ -79,48 +79,48 @@ public: %If (TQt_3_0_0 -) TQCommonStyle(); - void drawPrimitive(PrimitiveElement,TQPainter *,const TQRect &, + void drawPrimitive(PrimitiveElement,TQPainter *,TQStyleControlElementData,ControlElementFlags,const TQRect &, const TQColorGroup &,SFlags = Style_Default, const TQStyleOption& = TQStyleOption()) const; - void drawControl(ControlElement,TQPainter *,const TQWidget *, + void drawControl(ControlElement,TQPainter *,TQStyleControlElementData,ControlElementFlags, const TQRect &,const TQColorGroup &, SFlags = Style_Default, - const TQStyleOption & = TQStyleOption()) const; + const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const; - void drawControlMask(ControlElement,TQPainter *,const TQWidget *, + void drawControlMask(ControlElement,TQPainter *,TQStyleControlElementData,ControlElementFlags, const TQRect &, - const TQStyleOption & = TQStyleOption()) const; + const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const; - TQRect subRect(SubRect,const TQWidget *) const; + TQRect subRect(SubRect,const TQStyleControlElementData, const ControlElementFlags,const TQWidget *) const; - void drawComplexControl(ComplexControl,TQPainter *,const TQWidget *, + void drawComplexControl(ComplexControl,TQPainter *,TQStyleControlElementData,ControlElementFlags, const TQRect &,const TQColorGroup &, SFlags = Style_Default,SCFlags = SC_All, SCFlags = SC_None, - const TQStyleOption & = TQStyleOption()) const; + const TQStyleOption & = TQStyleOption(),const TQWidget *=0) const; - void drawComplexControlMask(ComplexControl,TQPainter *,const TQWidget *, + void drawComplexControlMask(ComplexControl,TQPainter *,const TQStyleControlElementData,const ControlElementFlags, const TQRect &, - const TQStyleOption & = TQStyleOption()) const; + const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const; - TQRect querySubControlMetrics(ComplexControl,const TQWidget *,SubControl, - const TQStyleOption & = TQStyleOption()) const; + TQRect querySubControlMetrics(ComplexControl,TQStyleControlElementData,ControlElementFlags,SubControl, + const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const; - SubControl querySubControl(ComplexControl,const TQWidget *, + SubControl querySubControl(ComplexControl,TQStyleControlElementData,ControlElementFlags, const TQPoint &, - const TQStyleOption & = TQStyleOption()) const; + const TQStyleOption & = TQStyleOption(),const TQWidget *=0) const; - int pixelMetric(PixelMetric,const TQWidget * = 0) const; + int pixelMetric(PixelMetric,TQStyleControlElementData,ControlElementFlags,const TQWidget * = 0) const; - TQSize sizeFromContents(ContentsType,const TQWidget *,const TQSize &, - const TQStyleOption & = TQStyleOption()) const; + TQSize sizeFromContents(ContentsType,TQStyleControlElementData,ControlElementFlags,const TQSize &, + const TQStyleOption & = TQStyleOption(),const TQWidget *=0) const; - int styleHint(StyleHint,const TQWidget *,const TQStyleOption &, - TQStyleHintReturn *) const; + int styleHint(StyleHint,TQStyleControlElementData,ControlElementFlags,const TQStyleOption &, + TQStyleHintReturn *,const TQWidget *=0) const; - TQPixmap stylePixmap(StylePixmap,const TQWidget * = 0, - const TQStyleOption & = TQStyleOption()) const; + TQPixmap stylePixmap(StylePixmap,TQStyleControlElementData,ControlElementFlags, + const TQStyleOption & = TQStyleOption(), const TQWidget * = 0) const; %End diff --git a/sip/qt/qmotifplusstyle.sip b/sip/qt/qmotifplusstyle.sip index 1f6f8fd..39877dd 100644 --- a/sip/qt/qmotifplusstyle.sip +++ b/sip/qt/qmotifplusstyle.sip @@ -67,15 +67,14 @@ public: TQMotifPlusStyle(bool = 1); %End - void polish(TQPalette &); - void polish(TQWidget *); - void unPolish(TQWidget *); - - void polish(TQApplication *); - void unPolish(TQApplication *); + void polish(TQPalette &pal); + void polish(TQStyleControlElementData, ControlElementFlags, void *); + void unPolish(TQStyleControlElementData, ControlElementFlags, void *); + + void applicationPolish(TQStyleControlElementData, ControlElementFlags, void *); + void applicationUnPolish(TQStyleControlElementData, ControlElementFlags, void *); %If (- TQt_3_0_0) - void polishPopupMenu(TQPopupMenu *); int defaultFrameWidth() const; void drawArrow(TQPainter *,ArrowType,bool,int,int,int,int, const TQColorGroup &,bool,const TQBrush * = 0); @@ -114,32 +113,32 @@ public: TQCOORD,Orientation); %End %If (TQt_3_0_0 -) - void drawPrimitive(PrimitiveElement,TQPainter *,const TQRect &, + void drawPrimitive(PrimitiveElement,TQPainter *,TQStyleControlElementData,ControlElementFlags,const TQRect &, const TQColorGroup &,SFlags = Style_Default, const TQStyleOption & = TQStyleOption()) const; - void drawControl(ControlElement,TQPainter *,const TQWidget *, + void drawControl(ControlElement,TQPainter *,TQStyleControlElementData,ControlElementFlags, const TQRect &,const TQColorGroup &, SFlags = Style_Default, - const TQStyleOption & = TQStyleOption()) const; + const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const; - TQRect subRect(SubRect,const TQWidget *) const; + TQRect subRect(SubRect,const TQStyleControlElementData, const ControlElementFlags,const TQWidget *) const; - void drawComplexControl(ComplexControl,TQPainter *,const TQWidget *, + void drawComplexControl(ComplexControl,TQPainter *,TQStyleControlElementData,ControlElementFlags, const TQRect &,const TQColorGroup &, SFlags = Style_Default,SCFlags = SC_All, SCFlags = SC_None, - const TQStyleOption & = TQStyleOption()) const; + const TQStyleOption & = TQStyleOption(),const TQWidget *=0) const; - TQRect querySubControlMetrics(ComplexControl,const TQWidget *, + TQRect querySubControlMetrics(ComplexControl,TQStyleControlElementData,ControlElementFlags, SubControl, - const TQStyleOption & = TQStyleOption()) const; + const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const; - int pixelMetric(PixelMetric,const TQWidget * = 0) const; + int pixelMetric(PixelMetric,TQStyleControlElementData,ControlElementFlags,const TQWidget * = 0) const; - int styleHint(StyleHint,const TQWidget *, + int styleHint(StyleHint,TQStyleControlElementData,ControlElementFlags, const TQStyleOption & = TQStyleOption(), - TQStyleHintReturn * = 0) const; + TQStyleHintReturn * = 0, const TQWidget * = 0) const; %End protected: diff --git a/sip/qt/qmotifstyle.sip b/sip/qt/qmotifstyle.sip index 0e0b979..0613e66 100644 --- a/sip/qt/qmotifstyle.sip +++ b/sip/qt/qmotifstyle.sip @@ -68,9 +68,11 @@ public: void setUseHighlightColors(bool); bool useHighlightColors() const; - void polish(TQPalette &); - void polish(TQWidget *); - void polish(TQApplication *); + void polish( TQPalette& ); + void polish( TQStyleControlElementData, ControlElementFlags, void * ); + void applicationPolish( TQStyleControlElementData, ControlElementFlags, void * ); + + void polishPopupMenu( TQStyleControlElementData, ControlElementFlags, void * ); %If (- TQt_3_0_0) void drawButton(TQPainter *,int,int,int,int,const TQColorGroup &,bool = 0, @@ -123,39 +125,37 @@ public: const TQPalette &,bool,bool,int,int,int,int); %End %If (TQt_3_0_0 -) - void polishPopupMenu(TQPopupMenu *); - - void drawPrimitive(PrimitiveElement,TQPainter *,const TQRect &, + void drawPrimitive(PrimitiveElement,TQPainter *,TQStyleControlElementData,ControlElementFlags,const TQRect &, const TQColorGroup &,SFlags = Style_Default, const TQStyleOption & = TQStyleOption()) const; - void drawControl(ControlElement,TQPainter *,const TQWidget *, + void drawControl(ControlElement,TQPainter *,TQStyleControlElementData,ControlElementFlags, const TQRect &,const TQColorGroup &, SFlags = Style_Default, - const TQStyleOption & = TQStyleOption()) const; + const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const; - void drawComplexControl(ComplexControl,TQPainter *,const TQWidget *, + void drawComplexControl(ComplexControl,TQPainter *,TQStyleControlElementData,ControlElementFlags, const TQRect &,const TQColorGroup &, SFlags = Style_Default,SCFlags = SC_All, SCFlags = SC_None, - const TQStyleOption & = TQStyleOption()) const; + const TQStyleOption & = TQStyleOption(),const TQWidget *=0) const; - TQRect querySubControlMetrics(ComplexControl,const TQWidget *,SubControl, - const TQStyleOption & = TQStyleOption()) const; + TQRect querySubControlMetrics(ComplexControl,TQStyleControlElementData,ControlElementFlags,SubControl, + const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const; - int pixelMetric(PixelMetric,const TQWidget * = 0) const; + int pixelMetric(PixelMetric,TQStyleControlElementData,ControlElementFlags,const TQWidget * = 0) const; - TQSize sizeFromContents(ContentsType,const TQWidget *,const TQSize &, - const TQStyleOption & = TQStyleOption()) const; + TQSize sizeFromContents(ContentsType,TQStyleControlElementData,ControlElementFlags,const TQSize &, + const TQStyleOption & = TQStyleOption(),const TQWidget *=0) const; - TQRect subRect(SubRect,const TQWidget *) const; + TQRect subRect(SubRect,const TQStyleControlElementData, const ControlElementFlags,const TQWidget *) const; - TQPixmap stylePixmap(StylePixmap,const TQWidget * = 0, - const TQStyleOption & = TQStyleOption()) const; + TQPixmap stylePixmap(StylePixmap,TQStyleControlElementData,ControlElementFlags, + const TQStyleOption & = TQStyleOption(), const TQWidget * = 0) const; - int styleHint(StyleHint,const TQWidget *, + int styleHint(StyleHint,TQStyleControlElementData,ControlElementFlags, const TQStyleOption & = TQStyleOption(), - TQStyleHintReturn * = 0) const; + TQStyleHintReturn * = 0, const TQWidget * = 0) const; %End private: diff --git a/sip/qt/qplatinumstyle.sip b/sip/qt/qplatinumstyle.sip index 8a1a239..6731506 100644 --- a/sip/qt/qplatinumstyle.sip +++ b/sip/qt/qplatinumstyle.sip @@ -94,27 +94,27 @@ public: const TQPalette &,bool,bool,int,int,int,int); %End %If (TQt_3_0_0 -) - void drawPrimitive(PrimitiveElement,TQPainter *,const TQRect &, + void drawPrimitive(PrimitiveElement,TQPainter *,TQStyleControlElementData,ControlElementFlags,const TQRect &, const TQColorGroup &,SFlags = Style_Default, const TQStyleOption & = TQStyleOption()) const; - void drawControl(ControlElement,TQPainter *,const TQWidget *, + void drawControl(ControlElement,TQPainter *,TQStyleControlElementData,ControlElementFlags, const TQRect &,const TQColorGroup &, SFlags = Style_Default, - const TQStyleOption & = TQStyleOption()) const; + const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const; - void drawComplexControl(ComplexControl,TQPainter *,const TQWidget *, + void drawComplexControl(ComplexControl,TQPainter *,TQStyleControlElementData,ControlElementFlags, const TQRect &,const TQColorGroup &, SFlags = Style_Default,SCFlags = SC_All, SCFlags = SC_None, - const TQStyleOption & = TQStyleOption()) const; + const TQStyleOption & = TQStyleOption(),const TQWidget *=0) const; - TQRect querySubControlMetrics(ComplexControl,const TQWidget *,SubControl, - const TQStyleOption & = TQStyleOption()) const; + TQRect querySubControlMetrics(ComplexControl,TQStyleControlElementData,ControlElementFlags,SubControl, + const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const; - int pixelMetric(PixelMetric,const TQWidget * = 0) const; + int pixelMetric(PixelMetric,TQStyleControlElementData,ControlElementFlags,const TQWidget * = 0) const; - TQRect subRect(SubRect,const TQWidget *) const; + TQRect subRect(SubRect,const TQStyleControlElementData, const ControlElementFlags,const TQWidget *) const; %End protected: diff --git a/sip/qt/qsgistyle.sip b/sip/qt/qsgistyle.sip index 06c0ebc..d84bfd7 100644 --- a/sip/qt/qsgistyle.sip +++ b/sip/qt/qsgistyle.sip @@ -52,10 +52,10 @@ class TQSGIStyle : TQMotifStyle public: TQSGIStyle(bool = 0); - void polish(TQWidget *); - void unPolish(TQWidget *); - void polish(TQApplication *); - void unPolish(TQApplication *); + void polish( TQStyleControlElementData, ControlElementFlags, void * ); + void unPolish( TQStyleControlElementData, ControlElementFlags, void * ); + void applicationPolish( TQStyleControlElementData, ControlElementFlags, void * ); + void applicationUnPolish( TQStyleControlElementData, ControlElementFlags, void * ); %If (- TQt_3_0_0) void polish(TQPalette &); @@ -119,31 +119,31 @@ public: TQColorGroup &,bool,bool); %End %If (TQt_3_0_0 -) - void drawPrimitive(PrimitiveElement,TQPainter *,const TQRect &, + void drawPrimitive(PrimitiveElement,TQPainter *,TQStyleControlElementData,ControlElementFlags,const TQRect &, const TQColorGroup &,SFlags = Style_Default, const TQStyleOption & = TQStyleOption()) const; - void drawControl(ControlElement,TQPainter *,const TQWidget *, + void drawControl(ControlElement,TQPainter *,TQStyleControlElementData,ControlElementFlags, const TQRect &,const TQColorGroup &, SFlags = Style_Default, - const TQStyleOption & = TQStyleOption()) const; + const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const; - void drawComplexControl(ComplexControl,TQPainter *,const TQWidget *, + void drawComplexControl(ComplexControl,TQPainter *,TQStyleControlElementData,ControlElementFlags, const TQRect &,const TQColorGroup &, SFlags = Style_Default,SCFlags = SC_All, SCFlags = SC_None, - const TQStyleOption & = TQStyleOption()) const; + const TQStyleOption & = TQStyleOption(),const TQWidget *=0) const; - int pixelMetric(PixelMetric,const TQWidget * = 0) const; + int pixelMetric(PixelMetric,TQStyleControlElementData,ControlElementFlags,const TQWidget * = 0) const; - TQSize sizeFromContents(ContentsType,const TQWidget *,const TQSize &, - const TQStyleOption & = TQStyleOption()) const; + TQSize sizeFromContents(ContentsType,TQStyleControlElementData,ControlElementFlags,const TQSize &, + const TQStyleOption & = TQStyleOption(),const TQWidget *=0) const; - TQRect subRect(SubRect,const TQWidget *) const; + TQRect subRect(SubRect,const TQStyleControlElementData, const ControlElementFlags,const TQWidget *) const; - TQRect querySubControlMetrics(ComplexControl,const TQWidget *, + TQRect querySubControlMetrics(ComplexControl,TQStyleControlElementData,ControlElementFlags, SubControl, - const TQStyleOption & = TQStyleOption()) const; + const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const; %End protected: diff --git a/sip/qt/qstyle.sip b/sip/qt/qstyle.sip index bc52b87..57d752c 100644 --- a/sip/qt/qstyle.sip +++ b/sip/qt/qstyle.sip @@ -146,6 +146,39 @@ public: class TQStyleHintReturn; %End +typedef TQMap<TQ_UINT32, TQSize> DialogButtonSizeMap; +typedef TQMap<TQ_INT32, TQ_INT32> TabIdentifierIndexMap; + +class TQStyleControlElementPopupMenuData; + +class TQStyleControlElementCheckListItemData; + +class TQStyleControlElementTabBarData; + +class TQStyleControlElementListViewData; + +class TQStyleControlElementSpinWidgetData; + +class TQStyleControlElementTitleBarData; + +class TQStyleControlElementDockWidgetData; + +class TQStyleControlElementGenericWidgetData; + +class TQStyleControlElementData; + +class TQStyleWidgetActionRequestData +{ +public: + TQStyleWidgetActionRequestData(); + TQStyleWidgetActionRequestData(int, int = 0); + TQStyleWidgetActionRequestData(TQPalette, bool = FALSE, const char* = 0); + TQStyleWidgetActionRequestData(TQFont, bool = FALSE, const char* = 0); + TQStyleWidgetActionRequestData(TQRect); + ~TQStyleWidgetActionRequestData(); +}; + +typedef TQStyleWidgetActionRequestData TQStyleApplicationActionRequestData; %If (TQt_2_00 -) @@ -164,16 +197,51 @@ public: GUIStyle guiStyle() const; %End + enum ControlElementFlags { + CEF_None = 0x00000000, + CEF_IsDefault = 0x00000001, + CEF_AutoDefault = 0x00000002, + CEF_IsActive = 0x00000004, + CEF_IsDown = 0x00000008, + CEF_IsOn = 0x00000010, + CEF_IsEnabled = 0x00000020, + CEF_BiState = 0x00000040, + CEF_HasFocus = 0x00000080, + CEF_IsMenuWidget = 0x00000100, + CEF_IsContainerEmpty = 0x00000200, + CEF_CenterIndicator = 0x00000400, + CEF_IndicatorFollowsStyle = 0x00000800, + CEF_UsesTextLabel = 0x00001000, + CEF_UsesBigPixmap = 0x00002000, + CEF_UseGenericParameters = 0x00004000, + CEF_HasParentWidget = 0x00008000, + CEF_HasPopupMenu = 0x00010000, + CEF_IsCheckable = 0x00020000, + CEF_HasFocusProxy = 0x00040000, + CEF_IsEditable = 0x00080000, + CEF_IsFlat = 0x00100000, + CEF_IsActiveWindow = 0x00200000, + CEF_IsTopLevel = 0x00400000, + CEF_IsVisible = 0x00800000 + }; + virtual void polish(TQWidget *); + virtual void polish(TQStyleControlElementData ceData, ControlElementFlags, void *); + virtual void unPolish(TQWidget *); + virtual void unPolish(TQStyleControlElementData ceData, ControlElementFlags, void *); virtual void polish(TQApplication *); + virtual void applicationPolish(TQStyleControlElementData, ControlElementFlags, void *); + virtual void unPolish(TQApplication *); + virtual void applicationUnPolish(TQStyleControlElementData, ControlElementFlags, void *); virtual void polish(TQPalette &); %If (TQt_3_0_0 -) virtual void polishPopupMenu(TQPopupMenu *) = 0; + virtual void polishPopupMenu(TQStyleControlElementData, ControlElementFlags, void *) = 0; %End %If (- TQt_3_0_0) @@ -843,6 +911,141 @@ public: static TQRect visualRect(const TQRect &,const TQRect &); %End + // New API + virtual void drawPrimitive( PrimitiveElement, + TQPainter*, + TQStyleControlElementData, + ControlElementFlags, + const TQRect&, + const TQColorGroup&, + SFlags = Style_Default, + const TQStyleOption& = TQStyleOption::Default ) const = 0; + + virtual void drawControl( ControlElement element, + TQPainter*, + TQStyleControlElementData, + ControlElementFlags, + const TQRect&, + const TQColorGroup&, + SFlags how = Style_Default, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget* = 0 /* compat, will likely go away */ ) const = 0; + + virtual void drawControlMask( ControlElement element, + TQPainter*, + TQStyleControlElementData, + ControlElementFlags, + const TQRect&, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget* = 0 /* compat, will likely go away */ ) const = 0; + + virtual TQRect subRect( SubRect, const TQStyleControlElementData, const ControlElementFlags, const TQWidget* ) const = 0; + + virtual void drawComplexControl( ComplexControl, + TQPainter*, + TQStyleControlElementData, + ControlElementFlags, + const TQRect&, + const TQColorGroup&, + SFlags = Style_Default, + SCFlags = SC_All, + SCFlags = SC_None, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget* = 0 ) const = 0; + + virtual void drawComplexControlMask( ComplexControl, + TQPainter*, + const TQStyleControlElementData, + const ControlElementFlags, + const TQRect&, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget* = 0 ) const = 0; + + virtual TQRect querySubControlMetrics( ComplexControl, + TQStyleControlElementData, + ControlElementFlags, + SubControl, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget* = 0 ) const = 0; + + virtual SubControl querySubControl( ComplexControl, + TQStyleControlElementData, + ControlElementFlags, + const TQPoint&, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget* = 0 ) const = 0; + + virtual int pixelMetric( PixelMetric, + TQStyleControlElementData, + ControlElementFlags, + const TQWidget* = 0 ) const = 0; + + virtual TQSize sizeFromContents( ContentsType, + TQStyleControlElementData, + ControlElementFlags, + const TQSize&, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget* = 0 ) const = 0; + + virtual int styleHint( StyleHint, + TQStyleControlElementData, + ControlElementFlags, + const TQStyleOption& = TQStyleOption::Default, + TQStyleHintReturn* returnData = 0, + const TQWidget* = 0 + ) const = 0; + + virtual TQPixmap stylePixmap( StylePixmap, + TQStyleControlElementData, + ControlElementFlags, + const TQStyleOption& = TQStyleOption::Default, + const TQWidget* = 0 ) const = 0; + + static TQRect visualRect( const TQRect&, const TQStyleControlElementData, const ControlElementFlags ); + + typedef TQMap<void*, TQStyle*> ObjectEventSourceToHandlerMap; + typedef TQMap<void*, TQStyleControlElementData> ObjectEventSourceDataToHandlerMap; + typedef TQMap<void*, ControlElementFlags> ObjectEventSourceFlagsToHandlerMap; + typedef bool (*EventHandlerInstallationHook)(TQStyleControlElementData, ControlElementFlags, void*, TQStyle*); + typedef bool (*EventHandlerRemovalHook)(TQStyleControlElementData, ControlElementFlags, void*, TQStyle*); + void installObjectEventHandler( TQStyleControlElementData, ControlElementFlags, void*, TQStyle* ); + void removeObjectEventHandler( TQStyleControlElementData, ControlElementFlags, void*, TQStyle* ); + //void setEventHandlerInstallationHook( EventHandlerInstallationHook ); + //void setEventHandlerRemovalHook( EventHandlerRemovalHook hook ); + virtual bool objectEventHandler( TQStyleControlElementData, ControlElementFlags, void*, TQEvent * ); + + enum WidgetActionRequest { + WAR_Repaint, + WAR_RepaintRect, + WAR_EnableMouseTracking, + WAR_DisableMouseTracking, + WAR_SetAutoMask, + WAR_UnSetAutoMask, + WAR_SetCheckable, + WAR_UnSetCheckable, + WAR_FrameSetStyle, + WAR_FrameSetLineWidth, + WAR_SetLayoutMargin, + WAR_SetPalette, + WAR_SetBackgroundMode, + WAR_SetBackgroundOrigin, + WAR_SetFont, + WAR_RepaintAllAccelerators + }; + + typedef bool (*WidgetActionRequestHook)(TQStyleControlElementData, ControlElementFlags, void*, WidgetActionRequest, TQStyleWidgetActionRequestData); + //void setWidgetActionRequestHook( WidgetActionRequestHook ); + virtual bool widgetActionRequest( TQStyleControlElementData, ControlElementFlags, void*, WidgetActionRequest, TQStyleWidgetActionRequestData = TQStyleWidgetActionRequestData() ); + + enum ApplicationActionRequest { + AAR_SetPalette, + AAR_SetFont + }; + + typedef bool (*ApplicationActionRequestHook)(TQStyleControlElementData, ControlElementFlags, void*, ApplicationActionRequest, TQStyleApplicationActionRequestData); + //void setApplicationActionRequestHook( ApplicationActionRequestHook ); + virtual bool applicationActionRequest( TQStyleControlElementData, ControlElementFlags, void*, ApplicationActionRequest, TQStyleApplicationActionRequestData = TQStyleApplicationActionRequestData() ); + protected: %If (TQt_2_1_0 - TQt_3_0_0) void setScrollBarExtent(int,int = -1); diff --git a/sip/qt/qwindowsstyle.sip b/sip/qt/qwindowsstyle.sip index d6ed9eb..cdf7b40 100644 --- a/sip/qt/qwindowsstyle.sip +++ b/sip/qt/qwindowsstyle.sip @@ -76,13 +76,15 @@ public: TQWindowsStyle(); %If (TQt_3_3_0 -) - void polish(TQApplication *); - void unPolish(TQApplication *); + void applicationPolish(TQStyleControlElementData, ControlElementFlags, void *); + void applicationUnPolish(TQStyleControlElementData, ControlElementFlags, void *); - void polish(TQWidget *); - void unPolish(TQWidget *); + void polish(TQStyleControlElementData, ControlElementFlags, void *); + void unPolish(TQStyleControlElementData, ControlElementFlags, void *); - void polish(TQPalette &); + void polish( TQPalette & ); + + virtual void polishPopupMenu( TQStyleControlElementData, ControlElementFlags, void * ); %End %If (- TQt_3_0_0) @@ -140,39 +142,37 @@ public: void drawPopupMenuItem(TQPainter *,bool,int,int,TQMenuItem *, const TQPalette &,bool,bool,int,int,int,int); %End -%If (TQt_3_0_0 -) - virtual void polishPopupMenu(TQPopupMenu *); - - void drawPrimitive(PrimitiveElement,TQPainter *,const TQRect &, +%If (TQt_3_0_0 -) + void drawPrimitive(PrimitiveElement,TQPainter *,TQStyleControlElementData,ControlElementFlags,const TQRect &, const TQColorGroup &,SFlags = Style_Default, const TQStyleOption & = TQStyleOption()) const; - void drawControl(ControlElement,TQPainter *,const TQWidget *, + void drawControl(ControlElement,TQPainter *,TQStyleControlElementData,ControlElementFlags, const TQRect &,const TQColorGroup &, SFlags = Style_Default, - const TQStyleOption & = TQStyleOption()) const; + const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const; - void drawComplexControl(ComplexControl,TQPainter *,const TQWidget *, + void drawComplexControl(ComplexControl,TQPainter *,TQStyleControlElementData,ControlElementFlags, const TQRect &,const TQColorGroup &, SFlags = Style_Default,SCFlags = SC_All, SCFlags = SC_None, - const TQStyleOption & = TQStyleOption()) const; + const TQStyleOption & = TQStyleOption(),const TQWidget *=0) const; - int pixelMetric(PixelMetric,const TQWidget * = 0) const; + int pixelMetric(PixelMetric,TQStyleControlElementData,ControlElementFlags,const TQWidget * = 0) const; - TQSize sizeFromContents(ContentsType,const TQWidget *,const TQSize &, - const TQStyleOption & = TQStyleOption()) const; + TQSize sizeFromContents(ContentsType,TQStyleControlElementData,ControlElementFlags,const TQSize &, + const TQStyleOption & = TQStyleOption(),const TQWidget *=0) const; - int styleHint(StyleHint,const TQWidget *, + int styleHint(StyleHint,TQStyleControlElementData,ControlElementFlags, const TQStyleOption & = TQStyleOption(), - TQStyleHintReturn * = 0) const; + TQStyleHintReturn * = 0, const TQWidget * = 0) const; - TQPixmap stylePixmap(StylePixmap,const TQWidget * = 0, - const TQStyleOption & = TQStyleOption()) const; + TQPixmap stylePixmap(StylePixmap,TQStyleControlElementData,ControlElementFlags, + const TQStyleOption & = TQStyleOption(), const TQWidget * = 0) const; %End %If (TQt_3_1_0 -) - TQRect subRect(SubRect,const TQWidget *) const; + TQRect subRect(SubRect,const TQStyleControlElementData, const ControlElementFlags,const TQWidget *) const; %End protected: |