diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/themeeditor/graphics/rbprogressbar.cpp | 9 | ||||
-rw-r--r-- | utils/themeeditor/graphics/rbprogressbar.h | 6 | ||||
-rw-r--r-- | utils/themeeditor/models/parsetreenode.cpp | 3 |
3 files changed, 16 insertions, 2 deletions
diff --git a/utils/themeeditor/graphics/rbprogressbar.cpp b/utils/themeeditor/graphics/rbprogressbar.cpp index 206a835252..76cfe5601b 100644 --- a/utils/themeeditor/graphics/rbprogressbar.cpp +++ b/utils/themeeditor/graphics/rbprogressbar.cpp | |||
@@ -27,7 +27,7 @@ | |||
27 | RBProgressBar::RBProgressBar(RBViewport *parent, const RBRenderInfo &info, | 27 | RBProgressBar::RBProgressBar(RBViewport *parent, const RBRenderInfo &info, |
28 | int paramCount, skin_tag_parameter *params, | 28 | int paramCount, skin_tag_parameter *params, |
29 | bool pv) | 29 | bool pv) |
30 | :QGraphicsItem(parent) | 30 | :RBMovable(parent) |
31 | { | 31 | { |
32 | /* First we set everything to defaults */ | 32 | /* First we set everything to defaults */ |
33 | bitmap = 0; | 33 | bitmap = 0; |
@@ -117,4 +117,11 @@ void RBProgressBar::paint(QPainter *painter, | |||
117 | { | 117 | { |
118 | painter->fillRect(size, color); | 118 | painter->fillRect(size, color); |
119 | } | 119 | } |
120 | |||
121 | RBMovable::paint(painter, option, widget); | ||
122 | } | ||
123 | |||
124 | void RBProgressBar::saveGeometry() | ||
125 | { | ||
126 | |||
120 | } | 127 | } |
diff --git a/utils/themeeditor/graphics/rbprogressbar.h b/utils/themeeditor/graphics/rbprogressbar.h index e72479853e..817285653a 100644 --- a/utils/themeeditor/graphics/rbprogressbar.h +++ b/utils/themeeditor/graphics/rbprogressbar.h | |||
@@ -25,12 +25,13 @@ | |||
25 | #include <QGraphicsItem> | 25 | #include <QGraphicsItem> |
26 | #include <QPixmap> | 26 | #include <QPixmap> |
27 | 27 | ||
28 | #include "rbmovable.h" | ||
28 | #include "rbrenderinfo.h" | 29 | #include "rbrenderinfo.h" |
29 | #include "rbviewport.h" | 30 | #include "rbviewport.h" |
30 | #include "devicestate.h" | 31 | #include "devicestate.h" |
31 | #include "skin_parser.h" | 32 | #include "skin_parser.h" |
32 | 33 | ||
33 | class RBProgressBar : public QGraphicsItem | 34 | class RBProgressBar : public RBMovable |
34 | { | 35 | { |
35 | public: | 36 | public: |
36 | RBProgressBar(RBViewport* parent, const RBRenderInfo& info, | 37 | RBProgressBar(RBViewport* parent, const RBRenderInfo& info, |
@@ -41,6 +42,9 @@ public: | |||
41 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, | 42 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, |
42 | QWidget *widget); | 43 | QWidget *widget); |
43 | 44 | ||
45 | protected: | ||
46 | void saveGeometry(); | ||
47 | |||
44 | private: | 48 | private: |
45 | QPixmap* bitmap; | 49 | QPixmap* bitmap; |
46 | QColor color; | 50 | QColor color; |
diff --git a/utils/themeeditor/models/parsetreenode.cpp b/utils/themeeditor/models/parsetreenode.cpp index 443d0327f5..4afd04ab9d 100644 --- a/utils/themeeditor/models/parsetreenode.cpp +++ b/utils/themeeditor/models/parsetreenode.cpp | |||
@@ -1065,6 +1065,9 @@ double ParseTreeNode::findConditionalTime(ParseTreeNode *conditional, | |||
1065 | { | 1065 | { |
1066 | int child = conditional->evalTag(info, true, | 1066 | int child = conditional->evalTag(info, true, |
1067 | conditional->children.count()).toInt(); | 1067 | conditional->children.count()).toInt(); |
1068 | if(child >= conditional->children.count()) | ||
1069 | child = conditional->children.count() - 1; | ||
1070 | |||
1068 | return findBranchTime(conditional->children[child], info); | 1071 | return findBranchTime(conditional->children[child], info); |
1069 | } | 1072 | } |
1070 | 1073 | ||