summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qmlgraphicspainteditem_p.h
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-12-02 05:35:43 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-12-02 05:35:43 (GMT)
commit289645d2bf46c1d6eace7a0d60389a9c10dd0c34 (patch)
tree18f4566813e2e18adcdf5f0a605b95a2276bef04 /src/declarative/graphicsitems/qmlgraphicspainteditem_p.h
parent1893849a7e90781b85f15ac32bef972b0087a720 (diff)
downloadQt-289645d2bf46c1d6eace7a0d60389a9c10dd0c34.zip
Qt-289645d2bf46c1d6eace7a0d60389a9c10dd0c34.tar.gz
Qt-289645d2bf46c1d6eace7a0d60389a9c10dd0c34.tar.bz2
Change from scaling/zooming by zoomFactor to instead use painter scaling.
Uses a fixed zoomFactor of 4 to allow sufficient sub-"pixel" precision.
Diffstat (limited to 'src/declarative/graphicsitems/qmlgraphicspainteditem_p.h')
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspainteditem_p.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicspainteditem_p.h b/src/declarative/graphicsitems/qmlgraphicspainteditem_p.h
index f6bb078..d59f6d1 100644
--- a/src/declarative/graphicsitems/qmlgraphicspainteditem_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicspainteditem_p.h
@@ -56,10 +56,11 @@ class Q_DECLARATIVE_EXPORT QmlGraphicsPaintedItem : public QmlGraphicsItem
{
Q_OBJECT
- Q_PROPERTY(QSize contentsSize READ contentsSize WRITE setContentsSize)
+ Q_PROPERTY(QSize contentsSize READ contentsSize WRITE setContentsSize NOTIFY contentsSizeChanged)
Q_PROPERTY(QColor fillColor READ fillColor WRITE setFillColor NOTIFY fillColorChanged)
Q_PROPERTY(int pixelCacheSize READ pixelCacheSize WRITE setPixelCacheSize)
Q_PROPERTY(bool smoothCache READ smoothCache WRITE setSmoothCache)
+ Q_PROPERTY(qreal contentsScale READ contentsScale WRITE setContentsScale NOTIFY contentsScaleChanged)
public:
@@ -69,6 +70,9 @@ public:
QSize contentsSize() const;
void setContentsSize(const QSize &);
+ qreal contentsScale() const;
+ void setContentsScale(qreal);
+
int pixelCacheSize() const;
void setPixelCacheSize(int pixels);
@@ -89,6 +93,8 @@ protected:
Q_SIGNALS:
void fillColorChanged();
+ void contentsSizeChanged();
+ void contentsScaleChanged();
protected Q_SLOTS:
void dirtyCache(const QRect &);