1// Copyright (C) 2024 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQUICKPOPUPWINDOW_P_P_H
5#define QQUICKPOPUPWINDOW_P_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQuick/private/qquickwindowmodule_p.h>
19#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
20
21QT_BEGIN_NAMESPACE
22
23class QQuickPopup;
24class QQuickPopupWindowPrivate;
25
26class Q_QUICKTEMPLATES2_EXPORT QQuickPopupWindow : public QQuickWindowQmlImpl
27{
28 Q_OBJECT
29 QML_ANONYMOUS
30
31public:
32 explicit QQuickPopupWindow(QQuickPopup *popup, QWindow *parent = nullptr);
33 ~QQuickPopupWindow();
34 QQuickPopup *popup() const;
35
36protected:
37 void hideEvent(QHideEvent *e) override;
38 void moveEvent(QMoveEvent *e) override;
39 void resizeEvent(QResizeEvent *e) override;
40 bool event(QEvent *e) override;
41
42private:
43 void windowChanged(QWindow *window);
44 QPoint global2Local(const QPoint& pos) const;
45 void parentWindowXChanged(int newX);
46 void parentWindowYChanged(int newY);
47 void handlePopupPositionChangeFromWindowSystem(const QPoint &pos);
48 void implicitWidthChanged();
49 void implicitHeightChanged();
50
51 Q_DISABLE_COPY(QQuickPopupWindow)
52 Q_DECLARE_PRIVATE(QQuickPopupWindow)
53};
54
55QT_END_NAMESPACE
56
57#endif // QQUICKPOPUPWINDOW_P_P_H
58

Provided by KDAB

Privacy Policy
Learn Advanced QML with KDAB
Find out more

source code of qtdeclarative/src/quicktemplates/qquickpopupwindow_p_p.h