1// Copyright (C) 2018 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 QQUICKPOPUPANCHORS_P_H
5#define QQUICKPOPUPANCHORS_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 <QtCore/qobject.h>
19#include <QtQml/qqml.h>
20#include <QtQuick/private/qquickitem_p.h>
21#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
22
23QT_BEGIN_NAMESPACE
24
25class QQuickItem;
26class QQuickPopupAnchorsPrivate;
27class QQuickPopup;
28
29class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPopupAnchors : public QObject, public QQuickItemChangeListener
30{
31 Q_OBJECT
32 Q_PROPERTY(QQuickItem *centerIn READ centerIn WRITE setCenterIn RESET resetCenterIn NOTIFY centerInChanged FINAL)
33 QML_ANONYMOUS
34 QML_ADDED_IN_VERSION(2, 5)
35
36public:
37 explicit QQuickPopupAnchors(QQuickPopup *popup);
38 ~QQuickPopupAnchors();
39
40 QQuickItem *centerIn() const;
41 void setCenterIn(QQuickItem *item);
42 void resetCenterIn();
43
44Q_SIGNALS:
45 void centerInChanged();
46
47private:
48 void itemDestroyed(QQuickItem *item) override;
49
50 Q_DISABLE_COPY(QQuickPopupAnchors)
51 Q_DECLARE_PRIVATE(QQuickPopupAnchors)
52};
53
54QT_END_NAMESPACE
55
56QML_DECLARE_TYPE(QQuickPopupAnchors)
57
58#endif // QQUICKPOPUPANCHORS_P_H
59

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