aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-09-03 19:33:35 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-09-05 16:35:50 +0000
commitaa4964843f2faca2d52469edc2ba899f9b11e15c (patch)
tree7e63b4b1458b3600dade66d668eb5aa99762b52a /src
parentdf12dbe976876bbb4e36b16eb4836c4109bb80d0 (diff)
Make QQuickOverlayPrivate accessible via qquickoverlay_p_p.h
Required by the subsequent patches. Done separately keep the other patches smaller and easier to review. Change-Id: I90ae08ea196354b3db74e2203983ca95733ef0c8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quicktemplates2/qquickoverlay.cpp30
-rw-r--r--src/quicktemplates2/qquickoverlay_p_p.h95
-rw-r--r--src/quicktemplates2/quicktemplates2.pri1
3 files changed, 97 insertions, 29 deletions
diff --git a/src/quicktemplates2/qquickoverlay.cpp b/src/quicktemplates2/qquickoverlay.cpp
index 7e9e57f4..e98544cd 100644
--- a/src/quicktemplates2/qquickoverlay.cpp
+++ b/src/quicktemplates2/qquickoverlay.cpp
@@ -35,44 +35,16 @@
****************************************************************************/
#include "qquickoverlay_p.h"
+#include "qquickoverlay_p_p.h"
#include "qquickpopup_p_p.h"
#include "qquickdrawer_p.h"
#include "qquickapplicationwindow_p.h"
#include <QtQml/qqmlinfo.h>
#include <QtQml/qqmlproperty.h>
#include <QtQml/qqmlcomponent.h>
-#include <QtQuick/private/qquickitem_p.h>
-#include <QtQuick/private/qquickitemchangelistener_p.h>
QT_BEGIN_NAMESPACE
-class QQuickOverlayPrivate : public QQuickItemPrivate, public QQuickItemChangeListener
-{
- Q_DECLARE_PUBLIC(QQuickOverlay)
-
-public:
- QQuickOverlayPrivate();
-
- void popupAboutToShow();
- void popupAboutToHide();
-
- void createOverlay(QQuickPopup *popup);
- void destroyOverlay(QQuickPopup *popup);
- void resizeOverlay(QQuickPopup *popup);
- void toggleOverlay();
-
- QVector<QQuickPopup *> stackingOrderPopups() const;
-
- void itemGeometryChanged(QQuickItem *item, const QRectF &newGeometry, const QRectF &oldGeometry) override;
-
- QQmlComponent *modal;
- QQmlComponent *modeless;
- QVector<QQuickDrawer *> drawers;
- QVector<QQuickPopup *> popups;
- QPointer<QQuickPopup> mouseGrabberPopup;
- int modalPopups;
-};
-
void QQuickOverlayPrivate::popupAboutToShow()
{
Q_Q(QQuickOverlay);
diff --git a/src/quicktemplates2/qquickoverlay_p_p.h b/src/quicktemplates2/qquickoverlay_p_p.h
new file mode 100644
index 00000000..0b6ba21c
--- /dev/null
+++ b/src/quicktemplates2/qquickoverlay_p_p.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Templates 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QQUICKOVERLAY_P_P_H
+#define QQUICKOVERLAY_P_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qquickoverlay_p.h"
+
+#include <QtQuick/private/qquickitem_p.h>
+#include <QtQuick/private/qquickitemchangelistener_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickPopup;
+class QQuickDrawer;
+
+class QQuickOverlayPrivate : public QQuickItemPrivate, public QQuickItemChangeListener
+{
+ Q_DECLARE_PUBLIC(QQuickOverlay)
+
+public:
+ QQuickOverlayPrivate();
+
+ static QQuickOverlayPrivate *get(QQuickOverlay *overlay)
+ {
+ return overlay->d_func();
+ }
+
+ void popupAboutToShow();
+ void popupAboutToHide();
+
+ void createOverlay(QQuickPopup *popup);
+ void destroyOverlay(QQuickPopup *popup);
+ void resizeOverlay(QQuickPopup *popup);
+ void toggleOverlay();
+
+ QVector<QQuickPopup *> stackingOrderPopups() const;
+
+ void itemGeometryChanged(QQuickItem *item, const QRectF &newGeometry, const QRectF &oldGeometry) override;
+
+ QQmlComponent *modal;
+ QQmlComponent *modeless;
+ QVector<QQuickDrawer *> drawers;
+ QVector<QQuickPopup *> popups;
+ QPointer<QQuickPopup> mouseGrabberPopup;
+ int modalPopups;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQUICKOVERLAY_P_P_H
diff --git a/src/quicktemplates2/quicktemplates2.pri b/src/quicktemplates2/quicktemplates2.pri
index 173112d3..0d693b1b 100644
--- a/src/quicktemplates2/quicktemplates2.pri
+++ b/src/quicktemplates2/quicktemplates2.pri
@@ -27,6 +27,7 @@ HEADERS += \
$$PWD/qquickmenu_p_p.h \
$$PWD/qquickmenuitem_p.h \
$$PWD/qquickoverlay_p.h \
+ $$PWD/qquickoverlay_p_p.h \
$$PWD/qquickpage_p.h \
$$PWD/qquickpageindicator_p.h \
$$PWD/qquickpane_p.h \