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
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
21QT_REQUIRE_CONFIG(quicktemplates2_container);
22
24
30
31class Q_QUICKTEMPLATES2_EXPORT QQuickSplitView : public QQuickContainer
32{
34 Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
35 Q_PROPERTY(bool resizing READ isResizing NOTIFY resizingChanged)
36 Q_PROPERTY(QQmlComponent *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL)
37 QML_NAMED_ELEMENT(SplitView)
40
41public:
42 explicit QQuickSplitView(QQuickItem *parent = nullptr);
43 ~QQuickSplitView() override;
44
45 Qt::Orientation orientation() const;
46 void setOrientation(Qt::Orientation orientation);
47
48 bool isResizing() const;
49
51 void setHandle(QQmlComponent *handle);
52
53 bool isContent(QQuickItem *item) const override;
54
55 static QQuickSplitViewAttached *qmlAttachedProperties(QObject *object);
56
57 // Based on the same code in QMainWindow.
59 VersionMarker = 0xff
60 };
61 Q_INVOKABLE QVariant saveState();
62 Q_INVOKABLE bool restoreState(const QVariant &state);
63
68
69protected:
71
72 void componentComplete() override;
73 void hoverMoveEvent(QHoverEvent *event) override;
74 void hoverLeaveEvent(QHoverEvent *event) override;
75 bool childMouseEventFilter(QQuickItem *item, QEvent *event) override;
76 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
77
78 void itemAdded(int index, QQuickItem *item) override;
79 void itemMoved(int index, QQuickItem *item) override;
80 void itemRemoved(int index, QQuickItem *item) override;
81
82#if QT_CONFIG(accessibility)
83 QAccessible::Role accessibleRole() const override;
84#endif
85
86private:
87 Q_DISABLE_COPY(QQuickSplitView)
88 Q_DECLARE_PRIVATE(QQuickSplitView)
89};
90
91class Q_QUICKTEMPLATES2_EXPORT QQuickSplitViewAttached : public QObject
92{
94 Q_PROPERTY(QQuickSplitView *view READ view NOTIFY viewChanged FINAL)
95 Q_PROPERTY(qreal minimumWidth READ minimumWidth WRITE setMinimumWidth
96 RESET resetMinimumWidth NOTIFY minimumWidthChanged FINAL)
97 Q_PROPERTY(qreal minimumHeight READ minimumHeight WRITE setMinimumHeight
98 RESET resetMinimumHeight NOTIFY minimumHeightChanged FINAL)
99 Q_PROPERTY(qreal preferredWidth READ preferredWidth WRITE setPreferredWidth
100 RESET resetPreferredWidth NOTIFY preferredWidthChanged FINAL)
101 Q_PROPERTY(qreal preferredHeight READ preferredHeight WRITE setPreferredHeight
102 RESET resetPreferredHeight NOTIFY preferredHeightChanged FINAL)
103 Q_PROPERTY(qreal maximumWidth READ maximumWidth WRITE setMaximumWidth
104 RESET resetMaximumWidth NOTIFY maximumWidthChanged FINAL)
105 Q_PROPERTY(qreal maximumHeight READ maximumHeight WRITE setMaximumHeight
106 RESET resetMaximumHeight NOTIFY maximumHeightChanged FINAL)
107 Q_PROPERTY(bool fillHeight READ fillHeight WRITE setFillHeight NOTIFY fillHeightChanged FINAL)
108 Q_PROPERTY(bool fillWidth READ fillWidth WRITE setFillWidth NOTIFY fillWidthChanged FINAL)
109
110public:
111 explicit QQuickSplitViewAttached(QObject *parent = nullptr);
112
113 QQuickSplitView *view() const;
114
115 qreal minimumWidth() const;
116 void setMinimumWidth(qreal width);
117 void resetMinimumWidth();
118
119 qreal minimumHeight() const;
120 void setMinimumHeight(qreal height);
121 void resetMinimumHeight();
122
123 qreal preferredWidth() const;
124 void setPreferredWidth(qreal width);
125 void resetPreferredWidth();
126
127 qreal preferredHeight() const;
128 void setPreferredHeight(qreal height);
129 void resetPreferredHeight();
130
131 qreal maximumWidth() const;
132 void setMaximumWidth(qreal width);
133 void resetMaximumWidth();
134
135 qreal maximumHeight() const;
136 void setMaximumHeight(qreal height);
137 void resetMaximumHeight();
138
139 bool fillWidth() const;
140 void setFillWidth(bool fill);
141
142 bool fillHeight() const;
143 void setFillHeight(bool fill);
144
146 void viewChanged();
147 void minimumWidthChanged();
148 void minimumHeightChanged();
149 void preferredWidthChanged();
150 void preferredHeightChanged();
151 void maximumWidthChanged();
152 void maximumHeightChanged();
153 void fillWidthChanged();
154 void fillHeightChanged();
155
156private:
157 Q_DISABLE_COPY(QQuickSplitViewAttached)
158 Q_DECLARE_PRIVATE(QQuickSplitViewAttached)
159};
160
161class Q_QUICKTEMPLATES2_EXPORT QQuickSplitHandleAttached : public QObject
162{
164 Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL)
165 Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged FINAL)
166 QML_NAMED_ELEMENT(SplitHandle)
170
171public:
172 explicit QQuickSplitHandleAttached(QObject *parent = nullptr);
173
174 bool isHovered() const;
175 bool isPressed() const;
176
177 static QQuickSplitHandleAttached *qmlAttachedProperties(QObject *object);
178
180 void hoveredChanged();
181 void pressedChanged();
182
183private:
184 Q_DISABLE_COPY(QQuickSplitHandleAttached)
185 Q_DECLARE_PRIVATE(QQuickSplitHandleAttached)
186};
187
189
190#endif // QQUICKSPLITVIEW_P_H
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtGui
Definition qevent.h:246
\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
void handleChanged()
void resizingChanged()
void orientationChanged()
\inmodule QtCore\reentrant
Definition qrect.h:484
\inmodule QtCore
Definition qvariant.h:65
else opt state
[0]
Combined button and popup list for selecting options.
Definition qcompare.h:63
Orientation
Definition qnamespace.h:98
GLuint64 GLenum void * handle
GLint GLsizei GLsizei height
GLuint index
[2]
GLint GLsizei width
struct _cl_event * event
#define QML_UNCREATABLE(REASON)
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QML_ATTACHED(ATTACHED_TYPE)
#define QT_REQUIRE_CONFIG(feature)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_INVOKABLE
#define Q_SIGNALS
double qreal
Definition qtypes.h:187
#define explicit
ba fill(true)
QGraphicsItem * item
QQuickView * view
[0]