8#include <QtQml/qqmlinfo.h>
120 qmlWarning(
this) <<
tr(
"front is a write-once property");
124 d->front->setParentItem(
this);
125 if (
Back ==
d->current) {
126 d->front->setOpacity(0.);
127 d->front->setEnabled(
false);
142 qmlWarning(
this) <<
tr(
"back is a write-once property");
148 d->back->setParentItem(
this);
151 d->backTransform->prependToItem(
d->back);
153 if (
Front ==
d->current) {
154 d->back->setOpacity(0.);
155 d->back->setEnabled(
false);
159 this,
SLOT(retransformBack()));
161 this,
SLOT(retransformBack()));
165void QQuickFlipable::retransformBack()
169 d->setBackTransform();
229 const qreal tx =
x.value();
235 if (
const auto *rot = qobject_cast<const QQuickRotation *>(
transform)) {
237 const auto angle = rot->angle();
238 const auto axis = rot->axis();
251 if (hasScale || hasRotation) {
283 emit q->sideChanged();
306#include "qquickflipable.moc"
307#include "moc_qquickflipable_p.cpp"
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
\inmodule QtCore\reentrant
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
QPointer< QQuickItem > front
bool transformChanged(QQuickItem *transformedItem) override
QPointer< QQuickLocalTransform > backTransform
QQuickFlipable::Side current
QPointer< QQuickItem > back
void setBack(QQuickItem *)
QQuickFlipable(QQuickItem *parent=nullptr)
\qmltype Flipable \instantiates QQuickFlipable \inqmlmodule QtQuick \inherits Item
void updatePolish() override
This function should perform any layout as required for this item.
void setFront(QQuickItem *)
virtual bool transformChanged(QQuickItem *transformedItem)
QList< QQuickTransform * > transforms
QQuickItem::TransformOrigin origin() const
QPointF computeTransformOrigin() const
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
qreal width
This property holds the width of this item.
qreal height
This property holds the height of this item.
The QVector3D class represents a vector or vertex in 3D space.
static constexpr QVector3D crossProduct(QVector3D v1, QVector3D v2) noexcept
Returns the cross-product of vectors v1 and v2, which is normal to the plane spanned by v1 and v2.
constexpr float z() const noexcept
Returns the z coordinate of this point.
Combined button and popup list for selecting options.
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
bool qFuzzyIsNull(qfloat16 f) noexcept
GLint GLint GLint GLint GLint x
[0]
GLdouble GLdouble GLdouble GLdouble top
GLuint GLenum GLenum transform
GLdouble GLdouble GLdouble GLdouble q
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
rect sceneTransform().map(QPointF(0
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent