summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx/qfxflipable.cpp
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-04-28 13:41:50 (GMT)
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-04-28 13:57:15 (GMT)
commit98bdb5705119fd71c5de66fb413bfba2257835d3 (patch)
tree0e1be87e7ee21c597fd21c2e9a4b9db795fa8238 /src/declarative/fx/qfxflipable.cpp
parent1fd67315f52dd59667d940057d97f6f7a5ec20d0 (diff)
downloadQt-98bdb5705119fd71c5de66fb413bfba2257835d3.zip
Qt-98bdb5705119fd71c5de66fb413bfba2257835d3.tar.gz
Qt-98bdb5705119fd71c5de66fb413bfba2257835d3.tar.bz2
Coding style refactor, changing 'if(' and 'for(' to 'if (' and 'for ('
Diffstat (limited to 'src/declarative/fx/qfxflipable.cpp')
-rw-r--r--src/declarative/fx/qfxflipable.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/declarative/fx/qfxflipable.cpp b/src/declarative/fx/qfxflipable.cpp
index ee14348..9db0b57 100644
--- a/src/declarative/fx/qfxflipable.cpp
+++ b/src/declarative/fx/qfxflipable.cpp
@@ -126,13 +126,13 @@ QFxItem *QFxFlipable::front()
void QFxFlipable::setFront(QFxItem *front)
{
Q_D(QFxFlipable);
- if(d->front) {
+ if (d->front) {
qmlInfo(this) << "front is a write-once property";
return;
}
d->front = front;
children()->append(d->front);
- if(Back == d->current)
+ if (Back == d->current)
d->front->setOpacity(0.);
}
@@ -145,13 +145,13 @@ QFxItem *QFxFlipable::back()
void QFxFlipable::setBack(QFxItem *back)
{
Q_D(QFxFlipable);
- if(d->back) {
+ if (d->back) {
qmlInfo(this) << "back is a write-once property";
return;
}
d->back = back;
children()->append(d->back);
- if(Front == d->current)
+ if (Front == d->current)
d->back->setOpacity(0.);
}
@@ -182,36 +182,36 @@ void QFxFlipable::transformChanged(const QSimpleCanvas::Matrix &trans)
(p1.y() - p2.y()) * (p3.x() - p2.x());
Side newSide;
- if(cross > 0) {
+ if (cross > 0) {
newSide = Back;
} else {
newSide = Front;
}
- if(newSide != d->current) {
+ if (newSide != d->current) {
d->current = newSide;
if (d->current==Back) {
QSimpleCanvas::Matrix mat;
#ifdef QFX_RENDER_OPENGL
mat.translate(d->back->width()/2,d->back->height()/2, 0);
- if(d->back->width() && p1.x() >= p2.x())
+ if (d->back->width() && p1.x() >= p2.x())
mat.rotate(180, 0, 1, 0);
- if(d->back->height() && p2.y() >= p3.y())
+ if (d->back->height() && p2.y() >= p3.y())
mat.rotate(180, 1, 0, 0);
mat.translate(-d->back->width()/2,-d->back->height()/2, 0);
#else
mat.translate(d->back->width()/2,d->back->height()/2);
- if(d->back->width() && p1.x() >= p2.x())
+ if (d->back->width() && p1.x() >= p2.x())
mat.rotate(180, Qt::YAxis);
- if(d->back->height() && p2.y() >= p3.y())
+ if (d->back->height() && p2.y() >= p3.y())
mat.rotate(180, Qt::XAxis);
mat.translate(-d->back->width()/2,-d->back->height()/2);
#endif
d->back->setTransform(mat);
}
- if(d->front)
+ if (d->front)
d->front->setOpacity((d->current==Front)?1.:0.);
- if(d->back)
+ if (d->back)
d->back->setOpacity((d->current==Back)?1.:0.);
emit sideChanged();
}