diff options
Diffstat (limited to 'src/kernel/qobject.cpp')
-rw-r--r-- | src/kernel/qobject.cpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/kernel/qobject.cpp b/src/kernel/qobject.cpp index d40bf0415..e90e2bd9b 100644 --- a/src/kernel/qobject.cpp +++ b/src/kernel/qobject.cpp @@ -49,6 +49,9 @@ #include "qucomextra_p.h" #include "ntqptrvector.h" +// TQStyleControlElementData +#include "ntqstyle.h" + #ifdef QT_THREAD_SUPPORT #include "ntqmutex.h" #include <private/qmutexpool_p.h> @@ -58,6 +61,33 @@ #include <ctype.h> #include <stdlib.h> +// Keep in sync with duplicate definition in qcommonstyle.cpp +class TQStyleControlElementDataPrivate { + public: + bool isTQPushButton; + bool isTQToolButton; + bool isTQButton; + bool isTQTabBar; + bool isTQTitleBar; + bool isTQToolBox; + bool isTQToolBar; + bool isTQProgressBar; + bool isTQPopupMenu; + bool isTQComboBox; + bool isTQCheckBox; + bool isTQRadioButton; + bool isTQHeader; + bool isTQScrollBar; + bool isTQSlider; + bool isTQDialogButtons; + bool isTQSpinWidget; + bool isTQListView; + bool isTQDockWindow; + bool isTQTabWidget; + bool isTQFrame; + bool isTQWidget; +}; + #ifndef QT_NO_USERDATA class TQObjectPrivate : public TQPtrVector<TQObjectUserData> #else @@ -70,14 +100,36 @@ public: ownThread = NULL; disableThreadPostedEvents = false; setAutoDelete( TRUE ); + controlElementData = NULL; + controlElementDataPrivate = NULL; + } + ~TQObjectPrivate() { + delete controlElementData; + delete controlElementDataPrivate; } #endif TQThread* ownThread; TQMutex* senderObjectListMutex; TQMutex* childObjectListMutex; bool disableThreadPostedEvents; + TQStyleControlElementData* controlElementData; + TQStyleControlElementDataPrivate* controlElementDataPrivate; }; +TQStyleControlElementData* TQObject::controlElementDataObject() { + if (!d->controlElementData) { + d->controlElementData = new TQStyleControlElementData(); + } + return d->controlElementData; +} + +TQStyleControlElementDataPrivate* TQObject::controlElementDataPrivateObject() { + if (!d->controlElementDataPrivate) { + d->controlElementDataPrivate = new TQStyleControlElementDataPrivate(); + } + return d->controlElementDataPrivate; +} + #if defined(QT_THREAD_SUPPORT) void TQObject::moveToThread_helper(TQThread *targetThread) |