diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-11-23 12:04:01 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-14 21:49:33 +0100 |
commit | 56c4ddfdf62ff6b71ce3df680bdaca01012e13f4 (patch) | |
tree | 5777f621303392efa9852f982e52a09a9e44e7e0 /src/widgets/dialogs/qcolordialog_p.h | |
parent | f86007175d7d9d592e9cf6499704ad4f17944ce4 (diff) |
QPlatformDialogHelpers: Reduce dependency on QDialog.
For each QDialog-derived class, introduce a Q[X]Options class
containing the options of the dialog. An instance is shared
between the QDialog (or dialog desktop component) and the
helper.
Change-Id: Ibabf508a4b9eaea25615638a47a4c1b8f93c019e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/widgets/dialogs/qcolordialog_p.h')
-rw-r--r-- | src/widgets/dialogs/qcolordialog_p.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/widgets/dialogs/qcolordialog_p.h b/src/widgets/dialogs/qcolordialog_p.h index 39d7192b1d..42176fe214 100644 --- a/src/widgets/dialogs/qcolordialog_p.h +++ b/src/widgets/dialogs/qcolordialog_p.h @@ -56,6 +56,7 @@ #include "private/qdialog_p.h" #include "qcolordialog.h" +#include "qsharedpointer.h" #ifndef QT_NO_COLORDIALOG @@ -75,6 +76,8 @@ class QColorDialogPrivate : public QDialogPrivate Q_DECLARE_PUBLIC(QColorDialog) public: + QColorDialogPrivate() : options(new QColorDialogOptions) {} + QPlatformColorDialogHelper *platformColorDialogHelper() const { return static_cast<QPlatformColorDialogHelper *>(platformHelper()); } @@ -92,7 +95,6 @@ public: void retranslateStrings(); void _q_addCustom(); - void _q_platformRunNativeAppModalPanel(); void _q_newHsv(int h, int s, int v); void _q_newColorTypedIn(QRgb rgb); @@ -115,7 +117,8 @@ public: QColor selectedQColor; int nextCust; bool smallDisplay; - QColorDialog::ColorDialogOptions opts; + QSharedPointer<QColorDialogOptions> options; + QPointer<QObject> receiverToDisconnectOnClose; QByteArray memberToDisconnectOnClose; @@ -138,6 +141,7 @@ public: #endif private: virtual void initHelper(QPlatformDialogHelper *h); + virtual void helperPrepareShow(QPlatformDialogHelper *h); }; #endif // QT_NO_COLORDIALOG |