summaryrefslogtreecommitdiff
path: root/utils/themeeditor/graphics/rbimage.cpp
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-08-03 22:29:26 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-08-03 22:29:26 +0000
commit83c60a1012f2db6c21c5779f7e11b2f3e479df85 (patch)
treec4ceb451457fe34cd0df156d0b9a6ecc593496ac /utils/themeeditor/graphics/rbimage.cpp
parent851be21f671feb0bf41e1dcaaced4d7e2e5cf72c (diff)
downloadrockbox-83c60a1012f2db6c21c5779f7e11b2f3e479df85.tar.gz
rockbox-83c60a1012f2db6c21c5779f7e11b2f3e479df85.zip
Theme Editor: Created the RBMovable abstract class for screen elements that can be moved around, began implementing it and making images, viewports, and album art children of it
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27685 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/graphics/rbimage.cpp')
-rw-r--r--utils/themeeditor/graphics/rbimage.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/utils/themeeditor/graphics/rbimage.cpp b/utils/themeeditor/graphics/rbimage.cpp
index ce92d2fcde..954983eae2 100644
--- a/utils/themeeditor/graphics/rbimage.cpp
+++ b/utils/themeeditor/graphics/rbimage.cpp
@@ -26,7 +26,7 @@
26#include "rbimage.h" 26#include "rbimage.h"
27 27
28RBImage::RBImage(QString file, int tiles, int x, int y, QGraphicsItem* parent) 28RBImage::RBImage(QString file, int tiles, int x, int y, QGraphicsItem* parent)
29 : QGraphicsItem(parent), tiles(tiles), currentTile(0) 29 : RBMovable(parent), tiles(tiles), currentTile(0)
30{ 30{
31 if(QFile::exists(file)) 31 if(QFile::exists(file))
32 { 32 {
@@ -56,7 +56,7 @@ RBImage::RBImage(QString file, int tiles, int x, int y, QGraphicsItem* parent)
56} 56}
57 57
58RBImage::RBImage(const RBImage &other, QGraphicsItem* parent) 58RBImage::RBImage(const RBImage &other, QGraphicsItem* parent)
59 : QGraphicsItem(parent), tiles(other.tiles), currentTile(other.currentTile) 59 : RBMovable(parent), tiles(other.tiles), currentTile(other.currentTile)
60{ 60{
61 if(other.image) 61 if(other.image)
62 image = new QPixmap(*(other.image)); 62 image = new QPixmap(*(other.image));
@@ -86,4 +86,11 @@ void RBImage::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
86 painter->drawPixmap(size, *image, QRect(0, currentTile * image->height() 86 painter->drawPixmap(size, *image, QRect(0, currentTile * image->height()
87 / tiles, image->width(), 87 / tiles, image->width(),
88 image->height() / tiles)); 88 image->height() / tiles));
89
90 RBMovable::paint(painter, option, widget);
91}
92
93void RBImage::saveGeometry()
94{
95
89} 96}