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
qquickswipedelegate_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 QQUICKSWIPEDELEGATE_P_H
5#define QQUICKSWIPEDELEGATE_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/qquickitemdelegate_p.h>
19
21
22class QQuickSwipe;
26
27class Q_QUICKTEMPLATES2_EXPORT QQuickSwipeDelegate : public QQuickItemDelegate
28{
30 Q_PROPERTY(QQuickSwipe *swipe READ swipe CONSTANT FINAL)
31 QML_NAMED_ELEMENT(SwipeDelegate)
34
35public:
36 explicit QQuickSwipeDelegate(QQuickItem *parent = nullptr);
37
38 QQuickSwipe *swipe() const;
39
40 enum Side { Left = 1, Right = -1 };
41 Q_ENUM(Side)
42
43 static QQuickSwipeDelegateAttached *qmlAttachedProperties(QObject *object);
44
45protected:
46 bool childMouseEventFilter(QQuickItem *child, QEvent *event) override;
47 void mousePressEvent(QMouseEvent *event) override;
48 void mouseMoveEvent(QMouseEvent *event) override;
49 void mouseReleaseEvent(QMouseEvent *event) override;
50 void mouseUngrabEvent() override;
51 void touchEvent(QTouchEvent *event) override;
52
53 void componentComplete() override;
54 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
55
56 QFont defaultFont() const override;
57
58#if QT_CONFIG(accessibility)
59 QAccessible::Role accessibleRole() const override;
60#endif
61
62private:
63 Q_DISABLE_COPY(QQuickSwipeDelegate)
64 Q_DECLARE_PRIVATE(QQuickSwipeDelegate)
65};
66
67class Q_QUICKTEMPLATES2_EXPORT QQuickSwipeDelegateAttached : public QObject
68{
70 Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged FINAL)
71
72public:
73 explicit QQuickSwipeDelegateAttached(QObject *object = nullptr);
74
75 bool isPressed() const;
76 void setPressed(bool pressed);
77
80 void clicked();
81
82private:
83 Q_DISABLE_COPY(QQuickSwipeDelegateAttached)
84 Q_DECLARE_PRIVATE(QQuickSwipeDelegateAttached)
85};
86
88
90
91#endif // QQUICKSWIPEDELEGATE_P_H
\inmodule QtCore
Definition qcoreevent.h:45
\reentrant
Definition qfont.h:22
\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.
#define Q_DECLARE_METATYPE(TYPE)
Definition qmetatype.h:1525
struct _cl_event * event
@ Left
@ Right
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QML_ATTACHED(ATTACHED_TYPE)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
#define explicit
QLayoutItem * child
[0]