Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquicksplitview_p.h
Go to the documentation of this file.
1// Copyright (C) 2018 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 QQUICKSPLITVIEW_P_H
5#define QQUICKSPLITVIEW_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/qquickcontainer_p.h>
19#include <QtQml/qqmllist.h>
20
22
28
29class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSplitView : public QQuickContainer
30{
32 Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
33 Q_PROPERTY(bool resizing READ isResizing NOTIFY resizingChanged FINAL)
34 Q_PROPERTY(QQmlComponent *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL)
35 QML_NAMED_ELEMENT(SplitView)
38
39public:
40 explicit QQuickSplitView(QQuickItem *parent = nullptr);
41 ~QQuickSplitView() override;
42
43 Qt::Orientation orientation() const;
44 void setOrientation(Qt::Orientation orientation);
45
46 bool isResizing() const;
47
49 void setHandle(QQmlComponent *handle);
50
51 bool isContent(QQuickItem *item) const override;
52
53 static QQuickSplitViewAttached *qmlAttachedProperties(QObject *object);
54
55 // Based on the same code in QMainWindow.
57 VersionMarker = 0xff
58 };
59 Q_INVOKABLE QVariant saveState();
60 Q_INVOKABLE bool restoreState(const QVariant &state);
61
66
67protected:
69
70 void componentComplete() override;
71 void hoverMoveEvent(QHoverEvent *event) override;
72 void hoverLeaveEvent(QHoverEvent *event) override;
74 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
75
76 void itemAdded(int index, QQuickItem *item) override;
77 void itemMoved(int index, QQuickItem *item) override;
78 void itemRemoved(int index, QQuickItem *item) override;
79
80#if QT_CONFIG(accessibility)
81 QAccessible::Role accessibleRole() const override;
82#endif
83
84private:
85 Q_DISABLE_COPY(QQuickSplitView)
86 Q_DECLARE_PRIVATE(QQuickSplitView)
87};
88
89class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSplitViewAttached : public QObject
90{
92 Q_PROPERTY(QQuickSplitView *view READ view NOTIFY viewChanged FINAL)
93 Q_PROPERTY(qreal minimumWidth READ minimumWidth WRITE setMinimumWidth
94 RESET resetMinimumWidth NOTIFY minimumWidthChanged FINAL)
95 Q_PROPERTY(qreal minimumHeight READ minimumHeight WRITE setMinimumHeight
96 RESET resetMinimumHeight NOTIFY minimumHeightChanged FINAL)
97 Q_PROPERTY(qreal preferredWidth READ preferredWidth WRITE setPreferredWidth
98 RESET resetPreferredWidth NOTIFY preferredWidthChanged FINAL)
99 Q_PROPERTY(qreal preferredHeight READ preferredHeight WRITE setPreferredHeight
100 RESET resetPreferredHeight NOTIFY preferredHeightChanged FINAL)
101 Q_PROPERTY(qreal maximumWidth READ maximumWidth WRITE setMaximumWidth
102 RESET resetMaximumWidth NOTIFY maximumWidthChanged FINAL)
103 Q_PROPERTY(qreal maximumHeight READ maximumHeight WRITE setMaximumHeight
104 RESET resetMaximumHeight NOTIFY maximumHeightChanged FINAL)
105 Q_PROPERTY(bool fillHeight READ fillHeight WRITE setFillHeight NOTIFY fillHeightChanged FINAL)
106 Q_PROPERTY(bool fillWidth READ fillWidth WRITE setFillWidth NOTIFY fillWidthChanged FINAL)
107
108public:
109 explicit QQuickSplitViewAttached(QObject *parent = nullptr);
110
111 QQuickSplitView *view() const;
112
113 qreal minimumWidth() const;
114 void setMinimumWidth(qreal width);
115 void resetMinimumWidth();
116
117 qreal minimumHeight() const;
118 void setMinimumHeight(qreal height);
119 void resetMinimumHeight();
120
121 qreal preferredWidth() const;
122 void setPreferredWidth(qreal width);
123 void resetPreferredWidth();
124
125 qreal preferredHeight() const;
126 void setPreferredHeight(qreal height);
127 void resetPreferredHeight();
128
129 qreal maximumWidth() const;
130 void setMaximumWidth(qreal width);
131 void resetMaximumWidth();
132
133 qreal maximumHeight() const;
134 void setMaximumHeight(qreal height);
135 void resetMaximumHeight();
136
137 bool fillWidth() const;
138 void setFillWidth(bool fill);
139
140 bool fillHeight() const;
141 void setFillHeight(bool fill);
142
153
154private:
155 Q_DISABLE_COPY(QQuickSplitViewAttached)
156 Q_DECLARE_PRIVATE(QQuickSplitViewAttached)
157};
158
159class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSplitHandleAttached : public QObject
160{
162 Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL)
163 Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged FINAL)
164 QML_NAMED_ELEMENT(SplitHandle)
168
169public:
170 explicit QQuickSplitHandleAttached(QObject *parent = nullptr);
171
172 bool isHovered() const;
173 bool isPressed() const;
174
175 static QQuickSplitHandleAttached *qmlAttachedProperties(QObject *object);
176
180
181private:
182 Q_DISABLE_COPY(QQuickSplitHandleAttached)
183 Q_DECLARE_PRIVATE(QQuickSplitHandleAttached)
184};
185
187
189
191
192#endif // QQUICKSPLITVIEW_P_H
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtGui
Definition qevent.h:245
\inmodule QtCore
Definition qobject.h:90
The QQmlComponent class encapsulates a QML component definition.
virtual void itemMoved(int index, QQuickItem *item)
virtual void itemAdded(int index, QQuickItem *item)
virtual void itemRemoved(int index, QQuickItem *item)
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
virtual bool isContent(QQuickItem *item) const
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
bool isHovered() const
\qmlproperty bool QtQuick.Controls::Control::hovered \readonly
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:64
virtual void hoverMoveEvent(QHoverEvent *event)
This event handler can be reimplemented in a subclass to receive hover-move events for an item.
virtual bool childMouseEventFilter(QQuickItem *, QEvent *)
Reimplement this method to filter the pointer events that are received by this item's children.
virtual void hoverLeaveEvent(QHoverEvent *event)
This event handler can be reimplemented in a subclass to receive hover-leave events for an item.
void handleChanged()
void resizingChanged()
void orientationChanged()
QQmlComponent * handle()
\inmodule QtCore\reentrant
Definition qrect.h:483
\inmodule QtCore
Definition qvariant.h:64
else opt state
[0]
Combined button and popup list for selecting options.
Orientation
Definition qnamespace.h:97
GLuint64 GLenum void * handle
GLint GLsizei GLsizei height
GLuint index
[2]
GLint GLsizei width
struct _cl_event * event
#define QML_DECLARE_TYPE(TYPE)
Definition qqml.h:19
#define QML_UNCREATABLE(REASON)
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QML_ATTACHED(ATTACHED_TYPE)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_INVOKABLE
#define Q_SIGNALS
double qreal
Definition qtypes.h:92
ba fill(true)
QGraphicsItem * item
QQuickView * view
[0]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent