Qt 6.x
The Qt SDK
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
22
26
27class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSelectionRectangle : public QQuickControl
28{
30 Q_PROPERTY(SelectionMode selectionMode READ selectionMode WRITE setSelectionMode NOTIFY selectionModeChanged FINAL)
31 Q_PROPERTY(QQuickItem *target READ target WRITE setTarget NOTIFY targetChanged FINAL)
32 Q_PROPERTY(QQmlComponent *topLeftHandle READ topLeftHandle WRITE setTopLeftHandle NOTIFY topLeftHandleChanged FINAL)
33 Q_PROPERTY(QQmlComponent *bottomRightHandle READ bottomRightHandle WRITE setBottomRightHandle NOTIFY bottomRightHandleChanged FINAL)
34 Q_PROPERTY(bool active READ active NOTIFY activeChanged FINAL)
35 Q_PROPERTY(bool dragging READ dragging NOTIFY draggingChanged FINAL)
36
37 QML_NAMED_ELEMENT(SelectionRectangle)
40
41public:
45 Auto
46 };
47 Q_ENUM(SelectionMode)
48
49 explicit QQuickSelectionRectangle(QQuickItem *parent = nullptr);
50
51 QQuickItem *target() const;
52 void setTarget(QQuickItem *target);
53
54 bool active();
55 bool dragging();
56
57 SelectionMode selectionMode() const;
58 void setSelectionMode(SelectionMode selectionMode);
59
60 QQmlComponent *topLeftHandle() const;
61 void setTopLeftHandle(QQmlComponent *topLeftHandle);
62 QQmlComponent *bottomRightHandle() const;
63 void setBottomRightHandle(QQmlComponent *bottomRightHandle);
64
65 static QQuickSelectionRectangleAttached *qmlAttachedProperties(QObject *obj);
66
73 void selectionModeChanged();
74
75private:
76 Q_DISABLE_COPY(QQuickSelectionRectangle)
77 Q_DECLARE_PRIVATE(QQuickSelectionRectangle)
78};
79
80class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSelectionRectangleAttached : public QObject
81{
83 Q_PROPERTY(QQuickSelectionRectangle *control READ control NOTIFY controlChanged FINAL)
84 Q_PROPERTY(bool dragging READ dragging NOTIFY draggingChanged FINAL)
85
86public:
88
89 QQuickSelectionRectangle *control() const;
90 void setControl(QQuickSelectionRectangle *control);
91
92 bool dragging() const;
93 void setDragging(bool dragging);
94
98
99private:
101 bool m_dragging = false;
102
104};
105
107
109
110#endif // QQUICKSELECTIONRECTANGLE_P_H
\inmodule QtCore
Definition qobject.h:90
\inmodule QtCore
Definition qpointer.h:18
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:64
Combined button and popup list for selecting options.
GLenum target
GLhandleARB obj
[2]
#define QML_DECLARE_TYPE(TYPE)
Definition qqml.h:19
#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
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent