summaryrefslogtreecommitdiffstats
path: root/src/kernel/ntqstyle.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/ntqstyle.h')
-rw-r--r--src/kernel/ntqstyle.h76
1 files changed, 40 insertions, 36 deletions
diff --git a/src/kernel/ntqstyle.h b/src/kernel/ntqstyle.h
index 3e59bc027..bee3bd207 100644
--- a/src/kernel/ntqstyle.h
+++ b/src/kernel/ntqstyle.h
@@ -228,6 +228,10 @@ class TQStyleControlElementTabBarData {
class Q_EXPORT TQStyleControlElementData {
public:
+ TQStyleControlElementData();
+
+ public:
+ bool isNull;
TQStringList widgetObjectTypes;
bool allDataPopulated;
TQt::WFlags wflags;
@@ -286,9 +290,6 @@ class Q_EXPORT TQStyleControlElementData {
TQString caption;
TQStyleControlElementGenericWidgetData topLevelWidgetData;
TQ_UINT32 topLevelWidgetFlags;
-
- public:
- TQStyleControlElementData();
};
class Q_EXPORT TQStyleWidgetActionRequestData {
@@ -360,28 +361,28 @@ public:
virtual void polish( TQWidget * );
// New API
- virtual void polish( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void * );
+ virtual void polish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * );
// Old API
// DEPRECATED
virtual void unPolish( TQWidget * );
// New API
- virtual void unPolish( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void * );
+ virtual void unPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * );
// Old API
// DEPRECATED
virtual void polish( TQApplication * );
// New API
- virtual void applicationPolish( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void * );
+ virtual void applicationPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * );
// Old API
// DEPRECATED
virtual void unPolish( TQApplication * );
// New API
- virtual void applicationUnPolish( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void * );
+ virtual void applicationUnPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * );
virtual void polish( TQPalette & );
@@ -390,7 +391,7 @@ public:
virtual void polishPopupMenu( TQPopupMenu* );
// New API
- virtual void polishPopupMenu( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void * ) = 0;
+ virtual void polishPopupMenu( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void * ) = 0;
virtual TQRect itemRect( TQPainter *p, const TQRect &r,
int flags, bool enabled,
@@ -521,7 +522,7 @@ public:
// New API
virtual void drawPrimitive( PrimitiveElement pe,
TQPainter *p,
- TQStyleControlElementData ceData,
+ const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
@@ -576,7 +577,7 @@ public:
// New API
virtual void drawControl( ControlElement element,
TQPainter *p,
- TQStyleControlElementData ceData,
+ const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
@@ -595,7 +596,7 @@ public:
// New API
virtual void drawControlMask( ControlElement element,
TQPainter *p,
- TQStyleControlElementData ceData,
+ const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQStyleOption& = TQStyleOption::Default,
@@ -646,7 +647,7 @@ public:
virtual TQRect subRect( SubRect r, const TQWidget *widget ) const;
// New API
- virtual TQRect subRect( SubRect r, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags, const TQWidget *widget ) const = 0;
+ virtual TQRect subRect( SubRect r, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget *widget ) const = 0;
enum ComplexControl{
@@ -728,7 +729,7 @@ public:
virtual void drawComplexControl( ComplexControl control,
TQPainter *p,
- TQStyleControlElementData ceData,
+ const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQRect &r,
const TQColorGroup &cg,
@@ -753,7 +754,7 @@ public:
// New API
virtual void drawComplexControlMask( ComplexControl control,
TQPainter *p,
- const TQStyleControlElementData ceData,
+ const TQStyleControlElementData &ceData,
const ControlElementFlags elementFlags,
const TQRect &r,
const TQStyleOption& = TQStyleOption::Default,
@@ -768,7 +769,7 @@ public:
// New API
virtual TQRect querySubControlMetrics( ComplexControl control,
- TQStyleControlElementData ceData,
+ const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
SubControl sc,
const TQStyleOption& = TQStyleOption::Default,
@@ -783,7 +784,7 @@ public:
// New API
virtual SubControl querySubControl( ComplexControl control,
- TQStyleControlElementData ceData,
+ const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQPoint &pos,
const TQStyleOption& = TQStyleOption::Default,
@@ -872,7 +873,7 @@ public:
// New API
virtual int pixelMetric( PixelMetric metric,
- TQStyleControlElementData ceData,
+ const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQWidget *widget = 0 ) const = 0;
@@ -909,7 +910,7 @@ public:
const TQStyleOption& = TQStyleOption::Default ) const;
virtual TQSize sizeFromContents( ContentsType contents,
- TQStyleControlElementData ceData,
+ const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQSize &contentsSize,
const TQStyleOption& = TQStyleOption::Default,
@@ -1083,7 +1084,7 @@ public:
// New API
virtual int styleHint( StyleHint stylehint,
- TQStyleControlElementData ceData,
+ const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQStyleOption& = TQStyleOption::Default,
TQStyleHintReturn* returnData = 0,
@@ -1115,7 +1116,7 @@ public:
const TQStyleOption& = TQStyleOption::Default ) const;
virtual TQPixmap stylePixmap( StylePixmap stylepixmap,
- TQStyleControlElementData ceData,
+ const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags,
const TQStyleOption& = TQStyleOption::Default,
const TQWidget *widget = 0 ) const = 0;
@@ -1126,7 +1127,7 @@ public:
static TQRect visualRect( const TQRect &logical, const TQWidget *w );
// New API
- static TQRect visualRect( const TQRect &logical, const TQStyleControlElementData ceData, const ControlElementFlags elementFlags );
+ static TQRect visualRect( const TQRect &logical, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags );
static TQRect visualRect( const TQRect &logical, const TQRect &bounding );
@@ -1135,13 +1136,13 @@ public:
typedef TQMap<void*, TQStyle*> ObjectEventSourceToHandlerMap;
typedef TQMap<void*, TQStyleControlElementData> ObjectEventSourceDataToHandlerMap;
typedef TQMap<void*, ControlElementFlags> ObjectEventSourceFlagsToHandlerMap;
- typedef bool (*EventHandlerInstallationHook)(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler);
- typedef bool (*EventHandlerRemovalHook)(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler);
- void installObjectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler );
- void removeObjectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler );
+ typedef bool (*EventHandlerInstallationHook)(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler);
+ typedef bool (*EventHandlerRemovalHook)(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler);
+ void installObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler );
+ void removeObjectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQStyle* handler );
void setEventHandlerInstallationHook( EventHandlerInstallationHook );
void setEventHandlerRemovalHook( EventHandlerRemovalHook hook );
- virtual bool objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *e );
+ virtual bool objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e );
enum WidgetActionRequest {
WAR_Repaint,
@@ -1165,37 +1166,40 @@ public:
WAR_SendPaintEvent
};
- typedef bool (*WidgetActionRequestHook)(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request, TQStyleWidgetActionRequestData requestData);
+ typedef bool (*WidgetActionRequestHook)(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request, TQStyleWidgetActionRequestData requestData);
void setWidgetActionRequestHook( WidgetActionRequestHook );
- virtual bool widgetActionRequest( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request, TQStyleWidgetActionRequestData requestData = TQStyleWidgetActionRequestData() );
+ virtual bool widgetActionRequest( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request, TQStyleWidgetActionRequestData requestData = TQStyleWidgetActionRequestData() );
enum ApplicationActionRequest {
AAR_SetPalette,
AAR_SetFont
};
- typedef bool (*ApplicationActionRequestHook)(TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request, TQStyleApplicationActionRequestData requestData);
+ typedef bool (*ApplicationActionRequestHook)(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request, TQStyleApplicationActionRequestData requestData);
void setApplicationActionRequestHook( ApplicationActionRequestHook );
- virtual bool applicationActionRequest( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request, TQStyleApplicationActionRequestData requestData = TQStyleApplicationActionRequestData() );
+ virtual bool applicationActionRequest( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request, TQStyleApplicationActionRequestData requestData = TQStyleApplicationActionRequestData() );
// Old 2.x TQStyle API
#ifndef QT_NO_COMPAT
int defaultFrameWidth() const
{
- return pixelMetric( PM_DefaultFrameWidth, TQStyleControlElementData(), CEF_None );
+ TQStyleControlElementData ceData;
+ return pixelMetric( PM_DefaultFrameWidth, ceData, CEF_None );
}
void tabbarMetrics( const TQWidget* t,
int& hf, int& vf, int& ov ) const
{
- hf = pixelMetric( PM_TabBarTabHSpace, TQStyleControlElementData(), CEF_None, t );
- vf = pixelMetric( PM_TabBarTabVSpace, TQStyleControlElementData(), CEF_None, t );
- ov = pixelMetric( PM_TabBarBaseOverlap, TQStyleControlElementData(), CEF_None, t );
+ TQStyleControlElementData ceData;
+ hf = pixelMetric( PM_TabBarTabHSpace, ceData, CEF_None, t );
+ vf = pixelMetric( PM_TabBarTabVSpace, ceData, CEF_None, t );
+ ov = pixelMetric( PM_TabBarBaseOverlap, ceData, CEF_None, t );
}
TQSize scrollBarExtent() const
{
- return TQSize(pixelMetric(PM_ScrollBarExtent, TQStyleControlElementData(), CEF_None),
- pixelMetric(PM_ScrollBarExtent, TQStyleControlElementData(), CEF_None));
+ TQStyleControlElementData ceData;
+ return TQSize(pixelMetric(PM_ScrollBarExtent, ceData, CEF_None),
+ pixelMetric(PM_ScrollBarExtent, ceData, CEF_None));
}
#endif