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.h72
1 files changed, 45 insertions, 27 deletions
diff --git a/src/kernel/qstyle.h b/src/kernel/qstyle.h
index bb2efbc..c99fb78 100644
--- a/src/kernel/qstyle.h
+++ b/src/kernel/qstyle.h
@@ -63,26 +63,26 @@ class QStyleOption {
public:
enum StyleOptionDefault { Default };
- QStyleOption(StyleOptionDefault=Default) : def(TRUE), tb(NULL) {}
+ QStyleOption(StyleOptionDefault=Default) : def(TRUE), tb(NULL), cli(NULL) {}
// Note: we don't use default arguments since that is unnecessary
// initialization.
QStyleOption(int in1) :
- def(FALSE), tb(NULL), i1(in1) {}
+ def(FALSE), tb(NULL), i1(in1), cli(NULL) {}
QStyleOption(int in1, int in2) :
- def(FALSE), tb(NULL), i1(in1), i2(in2) {}
+ def(FALSE), tb(NULL), i1(in1), i2(in2), cli(NULL) {}
QStyleOption(int in1, int in2, int in3, int in4) :
- def(FALSE), tb(NULL), i1(in1), i2(in2), i3(in3), i4(in4) {}
- QStyleOption(QMenuItem* m) : def(FALSE), mi(m), tb(NULL) {}
- QStyleOption(QMenuItem* m, int in1) : def(FALSE), mi(m), tb(NULL), i1(in1) {}
- QStyleOption(QMenuItem* m, int in1, int in2) : def(FALSE), mi(m), tb(NULL), i1(in1), i2(in2) {}
- QStyleOption(const QColor& c) : def(FALSE), tb(NULL), cl(&c) {}
- QStyleOption(QTab* t) : def(FALSE), tb(t) {}
- QStyleOption(QListViewItem* i) : def(FALSE), tb(NULL), li(i) {}
+ def(FALSE), tb(NULL), i1(in1), i2(in2), i3(in3), i4(in4), cli(NULL) {}
+ QStyleOption(QMenuItem* m) : def(FALSE), mi(m), tb(NULL), cli(NULL) {}
+ QStyleOption(QMenuItem* m, int in1) : def(FALSE), mi(m), tb(NULL), i1(in1), cli(NULL) {}
+ QStyleOption(QMenuItem* m, int in1, int in2) : def(FALSE), mi(m), tb(NULL), i1(in1), i2(in2), cli(NULL) {}
+ QStyleOption(const QColor& c) : def(FALSE), tb(NULL), cl(&c), cli(NULL) {}
+ QStyleOption(QTab* t) : def(FALSE), tb(t), cli(NULL) {}
+ QStyleOption(QListViewItem* i) : def(FALSE), tb(NULL), li(i), cli(NULL) {}
QStyleOption(QCheckListItem* i) : def(FALSE), tb(NULL), cli(i) {}
- QStyleOption(Qt::ArrowType a) : def(FALSE), tb(NULL), i1((int)a) {}
- QStyleOption(const QRect& r) : def(FALSE), tb(NULL), i1(r.x()), i2(r.y()), i3(r.width()),i4(r.height()){}
- QStyleOption(QWidget *w) : def(FALSE), tb(NULL), p1((void*)w) {}
+ QStyleOption(Qt::ArrowType a) : def(FALSE), tb(NULL), i1((int)a), cli(NULL) {}
+ QStyleOption(const QRect& r) : def(FALSE), tb(NULL), i1(r.x()), i2(r.y()), i3(r.width()), i4(r.height()), cli(NULL) {}
+ QStyleOption(QWidget *w) : def(FALSE), tb(NULL), cli(NULL), p1((void*)w) {}
bool isDefault() const { return def; }
@@ -134,6 +134,14 @@ class QStyleControlElementPopupMenuData {
//
};
+class QStyleControlElementCheckListItemData {
+ public:
+ bool dataValid;
+ bool enabled;
+ bool hasParent;
+ int height;
+};
+
class QStyleControlElementTabBarData {
public:
int tabCount;
@@ -176,6 +184,7 @@ class QStyleControlElementGenericWidgetData {
QStringList widgetObjectTypes;
bool allDataPopulated;
Qt::WFlags wflags;
+ Qt::WindowState windowState;
QPixmap bgPixmap;
QBrush bgBrush;
QColor bgColor;
@@ -196,6 +205,7 @@ class QStyleControlElementData {
QStringList widgetObjectTypes;
bool allDataPopulated;
Qt::WFlags wflags;
+ Qt::WindowState windowState;
QPixmap bgPixmap;
QBrush bgBrush;
QColor bgColor;
@@ -237,12 +247,13 @@ class QStyleControlElementData {
QStyleControlElementGenericWidgetData viewportData;
QStyleControlElementListViewData listViewData;
QStyleControlElementTabBarData tabBarData;
+ QStyleControlElementCheckListItemData checkListItemData;
Q_UINT32 comboBoxLineEditFlags;
Q_UINT32 frameStyle;
QRect sliderRect;
};
-class QStyleWidgetActionRequestData {
+class Q_EXPORT QStyleWidgetActionRequestData {
public:
QStyleWidgetActionRequestData();
QStyleWidgetActionRequestData(int metric1, int metric2=0);
@@ -326,7 +337,12 @@ public:
virtual void polish( QPalette & );
- virtual void polishPopupMenu( QPopupMenu* ) = 0;
+ // Old API
+ // DEPRECATED
+ virtual void polishPopupMenu( QPopupMenu* );
+
+ // New API
+ virtual void polishPopupMenu( QStyleControlElementData ceData, ControlElementFlags elementFlags, void * ) = 0;
virtual QRect itemRect( QPainter *p, const QRect &r,
int flags, bool enabled,
@@ -445,7 +461,7 @@ public:
const QRect &r,
const QColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const = 0;
+ const QStyleOption& = QStyleOption::Default ) const;
// New API
virtual void drawPrimitive( PrimitiveElement pe,
@@ -500,7 +516,7 @@ public:
const QRect &r,
const QColorGroup &cg,
SFlags how = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const = 0;
+ const QStyleOption& = QStyleOption::Default ) const;
// New API
virtual void drawControl( ControlElement element,
@@ -519,7 +535,7 @@ public:
QPainter *p,
const QWidget *widget,
const QRect &r,
- const QStyleOption& = QStyleOption::Default ) const = 0;
+ const QStyleOption& = QStyleOption::Default ) const;
// New API
virtual void drawControlMask( ControlElement element,
@@ -572,7 +588,7 @@ public:
// Old API
// DEPRECATED
- virtual QRect subRect( SubRect r, const QWidget *widget ) const = 0;
+ virtual QRect subRect( SubRect r, const QWidget *widget ) const;
// New API
virtual QRect subRect( SubRect r, const QStyleControlElementData ceData, const ControlElementFlags elementFlags, const QWidget *widget ) const = 0;
@@ -653,7 +669,7 @@ public:
SCFlags sub = (uint)SC_All,
#endif
SCFlags subActive = SC_None,
- const QStyleOption& = QStyleOption::Default ) const = 0;
+ const QStyleOption& = QStyleOption::Default ) const;
virtual void drawComplexControl( ComplexControl control,
QPainter *p,
@@ -677,7 +693,7 @@ public:
QPainter *p,
const QWidget *widget,
const QRect &r,
- const QStyleOption& = QStyleOption::Default ) const = 0;
+ const QStyleOption& = QStyleOption::Default ) const;
// New API
virtual void drawComplexControlMask( ComplexControl control,
@@ -693,7 +709,7 @@ public:
virtual QRect querySubControlMetrics( ComplexControl control,
const QWidget *widget,
SubControl sc,
- const QStyleOption& = QStyleOption::Default ) const = 0;
+ const QStyleOption& = QStyleOption::Default ) const;
// New API
virtual QRect querySubControlMetrics( ComplexControl control,
@@ -708,7 +724,7 @@ public:
virtual SubControl querySubControl( ComplexControl control,
const QWidget *widget,
const QPoint &pos,
- const QStyleOption& = QStyleOption::Default ) const = 0;
+ const QStyleOption& = QStyleOption::Default ) const;
// New API
virtual SubControl querySubControl( ComplexControl control,
@@ -790,7 +806,7 @@ public:
// Old API
// DEPRECATED
virtual int pixelMetric( PixelMetric metric,
- const QWidget *widget = 0 ) const = 0;
+ const QWidget *widget = 0 ) const;
// New API
virtual int pixelMetric( PixelMetric metric,
@@ -828,7 +844,7 @@ public:
virtual QSize sizeFromContents( ContentsType contents,
const QWidget *widget,
const QSize &contentsSize,
- const QStyleOption& = QStyleOption::Default ) const = 0;
+ const QStyleOption& = QStyleOption::Default ) const;
virtual QSize sizeFromContents( ContentsType contents,
QStyleControlElementData ceData,
@@ -992,7 +1008,7 @@ public:
const QWidget *widget = 0,
const QStyleOption& = QStyleOption::Default,
QStyleHintReturn* returnData = 0
- ) const = 0;
+ ) const;
// New API
virtual int styleHint( StyleHint stylehint,
@@ -1025,7 +1041,7 @@ public:
// DEPRECATED
virtual QPixmap stylePixmap( StylePixmap stylepixmap,
const QWidget *widget = 0,
- const QStyleOption& = QStyleOption::Default ) const = 0;
+ const QStyleOption& = QStyleOption::Default ) const;
virtual QPixmap stylePixmap( StylePixmap stylepixmap,
QStyleControlElementData ceData,
@@ -1061,6 +1077,8 @@ public:
WAR_RepaintRect,
WAR_EnableMouseTracking,
WAR_DisableMouseTracking,
+ WAR_SetCheckable,
+ WAR_UnSetCheckable,
WAR_FrameSetStyle,
WAR_FrameSetLineWidth,
WAR_SetLayoutMargin,