summaryrefslogtreecommitdiffstats
path: root/src/kernel/qstyle.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/qstyle.h')
-rw-r--r--src/kernel/qstyle.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/kernel/qstyle.h b/src/kernel/qstyle.h
index c99fb78..2d76d09 100644
--- a/src/kernel/qstyle.h
+++ b/src/kernel/qstyle.h
@@ -257,18 +257,24 @@ class Q_EXPORT QStyleWidgetActionRequestData {
public:
QStyleWidgetActionRequestData();
QStyleWidgetActionRequestData(int metric1, int metric2=0);
- QStyleWidgetActionRequestData(QPalette palette);
- QStyleWidgetActionRequestData(QFont font);
+ QStyleWidgetActionRequestData(QPalette palette, bool informWidgets = FALSE, const char* className = 0);
+ QStyleWidgetActionRequestData(QFont font, bool informWidgets = FALSE, const char* className = 0);
QStyleWidgetActionRequestData(QRect rect);
~QStyleWidgetActionRequestData();
public:
+ bool bool1;
+ bool bool2;
int metric1;
int metric2;
QPalette palette;
QFont font;
QRect rect;
+ const char * cstr;
+ QString string;
};
+typedef QStyleWidgetActionRequestData QStyleApplicationActionRequestData;
+
class Q_EXPORT QStyle: public QObject
{
Q_OBJECT
@@ -1077,6 +1083,8 @@ public:
WAR_RepaintRect,
WAR_EnableMouseTracking,
WAR_DisableMouseTracking,
+ WAR_SetAutoMask,
+ WAR_UnSetAutoMask,
WAR_SetCheckable,
WAR_UnSetCheckable,
WAR_FrameSetStyle,
@@ -1084,6 +1092,7 @@ public:
WAR_SetLayoutMargin,
WAR_SetPalette,
WAR_SetBackgroundMode,
+ WAR_SetBackgroundOrigin,
WAR_SetFont,
WAR_RepaintAllAccelerators
};
@@ -1092,6 +1101,15 @@ public:
void setWidgetActionRequestHook( WidgetActionRequestHook );
virtual bool widgetActionRequest( QStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request, QStyleWidgetActionRequestData requestData = QStyleWidgetActionRequestData() );
+ enum ApplicationActionRequest {
+ AAR_SetPalette,
+ AAR_SetFont
+ };
+
+ typedef bool (*ApplicationActionRequestHook)(QStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request, QStyleApplicationActionRequestData requestData);
+ void setApplicationActionRequestHook( ApplicationActionRequestHook );
+ virtual bool applicationActionRequest( QStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request, QStyleApplicationActionRequestData requestData = QStyleApplicationActionRequestData() );
+
// Old 2.x QStyle API
#ifndef QT_NO_COMPAT
@@ -1131,6 +1149,7 @@ private:
EventHandlerInstallationHook m_eventHandlerInstallationHook;
EventHandlerRemovalHook m_eventHandlerRemovalHook;
WidgetActionRequestHook m_widgetActionRequestHook;
+ ApplicationActionRequestHook m_applicationActionRequestHook;
ObjectEventSourceToHandlerMap m_objectEventSourceToHandlerMap;
ObjectEventSourceDataToHandlerMap m_objectEventSourceDataToHandlerMap;
ObjectEventSourceFlagsToHandlerMap m_objectEventSourceFlagsToHandlerMap;
@@ -1141,6 +1160,7 @@ inline QStyle::ControlElementFlags operator|(const QStyle::ControlElementFlags a
// inline QStyle::ControlElementFlags operator|=(QStyle::ControlElementFlags &a, const QStyle::ControlElementFlags b) { a = static_cast<QStyle::ControlElementFlags>(static_cast<int>(a) | static_cast<int>(b)); return a; }
Q_EXPORT QStyleControlElementData populateControlElementDataFromWidget(const QWidget* widget, const QStyleOption& opt, bool populateReliantFields=true);
+Q_EXPORT QStyleControlElementData populateControlElementDataFromApplication(const QApplication* app, const QStyleOption& opt, bool populateReliantFields=true);
Q_EXPORT QStyle::ControlElementFlags getControlElementFlagsForObject(const QObject* object, QStringList objectTypeList, const QStyleOption& opt, bool populateReliantFields=true);
Q_EXPORT QStringList getObjectTypeListForObject(const QObject* object);