summaryrefslogtreecommitdiffstats
path: root/src/kernel/qstyle.h
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-16 15:39:47 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-16 15:39:47 -0500
commitf209ff4b488f2ea3fa39bbed57dbbb8fe0162a3b (patch)
treeb046beab59eda48afdbdb4ee3e9ae60881114b87 /src/kernel/qstyle.h
parent4f8eb0410d666d41ccbc39b2bf5dea336af5c26c (diff)
downloadqt3-f209ff4b488f2ea3fa39bbed57dbbb8fe0162a3b.tar.gz
qt3-f209ff4b488f2ea3fa39bbed57dbbb8fe0162a3b.zip
Move hover widget code into the Qt core instead of the styles
This more closely matches other widget toolkits such as GTK
Diffstat (limited to 'src/kernel/qstyle.h')
-rw-r--r--src/kernel/qstyle.h35
1 files changed, 20 insertions, 15 deletions
diff --git a/src/kernel/qstyle.h b/src/kernel/qstyle.h
index 1690786..324b987 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), cli(NULL) {}
+ QStyleOption(StyleOptionDefault=Default) : def(TRUE), tb(NULL), cli(NULL), tbh(NULL) {}
// Note: we don't use default arguments since that is unnecessary
// initialization.
QStyleOption(int in1) :
- def(FALSE), tb(NULL), i1(in1), cli(NULL) {}
+ def(FALSE), tb(NULL), i1(in1), cli(NULL), tbh(NULL) {}
QStyleOption(int in1, int in2) :
- def(FALSE), tb(NULL), i1(in1), i2(in2), cli(NULL) {}
+ def(FALSE), tb(NULL), i1(in1), i2(in2), cli(NULL), tbh(NULL) {}
QStyleOption(int in1, int in2, int in3, int in4) :
- 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), 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) {}
+ def(FALSE), tb(NULL), i1(in1), i2(in2), i3(in3), i4(in4), cli(NULL), tbh(NULL) {}
+ QStyleOption(QMenuItem* m) : def(FALSE), mi(m), tb(NULL), cli(NULL), tbh(NULL) {}
+ QStyleOption(QMenuItem* m, int in1) : def(FALSE), mi(m), tb(NULL), i1(in1), cli(NULL), tbh(NULL) {}
+ QStyleOption(QMenuItem* m, int in1, int in2) : def(FALSE), mi(m), tb(NULL), i1(in1), i2(in2), cli(NULL), tbh(NULL) {}
+ QStyleOption(const QColor& c) : def(FALSE), tb(NULL), cl(&c), cli(NULL), tbh(NULL) {}
+ QStyleOption(QTab* t) : def(FALSE), tb(t), cli(NULL), tbh(NULL) {}
+ QStyleOption(QListViewItem* i) : def(FALSE), tb(NULL), li(i), cli(NULL), tbh(NULL) {}
+ QStyleOption(QCheckListItem* i) : def(FALSE), tb(NULL), cli(i), tbh(NULL) {}
+ QStyleOption(Qt::ArrowType a) : def(FALSE), tb(NULL), i1((int)a), cli(NULL), tbh(NULL) {}
+ QStyleOption(const QRect& r) : def(FALSE), tb(NULL), i1(r.x()), i2(r.y()), i3(r.width()), i4(r.height()), cli(NULL), tbh(NULL) {}
+ QStyleOption(QWidget *w) : def(FALSE), tb(NULL), cli(NULL), p1((void*)w), tbh(NULL) {}
bool isDefault() const { return def; }
@@ -109,6 +109,9 @@ public:
QRect rect() const { return QRect( i1, i2, i3, i4 ); }
QWidget* widget() const { return (QWidget*)p1; }
+ QStyleOption(QTab* t, QTab* h) : def(FALSE), tb(t), cli(NULL), tbh(h) {}
+ QTab* hoverTab() const { return tbh; }
+
private:
// NOTE: none of these components have constructors.
bool def;
@@ -121,6 +124,7 @@ private:
int i5, i6; // reserved
QCheckListItem* cli;
void *p1, *p2, *p3, *p4; // reserved
+ QTab* tbh;
// (padded to 64 bytes on some architectures)
};
@@ -200,7 +204,7 @@ class QStyleControlElementGenericWidgetData {
QFont font;
};
-class QStyleControlElementData {
+class Q_EXPORT QStyleControlElementData {
public:
QStringList widgetObjectTypes;
bool allDataPopulated;
@@ -315,6 +319,7 @@ public:
CEF_IsActiveWindow = 0x00200000,
CEF_IsTopLevel = 0x00400000,
CEF_IsVisible = 0x00800000,
+ CEF_HasMouse = 0x01000000
};
// New QStyle API - most of these should probably be pure virtual