1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2010 Robert Bieber
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
25 #include "skin_parser.h"
27 #include "rbmovable.h"
33 #include <QGraphicsItem>
37 class RBViewport
: public RBMovable
47 static const double scrollRate
;
49 RBViewport(skin_element
* node
, const RBRenderInfo
& info
,
50 ParseTreeNode
* pNode
);
51 virtual ~RBViewport();
53 QPainterPath
shape() const;
54 void paint(QPainter
*painter
, const QStyleOptionGraphicsItem
*option
,
57 void setBGColor(QColor color
){ background
= color
; }
58 QColor
getBGColor(){ return background
; }
59 void setFGColor(QColor color
){ foreground
= color
; }
60 QColor
getFGColor(){ return foreground
; }
61 void makeCustomUI(){ customUI
= true; }
62 void clearCustomUI(){ customUI
= false; }
65 void write(QString text
);
66 void alignText(Alignment align
){ textAlign
= align
; }
67 int getTextOffset(){ return textOffset
.y(); }
68 void addTextOffset(int height
){ textOffset
.setY(textOffset
.y() + height
); }
71 if(textOffset
.x() < 0)
77 void scrollText(double time
){ scrollTime
= time
; }
79 void enableStatusBar(){ showStatusBar
= true; }
81 void showPlaylist(const RBRenderInfo
& info
, int start
,
82 ParseTreeNode
* lines
);
84 void makeFullScreen();
112 QPixmap statusBarTexture
;
115 RBText
* centerGraphic
;
116 RBText
* rightGraphic
;
127 #endif // RBVIEWPORT_H