Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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// Qt-Security score:significant reason:default
4
5#ifndef QQUICKPOPUPPOSITIONER_P_P_H
6#define QQUICKPOPUPPOSITIONER_P_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtQuick/private/qquickitemchangelistener_p.h>
20#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
21
23
24class QQuickItem;
25class QQuickPopup;
26
27class Q_QUICKTEMPLATES2_EXPORT QQuickPopupPositioner : public QQuickItemChangeListener
28{
29public:
30 explicit QQuickPopupPositioner(QQuickPopup *popup);
31 ~QQuickPopupPositioner();
32
33 QQuickPopup *popup() const;
34
35 QQuickItem *parentItem() const;
36 void setParentItem(QQuickItem *parent);
37
38 virtual void reposition();
39
40protected:
41 void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) override;
42 void itemParentChanged(QQuickItem *, QQuickItem *parent) override;
43 void itemChildRemoved(QQuickItem *, QQuickItem *child) override;
44
45 void removeAncestorListeners(QQuickItem *item);
46 void addAncestorListeners(QQuickItem *item);
47
48 void repositionPopupWindow();
49
50 bool m_positioning = false;
51 QQuickItem *m_parentItem = nullptr;
52 QQuickPopup *m_popup = nullptr;
53 qreal m_popupScale = 1.0;
54};
55
56QT_END_NAMESPACE
57
58#endif // QQUICKPOPUPPOSITIONER_P_P_H
void showDimmer() override
void handleUngrab() override
bool prepareEnterTransition() override
bool handlePress(QQuickItem *item, const QPointF &point, ulong timestamp) override
void resizeDimmer() override
bool setEdge(Qt::Edge edge)
bool isWithinDragMargin(const QPointF &point) const
qreal positionAt(const QPointF &point) const
QQuickPopup::PopupType resolvedPopupType() const override
QQuickPopupPositioner * getPositioner() override
bool grabMouse(QQuickItem *item, QMouseEvent *event)
bool handleRelease(QQuickItem *item, const QPointF &point, ulong timestamp) override
bool startDrag(QEvent *event)
Qt::Edge effectiveEdge() const
bool blockInput(QQuickItem *item, const QPointF &point) const override
void hideDimmer() override
bool handleMove(QQuickItem *item, const QPointF &point, ulong timestamp) override
bool prepareExitTransition() override
QQuickVelocityCalculator velocityCalculator
static bool keepGrab(QQuickItem *item)
static QList< QQuickStateAction > prepareTransition(QQuickDrawer *drawer, QQuickTransition *transition, qreal to)
static const qreal openCloseVelocityThreshold