diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-06-29 07:15:41 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-06-29 07:15:41 +0000 |
commit | 3313ab8bb15867c61da035995396d8575f5eca16 (patch) | |
tree | 3239fce3f616ebceb25cb25168274b79cdc2c287 /utils/themeeditor/graphics | |
parent | 449a895372354f8c9abeec28a147f6b88d53a269 (diff) | |
download | rockbox-3313ab8bb15867c61da035995396d8575f5eca16.tar.gz rockbox-3313ab8bb15867c61da035995396d8575f5eca16.zip |
Theme Editor: Implemented conditional rendering, most conditionals should work correctly now
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27169 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/graphics')
-rw-r--r-- | utils/themeeditor/graphics/rbimage.cpp | 14 | ||||
-rw-r--r-- | utils/themeeditor/graphics/rbimage.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/utils/themeeditor/graphics/rbimage.cpp b/utils/themeeditor/graphics/rbimage.cpp index f15d1ed2aa..ce92d2fcde 100644 --- a/utils/themeeditor/graphics/rbimage.cpp +++ b/utils/themeeditor/graphics/rbimage.cpp @@ -49,7 +49,21 @@ RBImage::RBImage(QString file, int tiles, int x, int y, QGraphicsItem* parent) } else + { + size = QRectF(0, 0, 0, 0); + image = 0; + } +} + +RBImage::RBImage(const RBImage &other, QGraphicsItem* parent) + : QGraphicsItem(parent), tiles(other.tiles), currentTile(other.currentTile) +{ + if(other.image) + image = new QPixmap(*(other.image)); + else image = 0; + size = other.size; + setPos(other.x(), other.y()); } RBImage::~RBImage() diff --git a/utils/themeeditor/graphics/rbimage.h b/utils/themeeditor/graphics/rbimage.h index cc949d1de1..abfe8eb052 100644 --- a/utils/themeeditor/graphics/rbimage.h +++ b/utils/themeeditor/graphics/rbimage.h @@ -29,6 +29,7 @@ class RBImage: public QGraphicsItem { public: RBImage(QString file, int tiles, int x, int y, QGraphicsItem* parent = 0); + RBImage(const RBImage& other, QGraphicsItem* parent); virtual ~RBImage(); QRectF boundingRect() const; |