diff options
Diffstat (limited to 'src/controls/qquickabstractapplicationwindow.cpp')
-rw-r--r-- | src/controls/qquickabstractapplicationwindow.cpp | 47 |
1 files changed, 1 insertions, 46 deletions
diff --git a/src/controls/qquickabstractapplicationwindow.cpp b/src/controls/qquickabstractapplicationwindow.cpp index 1800e302..1ac37d7e 100644 --- a/src/controls/qquickabstractapplicationwindow.cpp +++ b/src/controls/qquickabstractapplicationwindow.cpp @@ -35,9 +35,7 @@ ****************************************************************************/ #include "qquickabstractapplicationwindow_p.h" -#include "qquickstyle_p.h" -#include <QtCore/qcoreapplication.h> #include <QtQuick/private/qquickitem_p.h> #include <QtQuick/private/qquickitemchangelistener_p.h> @@ -59,8 +57,7 @@ class QQuickAbstractApplicationWindowPrivate : public QQuickItemChangeListener Q_DECLARE_PUBLIC(QQuickAbstractApplicationWindow) public: - QQuickAbstractApplicationWindowPrivate() : contentWidth(0), contentHeight(0), - header(Q_NULLPTR), footer(Q_NULLPTR), hasStyle(false), style(Q_NULLPTR) { } + QQuickAbstractApplicationWindowPrivate() : contentWidth(0), contentHeight(0), header(Q_NULLPTR), footer(Q_NULLPTR) { } void relayout(); @@ -71,8 +68,6 @@ public: qreal contentHeight; QQuickItem *header; QQuickItem *footer; - bool hasStyle; - mutable QQuickStyle *style; QQuickAbstractApplicationWindow *q_ptr; }; @@ -176,46 +171,6 @@ void QQuickAbstractApplicationWindow::setFooter(QQuickItem *footer) } /*! - \qmlproperty Style QtQuickControls2::ApplicationWindow::style - - TODO -*/ -QQuickStyle *QQuickAbstractApplicationWindow::style() const -{ - Q_D(const QQuickAbstractApplicationWindow); - if (!d->style) - d->style = QQuickStyle::instance(qmlEngine(this)); - return d->style; -} - -void QQuickAbstractApplicationWindow::setStyle(QQuickStyle *style) -{ - Q_D(QQuickAbstractApplicationWindow); - if (d->style != style) { - d->style = style; - d->hasStyle = style; - emit styleChanged(); - - QEvent change(QEvent::StyleChange); - foreach (QQuickItem *item, contentItem()->findChildren<QQuickItem *>()) { - if (qobject_cast<QQuickStylable *>(item)) - QCoreApplication::sendEvent(item, &change); - } - } -} - -bool QQuickAbstractApplicationWindow::hasStyle() const -{ - Q_D(const QQuickAbstractApplicationWindow); - return d->hasStyle; -} - -void QQuickAbstractApplicationWindow::resetStyle() -{ - setStyle(Q_NULLPTR); -} - -/*! \qmlproperty real QtQuickControls2::ApplicationWindow::contentWidth TODO |