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
qquickdrawer_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 QQUICKDRAWER_P_H
5#define QQUICKDRAWER_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 <QtQuickTemplates2/private/qquickpopup_p.h>
19
21
23
24class Q_QUICKTEMPLATES2_EXPORT QQuickDrawer : public QQuickPopup
25{
27 Q_PROPERTY(Qt::Edge edge READ edge WRITE setEdge NOTIFY edgeChanged FINAL)
28 Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL)
29 Q_PROPERTY(qreal dragMargin READ dragMargin WRITE setDragMargin RESET resetDragMargin NOTIFY dragMarginChanged FINAL)
30 // 2.2 (Qt 5.9)
31 Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL REVISION(2, 2))
32 QML_NAMED_ELEMENT(Drawer)
34
35public:
36 explicit QQuickDrawer(QObject *parent = nullptr);
37
38 Qt::Edge edge() const;
39 void setEdge(Qt::Edge edge);
40
41 qreal position() const;
43
44 qreal dragMargin() const;
45 void setDragMargin(qreal margin);
46 void resetDragMargin();
47
48 // 2.2 (Qt 5.9)
49 bool isInteractive() const;
50 void setInteractive(bool interactive);
51
53 void edgeChanged();
54 void positionChanged();
55 void dragMarginChanged();
56 // 2.2 (Qt 5.9)
57 Q_REVISION(2, 2) void interactiveChanged();
58
59protected:
60 bool childMouseEventFilter(QQuickItem *child, QEvent *event) override;
61 void mouseMoveEvent(QMouseEvent *event) override;
62 bool overlayEvent(QQuickItem *item, QEvent *event) override;
63#if QT_CONFIG(quicktemplates2_multitouch)
64 void touchEvent(QTouchEvent *event) override;
65#endif
66
67 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
68
69private:
70 Q_DISABLE_COPY(QQuickDrawer)
71 Q_DECLARE_PRIVATE(QQuickDrawer)
72};
73
75
76#endif // QQUICKDRAWER_P_H
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtGui
Definition qevent.h:196
\inmodule QtCore
Definition qobject.h:103
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
The QTouchEvent class contains parameters that describe a touch event.
Definition qevent.h:917
Combined button and popup list for selecting options.
Definition qcompare.h:63
n void setPosition(void) \n\
struct _cl_event * event
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_REVISION(...)
#define Q_SIGNALS
double qreal
Definition qtypes.h:187
#define explicit
QGraphicsItem * item
QLayoutItem * child
[0]