Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickpopuppositioner_p_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 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 QQUICKPOPUPPOSITIONER_P_P_H
5#define QQUICKPOPUPPOSITIONER_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/qquickitemchangelistener_p.h>
19#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
20
22
23class QQuickItem;
24class QQuickPopup;
25
26class Q_QUICKTEMPLATES2_EXPORT QQuickPopupPositioner : public QQuickItemChangeListener
27{
28public:
29 explicit QQuickPopupPositioner(QQuickPopup *popup);
31
32 QQuickPopup *popup() const;
33
34 QQuickItem *parentItem() const;
35 void setParentItem(QQuickItem *parent);
36
37 virtual void reposition();
38
39protected:
40 void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) override;
41 void itemParentChanged(QQuickItem *, QQuickItem *parent) override;
42 void itemChildRemoved(QQuickItem *, QQuickItem *child) override;
43
44 void removeAncestorListeners(QQuickItem *item);
45 void addAncestorListeners(QQuickItem *item);
46
47 bool m_positioning = false;
48 QQuickItem *m_parentItem = nullptr;
49 QQuickPopup *m_popup = nullptr;
50 qreal m_popupScale = 1.0;
51};
52
54
55#endif // QQUICKPOPUPPOSITIONER_P_P_H
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
\inmodule QtCore\reentrant
Definition qrect.h:484
Combined button and popup list for selecting options.
double qreal
Definition qtypes.h:187
QGraphicsItem * item
QLayoutItem * child
[0]