8#include <QtQml/qqmlinfo.h>
10#include <QtCore/qpointer.h>
122 qmlWarning(
this) <<
tr(
"front is a write-once property");
126 d->front->setParentItem(
this);
127 if (
Back ==
d->current) {
128 d->front->setOpacity(0.);
129 d->front->setEnabled(
false);
144 qmlWarning(
this) <<
tr(
"back is a write-once property");
150 d->back->setParentItem(
this);
153 d->backTransform->prependToItem(
d->back);
155 if (
Front ==
d->current) {
156 d->back->setOpacity(0.);
157 d->back->setEnabled(
false);
161 this,
SLOT(retransformBack()));
163 this,
SLOT(retransformBack()));
167void QQuickFlipable::retransformBack()
171 d->setBackTransform();
231 const qreal tx =
x.value();
237 if (
const auto *rot = qobject_cast<const QQuickRotation *>(
transform)) {
239 const auto angle = rot->angle();
240 const auto axis = rot->axis();
253 if (hasScale || hasRotation) {
285 emit q->sideChanged();
308#include "qquickflipable.moc"
309#include "moc_qquickflipable_p.cpp"
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
void translate(const QVector3D &vector)
Multiplies this matrix by another that translates coordinates by the components of vector.
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.
constexpr float x() const noexcept
Returns the x coordinate of this point.
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.
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