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
qquickselectionrectangle_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 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 QQUICKSELECTIONRECTANGLE_P_H
5#define QQUICKSELECTIONRECTANGLE_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/qquickitem.h>
19#include <QtQuickTemplates2/private/qquickcontrol_p.h>
20
21#include <QtCore/qpointer.h>
22
24
28
29class Q_QUICKTEMPLATES2_EXPORT QQuickSelectionRectangle : public QQuickControl
30{
32 Q_PROPERTY(SelectionMode selectionMode READ selectionMode WRITE setSelectionMode NOTIFY selectionModeChanged FINAL)
33 Q_PROPERTY(QQuickItem *target READ target WRITE setTarget NOTIFY targetChanged FINAL)
34 Q_PROPERTY(QQmlComponent *topLeftHandle READ topLeftHandle WRITE setTopLeftHandle NOTIFY topLeftHandleChanged FINAL)
35 Q_PROPERTY(QQmlComponent *bottomRightHandle READ bottomRightHandle WRITE setBottomRightHandle NOTIFY bottomRightHandleChanged FINAL)
36 Q_PROPERTY(bool active READ active NOTIFY activeChanged FINAL)
37 Q_PROPERTY(bool dragging READ dragging NOTIFY draggingChanged FINAL)
38
39 QML_NAMED_ELEMENT(SelectionRectangle)
42
43public:
49 Q_ENUM(SelectionMode)
50
51 explicit QQuickSelectionRectangle(QQuickItem *parent = nullptr);
52
53 QQuickItem *target() const;
54 void setTarget(QQuickItem *target);
55
56 bool active();
57 bool dragging();
58
59 SelectionMode selectionMode() const;
60 void setSelectionMode(SelectionMode selectionMode);
61
62 QQmlComponent *topLeftHandle() const;
63 void setTopLeftHandle(QQmlComponent *topLeftHandle);
64 QQmlComponent *bottomRightHandle() const;
65 void setBottomRightHandle(QQmlComponent *bottomRightHandle);
66
67 static QQuickSelectionRectangleAttached *qmlAttachedProperties(QObject *obj);
68
76
77private:
78 Q_DISABLE_COPY(QQuickSelectionRectangle)
79 Q_DECLARE_PRIVATE(QQuickSelectionRectangle)
80};
81
82class Q_QUICKTEMPLATES2_EXPORT QQuickSelectionRectangleAttached : public QObject
83{
85 Q_PROPERTY(QQuickSelectionRectangle *control READ control NOTIFY controlChanged FINAL)
86 Q_PROPERTY(bool dragging READ dragging NOTIFY draggingChanged FINAL)
87
88public:
90
91 QQuickSelectionRectangle *control() const;
92 void setControl(QQuickSelectionRectangle *control);
93
94 bool dragging() const;
95 void setDragging(bool dragging);
96
98 void controlChanged();
99 void draggingChanged();
100
101private:
103 bool m_dragging = false;
104
106};
107
109
110#endif // QQUICKSELECTIONRECTANGLE_P_H
\inmodule QtCore
Definition qobject.h:103
The QQmlComponent class encapsulates a QML component definition.
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
Combined button and popup list for selecting options.
GLenum target
GLhandleARB obj
[2]
#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