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
qquickstateoperations_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QQUICKSTATEOPERATIONS_P_H
5#define QQUICKSTATEOPERATIONS_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 "qquickitem.h"
19#include "qquickanchors_p.h"
20
21#include <QtQuick/private/qquickstate_p.h>
22
23#include <QtQml/qqmlscriptstring.h>
24
26
29{
31 Q_DECLARE_PRIVATE(QQuickParentChange)
32
33 Q_PROPERTY(QQuickItem *target READ object WRITE setObject)
34 Q_PROPERTY(QQuickItem *parent READ parent WRITE setParent)
36 Q_PROPERTY(QQmlScriptString y READ y WRITE setY)
40 Q_PROPERTY(QQmlScriptString rotation READ rotation WRITE setRotation)
41 Q_CLASSINFO("ParentProperty", "parent")
42 QML_NAMED_ELEMENT(ParentChange)
44public:
45 QQuickParentChange(QObject *parent=nullptr);
46
47 QQuickItem *object() const;
48 void setObject(QQuickItem *);
49
50 QQuickItem *parent() const;
51 void setParent(QQuickItem *);
52
53 QQuickItem *originalParent() const;
54
55 QQmlScriptString x() const;
56 void setX(const QQmlScriptString &x);
57 bool xIsSet() const;
58
59 QQmlScriptString y() const;
60 void setY(const QQmlScriptString &y);
61 bool yIsSet() const;
62
63 QQmlScriptString width() const;
64 void setWidth(const QQmlScriptString &width);
65 bool widthIsSet() const;
66
68 void setHeight(const QQmlScriptString &height);
69 bool heightIsSet() const;
70
71 QQmlScriptString scale() const;
72 void setScale(const QQmlScriptString &scale);
73 bool scaleIsSet() const;
74
75 QQmlScriptString rotation() const;
76 void setRotation(const QQmlScriptString &rotation);
77 bool rotationIsSet() const;
78
79 ActionList actions() override;
80
81 void saveOriginals() override;
82 //virtual void copyOriginals(QQuickStateActionEvent*);
83 void execute() override;
84 bool isReversable() override;
85 void reverse() override;
86 EventType type() const override;
87 bool mayOverride(QQuickStateActionEvent*other) override;
88 void rewind() override;
89 void saveCurrentValues() override;
90};
91
94class Q_QUICK_EXPORT QQuickAnchorSet : public QObject
95{
97
98 Q_PROPERTY(QQmlScriptString left READ left WRITE setLeft RESET resetLeft FINAL)
99 Q_PROPERTY(QQmlScriptString right READ right WRITE setRight RESET resetRight FINAL)
100 Q_PROPERTY(QQmlScriptString horizontalCenter READ horizontalCenter WRITE setHorizontalCenter RESET resetHorizontalCenter FINAL)
101 Q_PROPERTY(QQmlScriptString top READ top WRITE setTop RESET resetTop FINAL)
102 Q_PROPERTY(QQmlScriptString bottom READ bottom WRITE setBottom RESET resetBottom FINAL)
103 Q_PROPERTY(QQmlScriptString verticalCenter READ verticalCenter WRITE setVerticalCenter RESET resetVerticalCenter FINAL)
104 Q_PROPERTY(QQmlScriptString baseline READ baseline WRITE setBaseline RESET resetBaseline FINAL)
107
108public:
109 QQuickAnchorSet(QObject *parent=nullptr);
110 virtual ~QQuickAnchorSet();
111
112 QQmlScriptString left() const;
113 void setLeft(const QQmlScriptString &edge);
114 void resetLeft();
115
116 QQmlScriptString right() const;
117 void setRight(const QQmlScriptString &edge);
118 void resetRight();
119
120 QQmlScriptString horizontalCenter() const;
121 void setHorizontalCenter(const QQmlScriptString &edge);
122 void resetHorizontalCenter();
123
124 QQmlScriptString top() const;
125 void setTop(const QQmlScriptString &edge);
126 void resetTop();
127
128 QQmlScriptString bottom() const;
129 void setBottom(const QQmlScriptString &edge);
130 void resetBottom();
131
132 QQmlScriptString verticalCenter() const;
133 void setVerticalCenter(const QQmlScriptString &edge);
134 void resetVerticalCenter();
135
136 QQmlScriptString baseline() const;
137 void setBaseline(const QQmlScriptString &edge);
138 void resetBaseline();
139
140 QQuickAnchors::Anchors usedAnchors() const;
141
142private:
144 Q_DISABLE_COPY(QQuickAnchorSet)
145 Q_DECLARE_PRIVATE(QQuickAnchorSet)
146};
147
150{
152 Q_DECLARE_PRIVATE(QQuickAnchorChanges)
153
154 Q_PROPERTY(QQuickItem *target READ object WRITE setObject)
156 QML_NAMED_ELEMENT(AnchorChanges)
158
159public:
160 QQuickAnchorChanges(QObject *parent=nullptr);
161
162 ActionList actions() override;
163
164 QQuickAnchorSet *anchors() const;
165
166 QQuickItem *object() const;
167 void setObject(QQuickItem *);
168
169 void execute() override;
170 bool isReversable() override;
171 void reverse() override;
172 EventType type() const override;
173 bool mayOverride(QQuickStateActionEvent*other) override;
174 bool changesBindings() override;
175 void saveOriginals() override;
176 bool needsCopy() override { return true; }
177 void copyOriginals(QQuickStateActionEvent*) override;
178 void clearBindings() override;
179 void rewind() override;
180 void saveCurrentValues() override;
181
182 QList<QQuickStateAction> additionalActions() const;
183 void saveTargetValues() override;
184};
185
187
188#endif // QQUICKSTATEOPERATIONS_P_H
189
\inmodule QtCore
Definition qobject.h:103
The QQmlScriptString class encapsulates a script and its context.
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.
GLint GLint GLint GLint GLint x
[0]
GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble GLdouble top
GLdouble GLdouble right
GLint GLsizei width
GLint left
GLenum type
GLint GLint bottom
GLenum target
GLint y
GLenum GLenum GLenum GLenum GLenum scale
#define QML_ANONYMOUS
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
QQuickAnchors * anchors(QQuickItem *item)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_CLASSINFO(name, value)
p setX(p.x()+1)
QSharedPointer< T > other(t)
[5]
file setParent(multiPart)