42 #include "private/qdeclarativeflipable_p.h" 44 #include "private/qdeclarativeitem_p.h" 45 #include "private/qdeclarativeguard_p.h" 49 #include <QtGui/qgraphicstransform.h> 144 qmlInfo(
this) <<
tr(
"front is a write-once property");
148 d->front->setParentItem(
this);
149 if (
Back ==
d->current)
150 d->front->setOpacity(0.);
164 qmlInfo(
this) <<
tr(
"back is a write-once property");
168 d->back->setParentItem(
this);
170 d->back->setOpacity(0.);
182 d->setBackTransform();
197 if (
d->dirtySceneTransform)
218 p1 = q->mapToParent(p1);
219 p2 = q->mapToParent(p2);
220 p3 = q->mapToParent(p3);
222 qreal cross = (scenep1.
x() - scenep2.
x()) * (scenep3.
y() - scenep2.
y()) -
223 (scenep1.
y() - scenep2.
y()) * (scenep3.
x() - scenep2.
x());
225 wantBackYFlipped = p1.
x() >= p2.
x();
226 wantBackXFlipped = p2.
y() >= p3.
y();
235 if (newSide != current) {
243 emit q->sideChanged();
255 if (dBack->
width() && wantBackYFlipped)
257 if (dBack->
height() && wantBackXFlipped)
QGraphicsObject * front()
QDeclarativeFlipablePrivate()
#define QT_END_NAMESPACE
This macro expands to.
void setBack(QGraphicsObject *)
QDeclarativeParserStatus ** d
void setTransform(const QTransform &matrix, bool combine=false)
Sets the item's current transformation matrix to matrix.
QTransform sceneTransform() const
Returns this item's scene transformation matrix.
virtual qreal height() const
virtual void updateSceneTransformFromParent()
The QPointF class defines a point in the plane using floating point precision.
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
qreal x() const
Returns the x-coordinate of this point.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QDeclarativeItem class provides the most basic of all visual items in QML.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
void setFront(QGraphicsObject *)
void updateSceneTransformFromParent()
QDeclarativeGuard< QGraphicsObject > back
#define Q_DECLARE_PUBLIC(Class)
virtual qreal width() const
QDeclarativeFlipable::Side current
static const QGraphicsItemPrivate * get(const QGraphicsItem *item)
qreal y() const
Returns the y-coordinate of this point.
QDeclarativeFlipable(QDeclarativeItem *parent=0)
QDeclarativeInfo qmlInfo(const QObject *me)
void setOpacity(qreal opacity)
Sets this item's local opacity, between 0.
The QGraphicsObject class provides a base class for all graphics items that require signals...
QDeclarativeGuard< QGraphicsObject > front