summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2010-12-03 22:41:28 +0100
committerGunnar Sletta <gunnar.sletta@nokia.com>2010-12-03 22:41:28 +0100
commitceeb7eab3be942f424b15a1825dc656a0d5bf7c4 (patch)
tree54f1619feab342e30d3b23da7ad415de57ca1e62
parent6dcc29c938cb404d2473188e046cb2616b2bbf9b (diff)
remove some unused code and improve my testcase a bit
-rw-r--r--src/graphicsitems/qximage.cpp24
-rw-r--r--src/graphicsitems/qximage_p.h5
-rw-r--r--src/graphicsitems/qximage_p_p.h1
-rw-r--r--src/scenegraph/coreapi/renderer.cpp2
-rw-r--r--tests/image-asynchronous.qml19
5 files changed, 12 insertions, 39 deletions
diff --git a/src/graphicsitems/qximage.cpp b/src/graphicsitems/qximage.cpp
index 68ceac0..4ea42ce 100644
--- a/src/graphicsitems/qximage.cpp
+++ b/src/graphicsitems/qximage.cpp
@@ -63,29 +63,6 @@ QxImage::~QxImage()
delete d->node;
}
-QPixmap QxImage::pixmap() const
-{
- Q_D(const QxImage);
- return d->pix.pixmap();
-}
-
-void QxImage::setPixmap(const QPixmap &pix)
-{
- Q_D(QxImage);
- if (!d->url.isEmpty())
- return;
- d->setPixmap(pix);
-}
-
-void QxImagePrivate::setPixmap(const QPixmap &pixmap)
-{
- Q_Q(QxImage);
- pix.setPixmap(pixmap);
-
- if (node)
- q->pixmapChange();
-}
-
QxImage::FillMode QxImage::fillMode() const
{
Q_D(const QxImage);
@@ -235,7 +212,6 @@ void QxImage::pixmapChange()
d->status = d->pix.isNull() ? QxImageBase::Null : QxImageBase::Ready;
d->pixmapDirty = true;
d->update();
- emit pixmapChanged();
}
void QxImage::renderOpacityChanged(qreal newOpacity, qreal oldOpacity)
diff --git a/src/graphicsitems/qximage_p.h b/src/graphicsitems/qximage_p.h
index 229126b..47c4d30 100644
--- a/src/graphicsitems/qximage_p.h
+++ b/src/graphicsitems/qximage_p.h
@@ -52,7 +52,6 @@ class QxImage : public QxImageBase
Q_OBJECT
Q_ENUMS(FillMode)
- Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap NOTIFY pixmapChanged DESIGNABLE false)
Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode NOTIFY fillModeChanged)
Q_PROPERTY(qreal paintedWidth READ paintedWidth NOTIFY paintedGeometryChanged)
Q_PROPERTY(qreal paintedHeight READ paintedHeight NOTIFY paintedGeometryChanged)
@@ -65,14 +64,10 @@ public:
FillMode fillMode() const;
void setFillMode(FillMode);
- QPixmap pixmap() const;
- void setPixmap(const QPixmap &);
-
qreal paintedWidth() const;
qreal paintedHeight() const;
Q_SIGNALS:
- void pixmapChanged();
void fillModeChanged();
void paintedGeometryChanged();
diff --git a/src/graphicsitems/qximage_p_p.h b/src/graphicsitems/qximage_p_p.h
index 9de93f2..7c17975 100644
--- a/src/graphicsitems/qximage_p_p.h
+++ b/src/graphicsitems/qximage_p_p.h
@@ -70,7 +70,6 @@ public:
QxImage::FillMode fillMode;
qreal paintedWidth;
qreal paintedHeight;
- void setPixmap(const QPixmap &pix);
void update();
void updateOpacity();
diff --git a/src/scenegraph/coreapi/renderer.cpp b/src/scenegraph/coreapi/renderer.cpp
index 79a5fcd..b666188 100644
--- a/src/scenegraph/coreapi/renderer.cpp
+++ b/src/scenegraph/coreapi/renderer.cpp
@@ -50,6 +50,8 @@
#include <qglframebufferobject.h>
#include <QtGui/qapplication.h>
+#include <qdatetime.h>
+
//#define RENDERER_DEBUG
//#define QT_GL_NO_SCISSOR_TEST
diff --git a/tests/image-asynchronous.qml b/tests/image-asynchronous.qml
index b1c441e..9212d18 100644
--- a/tests/image-asynchronous.qml
+++ b/tests/image-asynchronous.qml
@@ -9,11 +9,11 @@ Rectangle {
Image {
id: image
source: state == 1 || state == 3 ? "/Users/gunnar/Pictures/big.jpg" : ""
- width: 100
- height: 100
+ width: 300
+ height: 200
asynchronous: true
- opacity: source == "" ? 0.01 : 1
+ opacity: source == "" ? 0 : 1
property int state: 0
@@ -21,12 +21,6 @@ Rectangle {
NumberAnimation { duration: 250 }
}
- MouseArea {
- anchors.fill: parent
- onClicked: {
- image.state = (image.state + 1) % 4;
- }
- }
}
@@ -66,6 +60,13 @@ Rectangle {
}
}
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ image.state = (image.state + 1) % 4;
+ }
+ }
+
}