summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-07-02 06:15:41 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-07-02 06:15:41 (GMT)
commit0549df8e6b43fc6aa3d3750bcd0346344f272fd1 (patch)
tree94e532f2e3018aaf7b01b896e255b2376aa626b3 /src/declarative/fx
parent49bceaf197a5964f244ac094aaa75b35cf3ada49 (diff)
parentc84fefd59090c0d0f757572fe14b493d94759808 (diff)
downloadQt-0549df8e6b43fc6aa3d3750bcd0346344f272fd1.zip
Qt-0549df8e6b43fc6aa3d3750bcd0346344f272fd1.tar.gz
Qt-0549df8e6b43fc6aa3d3750bcd0346344f272fd1.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/fx')
-rw-r--r--src/declarative/fx/qfxcomponentinstance.cpp2
-rw-r--r--src/declarative/fx/qfxflickable_p.h2
-rw-r--r--src/declarative/fx/qfximage.cpp2
-rw-r--r--src/declarative/fx/qfxitem.cpp2
-rw-r--r--src/declarative/fx/qfxlayouts.cpp2
-rw-r--r--src/declarative/fx/qfxpath.cpp2
-rw-r--r--src/declarative/fx/qfxpathview_p.h1
-rw-r--r--src/declarative/fx/qfxpixmap.cpp2
-rw-r--r--src/declarative/fx/qfxtext.cpp27
-rw-r--r--src/declarative/fx/qfxtext.h4
-rw-r--r--src/declarative/fx/qfxtext_p.h3
-rw-r--r--src/declarative/fx/qfxtextedit.cpp2
12 files changed, 40 insertions, 11 deletions
diff --git a/src/declarative/fx/qfxcomponentinstance.cpp b/src/declarative/fx/qfxcomponentinstance.cpp
index d3f7061..7f592a9 100644
--- a/src/declarative/fx/qfxcomponentinstance.cpp
+++ b/src/declarative/fx/qfxcomponentinstance.cpp
@@ -41,7 +41,7 @@
#include "qfxcomponentinstance.h"
#include "qfxcomponentinstance_p.h"
-#include <qfxperf.h>
+#include <private/qfxperf_p.h>
#include <qfxcontentwrapper.h>
#include <QtDeclarative/qmlinfo.h>
diff --git a/src/declarative/fx/qfxflickable_p.h b/src/declarative/fx/qfxflickable_p.h
index a3b1500..28ec6d8 100644
--- a/src/declarative/fx/qfxflickable_p.h
+++ b/src/declarative/fx/qfxflickable_p.h
@@ -57,7 +57,7 @@
#include "qfxflickable.h"
#include "qfxitem_p.h"
#include "qml.h"
-#include "qmltimelinevalueproxy.h"
+#include "private/qmltimeline_p.h"
#include "private/qmlanimation_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp
index 58d597a..539ad02 100644
--- a/src/declarative/fx/qfximage.cpp
+++ b/src/declarative/fx/qfximage.cpp
@@ -41,7 +41,7 @@
#include "qfximage.h"
#include "qfximage_p.h"
-#include <qfxperf.h>
+#include <private/qfxperf_p.h>
#if defined(QFX_RENDER_OPENGL)
#include <glsave.h>
#endif
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp
index 7ccad5f..223af60 100644
--- a/src/declarative/fx/qfxitem.cpp
+++ b/src/declarative/fx/qfxitem.cpp
@@ -47,7 +47,7 @@
#include <QNetworkRequest>
#include <QGraphicsSceneMouseEvent>
#include <QtScript/qscriptengine.h>
-#include <qfxperf.h>
+#include <private/qfxperf_p.h>
#include "qmlengine.h"
#include "qmlstate.h"
diff --git a/src/declarative/fx/qfxlayouts.cpp b/src/declarative/fx/qfxlayouts.cpp
index af51318..20e7c7c 100644
--- a/src/declarative/fx/qfxlayouts.cpp
+++ b/src/declarative/fx/qfxlayouts.cpp
@@ -45,7 +45,7 @@
#include "qmlstate.h"
#include "qmlstategroup.h"
#include "qmlstateoperations.h"
-#include "qfxperf.h"
+#include "private/qfxperf_p.h"
#include "qfxlayouts.h"
#include "qfxlayouts_p.h"
diff --git a/src/declarative/fx/qfxpath.cpp b/src/declarative/fx/qfxpath.cpp
index be731b1..4c241d3 100644
--- a/src/declarative/fx/qfxpath.cpp
+++ b/src/declarative/fx/qfxpath.cpp
@@ -41,7 +41,7 @@
#include "qfxpath.h"
#include "qfxpath_p.h"
-#include <qfxperf.h>
+#include <private/qfxperf_p.h>
#include <private/qbezier_p.h>
diff --git a/src/declarative/fx/qfxpathview_p.h b/src/declarative/fx/qfxpathview_p.h
index b5c5ba2..b77c2a0 100644
--- a/src/declarative/fx/qfxpathview_p.h
+++ b/src/declarative/fx/qfxpathview_p.h
@@ -58,7 +58,6 @@
#include "qfxitem_p.h"
#include "qfxvisualitemmodel.h"
#include "qml.h"
-#include "qmltimelinevalueproxy.h"
#include "private/qmlanimation_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/fx/qfxpixmap.cpp b/src/declarative/fx/qfxpixmap.cpp
index 0ea94f5..5ee6528 100644
--- a/src/declarative/fx/qfxpixmap.cpp
+++ b/src/declarative/fx/qfxpixmap.cpp
@@ -43,7 +43,7 @@
#include <QHash>
#include <QNetworkReply>
#include <QPixmapCache>
-#include <qfxperf.h>
+#include <private/qfxperf_p.h>
#include <QtDeclarative/qmlengine.h>
#include <QFile>
diff --git a/src/declarative/fx/qfxtext.cpp b/src/declarative/fx/qfxtext.cpp
index 9550af9..f2519dc 100644
--- a/src/declarative/fx/qfxtext.cpp
+++ b/src/declarative/fx/qfxtext.cpp
@@ -48,7 +48,7 @@
#include "glbasicshaders.h"
#endif
-#include <qfxperf.h>
+#include <private/qfxperf_p.h>
#include <QTextLayout>
#include <QTextLine>
#include <QTextDocument>
@@ -701,6 +701,21 @@ void QFxTextPrivate::checkImgCache()
imgDirty = false;
}
+bool QFxText::smoothTransform() const
+{
+ Q_D(const QFxText);
+ return d->smooth;
+}
+
+void QFxText::setSmoothTransform(bool s)
+{
+ Q_D(QFxText);
+ if (d->smooth == s)
+ return;
+ d->smooth = s;
+ update();
+}
+
#if defined(QFX_RENDER_QPAINTER)
void QFxText::paintContents(QPainter &p)
{
@@ -709,6 +724,11 @@ void QFxText::paintContents(QPainter &p)
if (d->imgCache.isNull())
return;
+ bool oldAA = p.testRenderHint(QPainter::Antialiasing);
+ bool oldSmooth = p.testRenderHint(QPainter::SmoothPixmapTransform);
+ if (d->smooth)
+ p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, d->smooth);
+
int w = width();
int h = height();
@@ -749,6 +769,11 @@ void QFxText::paintContents(QPainter &p)
p.drawPixmap(x, y, d->imgCache);
if (needClip)
p.restore();
+
+ if (d->smooth) {
+ p.setRenderHint(QPainter::Antialiasing, oldAA);
+ p.setRenderHint(QPainter::SmoothPixmapTransform, oldSmooth);
+ }
}
#elif defined(QFX_RENDER_OPENGL2)
diff --git a/src/declarative/fx/qfxtext.h b/src/declarative/fx/qfxtext.h
index 1f5a7b8..104d18c 100644
--- a/src/declarative/fx/qfxtext.h
+++ b/src/declarative/fx/qfxtext.h
@@ -69,6 +69,7 @@ class Q_DECLARATIVE_EXPORT QFxText : public QFxItem
Q_PROPERTY(bool wrap READ wrap WRITE setWrap)
Q_PROPERTY(Qt::TextElideMode elide READ elideMode WRITE setElideMode)
Q_PROPERTY(QString activeLink READ activeLink)
+ Q_PROPERTY(bool smooth READ smoothTransform WRITE setSmoothTransform)
public:
QFxText(QFxItem *parent=0);
@@ -113,6 +114,9 @@ public:
QString activeLink() const;
+ bool smoothTransform() const;
+ void setSmoothTransform(bool);
+
virtual void dump(int depth);
virtual QString propertyInfo() const;
diff --git a/src/declarative/fx/qfxtext_p.h b/src/declarative/fx/qfxtext_p.h
index dfaef63..c58705c 100644
--- a/src/declarative/fx/qfxtext_p.h
+++ b/src/declarative/fx/qfxtext_p.h
@@ -75,7 +75,7 @@ public:
QFxTextPrivate()
: _font(0), color((QRgb)0), style(QFxText::Normal), imgDirty(true),
hAlign(QFxText::AlignLeft), vAlign(QFxText::AlignTop), elideMode(Qt::ElideNone),
- dirty(false), wrap(false), richText(false), singleline(false), control(0), doc(0)
+ dirty(false), wrap(false), smooth(false), richText(false), singleline(false), control(0), doc(0)
{
}
@@ -125,6 +125,7 @@ public:
Qt::TextElideMode elideMode;
bool dirty;
bool wrap;
+ bool smooth;
bool richText;
bool singleline;
QTextControl *control;
diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp
index 03dd63f..7f08fba 100644
--- a/src/declarative/fx/qfxtextedit.cpp
+++ b/src/declarative/fx/qfxtextedit.cpp
@@ -48,7 +48,7 @@
#include "glbasicshaders.h"
#endif
-#include <qfxperf.h>
+#include <private/qfxperf_p.h>
#include "qfxevents_p.h"
#include <QTextLayout>
#include <QTextLine>