summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qstyle_p.h
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-06-12 14:53:40 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-06-12 15:05:11 (GMT)
commit4d0cc0b9600f8530bb0e8712b4bb109d1810c4a7 (patch)
tree766d2cbcad6082f794217000778b46ac8d2a7890 /src/gui/styles/qstyle_p.h
parent56b93b836f70e121540e8d8da9447f5dc6e1fdd6 (diff)
downloadQt-4d0cc0b9600f8530bb0e8712b4bb109d1810c4a7.zip
Qt-4d0cc0b9600f8530bb0e8712b4bb109d1810c4a7.tar.gz
Qt-4d0cc0b9600f8530bb0e8712b4bb109d1810c4a7.tar.bz2
Integrating QProxyStyle
This class adds convenient support for proxy styles in Qt. Note that to support proper proxying, styles now call their functions through proxy() so that the proxy regains control over subcomponents. Note that there is a small price to be payed by the extra function call which can at the cost of readability be redirected to the private class member in the future. Task-number: 229556 Reviewed-by: trond
Diffstat (limited to 'src/gui/styles/qstyle_p.h')
-rw-r--r--src/gui/styles/qstyle_p.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/styles/qstyle_p.h b/src/gui/styles/qstyle_p.h
index 154321a..4cf20f0 100644
--- a/src/gui/styles/qstyle_p.h
+++ b/src/gui/styles/qstyle_p.h
@@ -43,6 +43,7 @@
#define QSTYLE_P_H
#include "private/qobject_p.h"
+#include <QtGui/qstyle.h>
QT_BEGIN_NAMESPACE
@@ -51,22 +52,24 @@ QT_BEGIN_NAMESPACE
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
-// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header
-// file may change from version to version without notice, or even be removed.
+// of qstyle_*.cpp. This header file may change from version to version
+// without notice, or even be removed.
//
// We mean it.
//
// Private class
+class QStyle;
+
class QStylePrivate: public QObjectPrivate
{
- Q_DECLARE_PUBLIC(QStyle)
+ Q_DECLARE_PUBLIC(QStyle);
public:
inline QStylePrivate()
- : layoutSpacingIndex(-1)
- { }
+ : layoutSpacingIndex(-1), proxyStyle(0) {}
mutable int layoutSpacingIndex;
+ QStyle *proxyStyle;
};
@@ -89,6 +92,7 @@ public:
}
+
#define END_STYLE_PIXMAPCACHE \
if (doPixmapCache) { \
p->end(); \