forked from len0rd/rockbox
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
This commit is contained in:
parent
851be21f67
commit
83c60a1012
10 changed files with 166 additions and 29 deletions
|
|
@ -22,17 +22,17 @@
|
|||
#include "rbalbumart.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QDebug>
|
||||
|
||||
RBAlbumArt::RBAlbumArt(QGraphicsItem *parent, int x, int y, int maxWidth,
|
||||
int maxHeight, int artWidth, int artHeight, char hAlign,
|
||||
char vAlign)
|
||||
: QGraphicsItem(parent), size(x, y, maxWidth,
|
||||
maxHeight),
|
||||
: RBMovable(parent), size(0, 0, maxWidth,
|
||||
maxHeight),
|
||||
artWidth(artWidth), artHeight(artHeight),
|
||||
hAlign(hAlign), vAlign(vAlign),
|
||||
texture(":/render/albumart.png")
|
||||
{
|
||||
setPos(x, y);
|
||||
hide();
|
||||
}
|
||||
|
||||
|
|
@ -92,4 +92,11 @@ void RBAlbumArt::paint(QPainter *painter,
|
|||
}
|
||||
|
||||
painter->fillRect(drawArea, texture);
|
||||
|
||||
RBMovable::paint(painter, option, widget);
|
||||
}
|
||||
|
||||
void RBAlbumArt::saveGeometry()
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue