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
qquickdrawer_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 QQUICKDRAWER_P_P_H
6#define QQUICKDRAWER_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 <QtQuickTemplates2/private/qquickdrawer_p.h>
20#include <QtQuickTemplates2/private/qquickpopup_p_p.h>
21#include <QtQuickTemplates2/private/qquickvelocitycalculator_p_p.h>
22
24
25class Q_QUICKTEMPLATES2_EXPORT QQuickDrawerPrivate : public QQuickPopupPrivate
26{
27 Q_DECLARE_PUBLIC(QQuickDrawer)
28
29public:
30 static QQuickDrawerPrivate *get(QQuickDrawer *drawer)
31 {
32 return drawer->d_func();
33 }
34
35 qreal offsetAt(const QPointF &point) const;
36 qreal positionAt(const QPointF &point) const;
37
38 QQuickPopupPositioner *getPositioner() override;
39 void showDimmer() override;
40 void hideDimmer() override;
41 void resizeDimmer() override;
42
43 bool startDrag(QEvent *event);
44 bool grabMouse(QQuickItem *item, QMouseEvent *event);
45#if QT_CONFIG(quicktemplates2_multitouch)
46 bool grabTouch(QQuickItem *item, QTouchEvent *event);
47#endif
48 bool blockInput(QQuickItem *item, const QPointF &point) const override;
49
50 bool handlePress(QQuickItem* item, const QPointF &point, ulong timestamp) override;
51 bool handleMove(QQuickItem* item, const QPointF &point, ulong timestamp) override;
52 bool handleRelease(QQuickItem* item, const QPointF &point, ulong timestamp) override;
53 void handleUngrab() override;
54
55 bool prepareEnterTransition() override;
56 bool prepareExitTransition() override;
57
58 QQuickPopup::PopupType resolvedPopupType() const override;
59
60 bool setEdge(Qt::Edge edge);
61 Qt::Edge effectiveEdge() const;
62 bool isWithinDragMargin(const QPointF &point) const;
63
64 Qt::Edge edge = Qt::LeftEdge;
65 qreal offset = 0;
66 qreal position = 0;
67 qreal dragMargin = 0;
68 QQuickVelocityCalculator velocityCalculator;
69 bool delayedEnterTransition = false;
70};
71
72QT_END_NAMESPACE
73
74#endif // QQUICKDRAWER_P_P_H
Combined button and popup list for selecting options.
static bool keepGrab(QQuickItem *item)
static QList< QQuickStateAction > prepareTransition(QQuickDrawer *drawer, QQuickTransition *transition, qreal to)
static const qreal openCloseVelocityThreshold