Update to the new style API

pull/1/head
Timothy Pearson 12 years ago
parent e2c83be461
commit 4b78cab44f

@ -51,14 +51,14 @@ public:
const TQColorGroup &,bool,bool = 0,bool = 1); const TQColorGroup &,bool,bool = 0,bool = 1);
%End %End
%If (TQt_3_0_0 -) %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 &, const TQRect &,const TQColorGroup &,
SFlags = Style_Default, 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 TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption()) const;
%End %End

@ -79,48 +79,48 @@ public:
%If (TQt_3_0_0 -) %If (TQt_3_0_0 -)
TQCommonStyle(); TQCommonStyle();
void drawPrimitive(PrimitiveElement,TQPainter *,const TQRect &, void drawPrimitive(PrimitiveElement,TQPainter *,TQStyleControlElementData,ControlElementFlags,const TQRect &,
const TQColorGroup &,SFlags = Style_Default, const TQColorGroup &,SFlags = Style_Default,
const TQStyleOption& = TQStyleOption()) const; const TQStyleOption& = TQStyleOption()) const;
void drawControl(ControlElement,TQPainter *,const TQWidget *, void drawControl(ControlElement,TQPainter *,TQStyleControlElementData,ControlElementFlags,
const TQRect &,const TQColorGroup &, const TQRect &,const TQColorGroup &,
SFlags = Style_Default, 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 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 &, const TQRect &,const TQColorGroup &,
SFlags = Style_Default,SCFlags = SC_All, SFlags = Style_Default,SCFlags = SC_All,
SCFlags = SC_None, 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 TQRect &,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const;
TQRect querySubControlMetrics(ComplexControl,const TQWidget *,SubControl, TQRect querySubControlMetrics(ComplexControl,TQStyleControlElementData,ControlElementFlags,SubControl,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const;
SubControl querySubControl(ComplexControl,const TQWidget *, SubControl querySubControl(ComplexControl,TQStyleControlElementData,ControlElementFlags,
const TQPoint &, 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 &, TQSize sizeFromContents(ContentsType,TQStyleControlElementData,ControlElementFlags,const TQSize &,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption(),const TQWidget *=0) const;
int styleHint(StyleHint,const TQWidget *,const TQStyleOption &, int styleHint(StyleHint,TQStyleControlElementData,ControlElementFlags,const TQStyleOption &,
TQStyleHintReturn *) const; TQStyleHintReturn *,const TQWidget *=0) const;
TQPixmap stylePixmap(StylePixmap,const TQWidget * = 0, TQPixmap stylePixmap(StylePixmap,TQStyleControlElementData,ControlElementFlags,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption(), const TQWidget * = 0) const;
%End %End

@ -67,15 +67,14 @@ public:
TQMotifPlusStyle(bool = 1); TQMotifPlusStyle(bool = 1);
%End %End
void polish(TQPalette &); void polish(TQPalette &pal);
void polish(TQWidget *); void polish(TQStyleControlElementData, ControlElementFlags, void *);
void unPolish(TQWidget *); void unPolish(TQStyleControlElementData, ControlElementFlags, void *);
void polish(TQApplication *); void applicationPolish(TQStyleControlElementData, ControlElementFlags, void *);
void unPolish(TQApplication *); void applicationUnPolish(TQStyleControlElementData, ControlElementFlags, void *);
%If (- TQt_3_0_0) %If (- TQt_3_0_0)
void polishPopupMenu(TQPopupMenu *);
int defaultFrameWidth() const; int defaultFrameWidth() const;
void drawArrow(TQPainter *,ArrowType,bool,int,int,int,int, void drawArrow(TQPainter *,ArrowType,bool,int,int,int,int,
const TQColorGroup &,bool,const TQBrush * = 0); const TQColorGroup &,bool,const TQBrush * = 0);
@ -114,32 +113,32 @@ public:
TQCOORD,Orientation); TQCOORD,Orientation);
%End %End
%If (TQt_3_0_0 -) %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 TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption()) const;
void drawControl(ControlElement,TQPainter *,const TQWidget *, void drawControl(ControlElement,TQPainter *,TQStyleControlElementData,ControlElementFlags,
const TQRect &,const TQColorGroup &, const TQRect &,const TQColorGroup &,
SFlags = Style_Default, 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 &, const TQRect &,const TQColorGroup &,
SFlags = Style_Default,SCFlags = SC_All, SFlags = Style_Default,SCFlags = SC_All,
SCFlags = SC_None, 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, 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(), const TQStyleOption & = TQStyleOption(),
TQStyleHintReturn * = 0) const; TQStyleHintReturn * = 0, const TQWidget * = 0) const;
%End %End
protected: protected:

@ -69,8 +69,10 @@ public:
bool useHighlightColors() const; bool useHighlightColors() const;
void polish( TQPalette& ); void polish( TQPalette& );
void polish(TQWidget *); void polish( TQStyleControlElementData, ControlElementFlags, void * );
void polish(TQApplication *); void applicationPolish( TQStyleControlElementData, ControlElementFlags, void * );
void polishPopupMenu( TQStyleControlElementData, ControlElementFlags, void * );
%If (- TQt_3_0_0) %If (- TQt_3_0_0)
void drawButton(TQPainter *,int,int,int,int,const TQColorGroup &,bool = 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); const TQPalette &,bool,bool,int,int,int,int);
%End %End
%If (TQt_3_0_0 -) %If (TQt_3_0_0 -)
void polishPopupMenu(TQPopupMenu *); void drawPrimitive(PrimitiveElement,TQPainter *,TQStyleControlElementData,ControlElementFlags,const TQRect &,
void drawPrimitive(PrimitiveElement,TQPainter *,const TQRect &,
const TQColorGroup &,SFlags = Style_Default, const TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption()) const;
void drawControl(ControlElement,TQPainter *,const TQWidget *, void drawControl(ControlElement,TQPainter *,TQStyleControlElementData,ControlElementFlags,
const TQRect &,const TQColorGroup &, const TQRect &,const TQColorGroup &,
SFlags = Style_Default, 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 &, const TQRect &,const TQColorGroup &,
SFlags = Style_Default,SCFlags = SC_All, SFlags = Style_Default,SCFlags = SC_All,
SCFlags = SC_None, SCFlags = SC_None,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption(),const TQWidget *=0) const;
TQRect querySubControlMetrics(ComplexControl,const TQWidget *,SubControl, 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;
TQSize sizeFromContents(ContentsType,const TQWidget *,const TQSize &, TQSize sizeFromContents(ContentsType,TQStyleControlElementData,ControlElementFlags,const TQSize &,
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;
TQPixmap stylePixmap(StylePixmap,const TQWidget * = 0, TQPixmap stylePixmap(StylePixmap,TQStyleControlElementData,ControlElementFlags,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption(), const TQWidget * = 0) const;
int styleHint(StyleHint,const TQWidget *, int styleHint(StyleHint,TQStyleControlElementData,ControlElementFlags,
const TQStyleOption & = TQStyleOption(), const TQStyleOption & = TQStyleOption(),
TQStyleHintReturn * = 0) const; TQStyleHintReturn * = 0, const TQWidget * = 0) const;
%End %End
private: private:

@ -94,27 +94,27 @@ public:
const TQPalette &,bool,bool,int,int,int,int); const TQPalette &,bool,bool,int,int,int,int);
%End %End
%If (TQt_3_0_0 -) %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 TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption()) const;
void drawControl(ControlElement,TQPainter *,const TQWidget *, void drawControl(ControlElement,TQPainter *,TQStyleControlElementData,ControlElementFlags,
const TQRect &,const TQColorGroup &, const TQRect &,const TQColorGroup &,
SFlags = Style_Default, 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 &, const TQRect &,const TQColorGroup &,
SFlags = Style_Default,SCFlags = SC_All, SFlags = Style_Default,SCFlags = SC_All,
SCFlags = SC_None, SCFlags = SC_None,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption(),const TQWidget *=0) const;
TQRect querySubControlMetrics(ComplexControl,const TQWidget *,SubControl, 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;
TQRect subRect(SubRect,const TQWidget *) const; TQRect subRect(SubRect,const TQStyleControlElementData, const ControlElementFlags,const TQWidget *) const;
%End %End
protected: protected:

@ -52,10 +52,10 @@ class TQSGIStyle : TQMotifStyle
public: public:
TQSGIStyle(bool = 0); TQSGIStyle(bool = 0);
void polish(TQWidget *); void polish( TQStyleControlElementData, ControlElementFlags, void * );
void unPolish(TQWidget *); void unPolish( TQStyleControlElementData, ControlElementFlags, void * );
void polish(TQApplication *); void applicationPolish( TQStyleControlElementData, ControlElementFlags, void * );
void unPolish(TQApplication *); void applicationUnPolish( TQStyleControlElementData, ControlElementFlags, void * );
%If (- TQt_3_0_0) %If (- TQt_3_0_0)
void polish(TQPalette &); void polish(TQPalette &);
@ -119,31 +119,31 @@ public:
TQColorGroup &,bool,bool); TQColorGroup &,bool,bool);
%End %End
%If (TQt_3_0_0 -) %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 TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption()) const;
void drawControl(ControlElement,TQPainter *,const TQWidget *, void drawControl(ControlElement,TQPainter *,TQStyleControlElementData,ControlElementFlags,
const TQRect &,const TQColorGroup &, const TQRect &,const TQColorGroup &,
SFlags = Style_Default, 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 &, const TQRect &,const TQColorGroup &,
SFlags = Style_Default,SCFlags = SC_All, SFlags = Style_Default,SCFlags = SC_All,
SCFlags = SC_None, 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 &, TQSize sizeFromContents(ContentsType,TQStyleControlElementData,ControlElementFlags,const TQSize &,
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;
TQRect querySubControlMetrics(ComplexControl,const TQWidget *, TQRect querySubControlMetrics(ComplexControl,TQStyleControlElementData,ControlElementFlags,
SubControl, SubControl,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption(), const TQWidget *=0) const;
%End %End
protected: protected:

@ -146,6 +146,39 @@ public:
class TQStyleHintReturn; class TQStyleHintReturn;
%End %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 -) %If (TQt_2_00 -)
@ -164,16 +197,51 @@ public:
GUIStyle guiStyle() const; GUIStyle guiStyle() const;
%End %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(TQWidget *);
virtual void polish(TQStyleControlElementData ceData, ControlElementFlags, void *);
virtual void unPolish(TQWidget *); virtual void unPolish(TQWidget *);
virtual void unPolish(TQStyleControlElementData ceData, ControlElementFlags, void *);
virtual void polish(TQApplication *); virtual void polish(TQApplication *);
virtual void applicationPolish(TQStyleControlElementData, ControlElementFlags, void *);
virtual void unPolish(TQApplication *); virtual void unPolish(TQApplication *);
virtual void applicationUnPolish(TQStyleControlElementData, ControlElementFlags, void *);
virtual void polish(TQPalette &); virtual void polish(TQPalette &);
%If (TQt_3_0_0 -) %If (TQt_3_0_0 -)
virtual void polishPopupMenu(TQPopupMenu *) = 0; virtual void polishPopupMenu(TQPopupMenu *) = 0;
virtual void polishPopupMenu(TQStyleControlElementData, ControlElementFlags, void *) = 0;
%End %End
%If (- TQt_3_0_0) %If (- TQt_3_0_0)
@ -843,6 +911,141 @@ public:
static TQRect visualRect(const TQRect &,const TQRect &); static TQRect visualRect(const TQRect &,const TQRect &);
%End %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: protected:
%If (TQt_2_1_0 - TQt_3_0_0) %If (TQt_2_1_0 - TQt_3_0_0)
void setScrollBarExtent(int,int = -1); void setScrollBarExtent(int,int = -1);

@ -76,13 +76,15 @@ public:
TQWindowsStyle(); TQWindowsStyle();
%If (TQt_3_3_0 -) %If (TQt_3_3_0 -)
void polish(TQApplication *); void applicationPolish(TQStyleControlElementData, ControlElementFlags, void *);
void unPolish(TQApplication *); void applicationUnPolish(TQStyleControlElementData, ControlElementFlags, void *);
void polish(TQWidget *); void polish(TQStyleControlElementData, ControlElementFlags, void *);
void unPolish(TQWidget *); void unPolish(TQStyleControlElementData, ControlElementFlags, void *);
void polish( TQPalette & ); void polish( TQPalette & );
virtual void polishPopupMenu( TQStyleControlElementData, ControlElementFlags, void * );
%End %End
%If (- TQt_3_0_0) %If (- TQt_3_0_0)
@ -141,38 +143,36 @@ public:
const TQPalette &,bool,bool,int,int,int,int); const TQPalette &,bool,bool,int,int,int,int);
%End %End
%If (TQt_3_0_0 -) %If (TQt_3_0_0 -)
virtual void polishPopupMenu(TQPopupMenu *); void drawPrimitive(PrimitiveElement,TQPainter *,TQStyleControlElementData,ControlElementFlags,const TQRect &,
void drawPrimitive(PrimitiveElement,TQPainter *,const TQRect &,
const TQColorGroup &,SFlags = Style_Default, const TQColorGroup &,SFlags = Style_Default,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption()) const;
void drawControl(ControlElement,TQPainter *,const TQWidget *, void drawControl(ControlElement,TQPainter *,TQStyleControlElementData,ControlElementFlags,
const TQRect &,const TQColorGroup &, const TQRect &,const TQColorGroup &,
SFlags = Style_Default, 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 &, const TQRect &,const TQColorGroup &,
SFlags = Style_Default,SCFlags = SC_All, SFlags = Style_Default,SCFlags = SC_All,
SCFlags = SC_None, 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 &, TQSize sizeFromContents(ContentsType,TQStyleControlElementData,ControlElementFlags,const TQSize &,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption(),const TQWidget *=0) const;
int styleHint(StyleHint,const TQWidget *, int styleHint(StyleHint,TQStyleControlElementData,ControlElementFlags,
const TQStyleOption & = TQStyleOption(), const TQStyleOption & = TQStyleOption(),
TQStyleHintReturn * = 0) const; TQStyleHintReturn * = 0, const TQWidget * = 0) const;
TQPixmap stylePixmap(StylePixmap,const TQWidget * = 0, TQPixmap stylePixmap(StylePixmap,TQStyleControlElementData,ControlElementFlags,
const TQStyleOption & = TQStyleOption()) const; const TQStyleOption & = TQStyleOption(), const TQWidget * = 0) const;
%End %End
%If (TQt_3_1_0 -) %If (TQt_3_1_0 -)
TQRect subRect(SubRect,const TQWidget *) const; TQRect subRect(SubRect,const TQStyleControlElementData, const ControlElementFlags,const TQWidget *) const;
%End %End
protected: protected:

Loading…
Cancel
Save