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
qquickselectionrectangle_p_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// Qt-Security score:significant reason:default
4
5#ifndef QQUICKSELECTIONRECTANGLE_P_P_H
6#define QQUICKSELECTIONRECTANGLE_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
20
21#include <QtCore/qpointer.h>
22#include <QtCore/qtimer.h>
23
24#include <QtQuick/private/qquickselectable_p.h>
25#include <QtQuick/private/qquicktaphandler_p.h>
26#include <QtQuick/private/qquickdraghandler_p.h>
27
28#include <QtQuickTemplates2/private/qquickcontrol_p_p.h>
29
31
33{
34public:
35 Q_DECLARE_PUBLIC(QQuickSelectionRectangle)
36
38
39 void updateDraggingState(bool isDragging);
40 void updateActiveState(bool isActive);
41 void updateHandles();
43 void connectToTarget();
44 void scrollTowardsPos(const QPointF &pos);
45 QQuickItem *handleUnderPos(const QPointF &pos);
46
47 QQuickItem *createHandle(QQmlComponent *delegate, Qt::Corner corner);
48
49 QQuickSelectionRectangleAttached *getAttachedObject(const QObject *object) const;
50
51public:
53
54 QQmlComponent *m_topLeftHandleDelegate = nullptr;
55 QQmlComponent *m_bottomRightHandleDelegate = nullptr;
59
60 QQuickSelectable *m_selectable = nullptr;
61
64
68
71
72 bool m_enabled = true;
73 bool m_active = false;
74 bool m_dragging = false;
75};
76
77QT_END_NAMESPACE
78
79#endif // QQUICKSELECTIONRECTANGLE_P_P_H
QQuickItem * createHandle(QQmlComponent *delegate, Qt::Corner corner)
QScopedPointer< QQuickItem > m_topLeftHandle
QScopedPointer< QQuickItem > m_bottomRightHandle
QQuickItem * handleUnderPos(const QPointF &pos)
QQuickSelectionRectangleAttached * getAttachedObject(const QObject *object) const