summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-07-08 21:53:27 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-07-08 21:53:27 +0000
commit73a3747bc1b33200207768b101bf56083416d756 (patch)
tree08c86af3f3b785842f6c4753eb7de2bebb55d4e5
parent9dd5f75966f43b59740259647ba37d0b1d71f7c4 (diff)
downloadrockbox-73a3747bc1b33200207768b101bf56083416d756.tar.gz
rockbox-73a3747bc1b33200207768b101bf56083416d756.zip
Theme Editor: Built a ui for the timer panel, not functional yet
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27353 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--utils/themeeditor/gui/editorwindow.cpp13
-rw-r--r--utils/themeeditor/gui/editorwindow.h3
-rw-r--r--utils/themeeditor/gui/editorwindow.ui9
-rw-r--r--utils/themeeditor/gui/skintimer.cpp58
-rw-r--r--utils/themeeditor/gui/skintimer.h58
-rw-r--r--utils/themeeditor/gui/skintimer.ui232
-rw-r--r--utils/themeeditor/resources.qrc4
-rw-r--r--utils/themeeditor/resources/ffwd.pngbin0 -> 596 bytes
-rw-r--r--utils/themeeditor/resources/ffwd.xcfbin0 -> 2584 bytes
-rw-r--r--utils/themeeditor/resources/pause.pngbin0 -> 355 bytes
-rw-r--r--utils/themeeditor/resources/pause.xcfbin0 -> 1311 bytes
-rw-r--r--utils/themeeditor/resources/play.pngbin0 -> 495 bytes
-rw-r--r--utils/themeeditor/resources/play.xcfbin0 -> 2749 bytes
-rw-r--r--utils/themeeditor/resources/rwnd.pngbin0 -> 614 bytes
-rw-r--r--utils/themeeditor/themeeditor.pro18
15 files changed, 391 insertions, 4 deletions
diff --git a/utils/themeeditor/gui/editorwindow.cpp b/utils/themeeditor/gui/editorwindow.cpp
index 169dc3f6a1..b81e41a2f5 100644
--- a/utils/themeeditor/gui/editorwindow.cpp
+++ b/utils/themeeditor/gui/editorwindow.cpp
@@ -167,8 +167,19 @@ void EditorWindow::setupUI()
167 deviceDock->setObjectName("deviceDock"); 167 deviceDock->setObjectName("deviceDock");
168 deviceDock->setWidget(deviceConfig); 168 deviceDock->setWidget(deviceConfig);
169 deviceDock->setFloating(true); 169 deviceDock->setFloating(true);
170 deviceDock->move(QPoint(x() + width() / 2, y() + height() / 2));
170 deviceDock->hide(); 171 deviceDock->hide();
171 172
173 /* Positioning the timer panel */
174 timerDock = new QDockWidget(tr("Timer"), this);
175 timer = new SkinTimer(deviceConfig, timerDock);
176
177 timerDock->setObjectName("timerDock");
178 timerDock->setWidget(timer);
179 timerDock->setFloating(true);
180 timerDock->move(QPoint(x() + width() / 2, y() + height() / 2));
181 timerDock->hide();
182
172 shiftTab(-1); 183 shiftTab(-1);
173} 184}
174 185
@@ -183,6 +194,8 @@ void EditorWindow::setupMenus()
183 this, SLOT(showPanel())); 194 this, SLOT(showPanel()));
184 QObject::connect(ui->actionDevice_Configuration, SIGNAL(triggered()), 195 QObject::connect(ui->actionDevice_Configuration, SIGNAL(triggered()),
185 deviceDock, SLOT(show())); 196 deviceDock, SLOT(show()));
197 QObject::connect(ui->actionTimer, SIGNAL(triggered()),
198 timerDock, SLOT(show()));
186 199
187 /* Connecting the document management actions */ 200 /* Connecting the document management actions */
188 QObject::connect(ui->actionNew_Document, SIGNAL(triggered()), 201 QObject::connect(ui->actionNew_Document, SIGNAL(triggered()),
diff --git a/utils/themeeditor/gui/editorwindow.h b/utils/themeeditor/gui/editorwindow.h
index c2ae1770f2..6b09b79815 100644
--- a/utils/themeeditor/gui/editorwindow.h
+++ b/utils/themeeditor/gui/editorwindow.h
@@ -34,6 +34,7 @@
34#include "preferencesdialog.h" 34#include "preferencesdialog.h"
35#include "skinviewer.h" 35#include "skinviewer.h"
36#include "devicestate.h" 36#include "devicestate.h"
37#include "skintimer.h"
37 38
38class ProjectModel; 39class ProjectModel;
39class TabContent; 40class TabContent;
@@ -99,6 +100,8 @@ private:
99 SkinViewer* viewer; 100 SkinViewer* viewer;
100 DeviceState* deviceConfig; 101 DeviceState* deviceConfig;
101 QDockWidget* deviceDock; 102 QDockWidget* deviceDock;
103 SkinTimer* timer;
104 QDockWidget* timerDock;
102}; 105};
103 106
104#endif // EDITORWINDOW_H 107#endif // EDITORWINDOW_H
diff --git a/utils/themeeditor/gui/editorwindow.ui b/utils/themeeditor/gui/editorwindow.ui
index 707e24698c..5ef3261acb 100644
--- a/utils/themeeditor/gui/editorwindow.ui
+++ b/utils/themeeditor/gui/editorwindow.ui
@@ -69,6 +69,7 @@
69 <addaction name="actionFile_Panel"/> 69 <addaction name="actionFile_Panel"/>
70 <addaction name="separator"/> 70 <addaction name="separator"/>
71 <addaction name="actionDevice_Configuration"/> 71 <addaction name="actionDevice_Configuration"/>
72 <addaction name="actionTimer"/>
72 </widget> 73 </widget>
73 <widget class="QMenu" name="menuEdit"> 74 <widget class="QMenu" name="menuEdit">
74 <property name="title"> 75 <property name="title">
@@ -365,6 +366,14 @@
365 <string>Ctrl+F</string> 366 <string>Ctrl+F</string>
366 </property> 367 </property>
367 </action> 368 </action>
369 <action name="actionTimer">
370 <property name="text">
371 <string>T&amp;imer</string>
372 </property>
373 <property name="shortcut">
374 <string>Ctrl+T</string>
375 </property>
376 </action>
368 </widget> 377 </widget>
369 <tabstops> 378 <tabstops>
370 <tabstop>projectTree</tabstop> 379 <tabstop>projectTree</tabstop>
diff --git a/utils/themeeditor/gui/skintimer.cpp b/utils/themeeditor/gui/skintimer.cpp
new file mode 100644
index 0000000000..f228a2f097
--- /dev/null
+++ b/utils/themeeditor/gui/skintimer.cpp
@@ -0,0 +1,58 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2010 Robert Bieber
11 *
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.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#include "skintimer.h"
23#include "ui_skintimer.h"
24
25const int SkinTimer::millisPerTick = 10;
26
27SkinTimer::SkinTimer(DeviceState* device, QWidget *parent) :
28 QWidget(parent),
29 ui(new Ui::SkinTimer),
30 device(device)
31{
32 ui->setupUi(this);
33}
34
35SkinTimer::~SkinTimer()
36{
37 delete ui;
38}
39
40void SkinTimer::start()
41{
42
43}
44
45void SkinTimer::stop()
46{
47
48}
49
50void SkinTimer::tick()
51{
52
53}
54
55void SkinTimer::stateChange()
56{
57
58}
diff --git a/utils/themeeditor/gui/skintimer.h b/utils/themeeditor/gui/skintimer.h
new file mode 100644
index 0000000000..b6c8061028
--- /dev/null
+++ b/utils/themeeditor/gui/skintimer.h
@@ -0,0 +1,58 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2010 Robert Bieber
11 *
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.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#ifndef SKINTIMER_H
23#define SKINTIMER_H
24
25#include <QWidget>
26#include <QTimer>
27
28#include "devicestate.h"
29
30namespace Ui {
31 class SkinTimer;
32}
33
34class SkinTimer : public QWidget {
35 Q_OBJECT
36public:
37 static const int millisPerTick;
38
39 SkinTimer(DeviceState* device, QWidget *parent = 0);
40 ~SkinTimer();
41
42private slots:
43 void start();
44 void stop();
45 void tick();
46 void stateChange();
47
48private:
49 void setupUI();
50
51 Ui::SkinTimer *ui;
52 DeviceState* device;
53
54 QTimer timer;
55 unsigned long int elapsedTime;
56};
57
58#endif // SKINTIMER_H
diff --git a/utils/themeeditor/gui/skintimer.ui b/utils/themeeditor/gui/skintimer.ui
new file mode 100644
index 0000000000..a9f5feafd7
--- /dev/null
+++ b/utils/themeeditor/gui/skintimer.ui
@@ -0,0 +1,232 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>SkinTimer</class>
4 <widget class="QWidget" name="SkinTimer">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>238</width>
10 <height>204</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Form</string>
15 </property>
16 <property name="windowIcon">
17 <iconset resource="../resources.qrc">
18 <normaloff>:/resources/windowicon.png</normaloff>:/resources/windowicon.png</iconset>
19 </property>
20 <layout class="QVBoxLayout" name="verticalLayout">
21 <item>
22 <layout class="QFormLayout" name="formLayout">
23 <item row="0" column="0">
24 <widget class="QLabel" name="label">
25 <property name="text">
26 <string>Speed</string>
27 </property>
28 <property name="buddy">
29 <cstring>speedBox</cstring>
30 </property>
31 </widget>
32 </item>
33 <item row="0" column="1">
34 <widget class="QDoubleSpinBox" name="speedBox">
35 <property name="suffix">
36 <string>x</string>
37 </property>
38 <property name="decimals">
39 <number>1</number>
40 </property>
41 <property name="minimum">
42 <double>0.100000000000000</double>
43 </property>
44 <property name="maximum">
45 <double>3.000000000000000</double>
46 </property>
47 <property name="singleStep">
48 <double>0.200000000000000</double>
49 </property>
50 <property name="value">
51 <double>1.000000000000000</double>
52 </property>
53 </widget>
54 </item>
55 <item row="1" column="0">
56 <widget class="QLabel" name="label_2">
57 <property name="text">
58 <string>Duration</string>
59 </property>
60 <property name="buddy">
61 <cstring>spinBox</cstring>
62 </property>
63 </widget>
64 </item>
65 <item row="1" column="1">
66 <widget class="QSpinBox" name="spinBox">
67 <property name="suffix">
68 <string>s</string>
69 </property>
70 <property name="minimum">
71 <number>1</number>
72 </property>
73 <property name="maximum">
74 <number>1000</number>
75 </property>
76 <property name="value">
77 <number>20</number>
78 </property>
79 </widget>
80 </item>
81 </layout>
82 </item>
83 <item>
84 <widget class="QProgressBar" name="statusBar">
85 <property name="value">
86 <number>0</number>
87 </property>
88 </widget>
89 </item>
90 <item>
91 <spacer name="verticalSpacer">
92 <property name="orientation">
93 <enum>Qt::Vertical</enum>
94 </property>
95 <property name="sizeHint" stdset="0">
96 <size>
97 <width>20</width>
98 <height>40</height>
99 </size>
100 </property>
101 </spacer>
102 </item>
103 <item>
104 <layout class="QHBoxLayout" name="horizontalLayout_2">
105 <item>
106 <widget class="QPushButton" name="startButton">
107 <property name="text">
108 <string>Start</string>
109 </property>
110 </widget>
111 </item>
112 <item>
113 <widget class="QPushButton" name="stopButton">
114 <property name="enabled">
115 <bool>false</bool>
116 </property>
117 <property name="text">
118 <string>Stop</string>
119 </property>
120 </widget>
121 </item>
122 </layout>
123 </item>
124 <item>
125 <layout class="QHBoxLayout" name="horizontalLayout">
126 <item>
127 <widget class="QToolButton" name="playButton">
128 <property name="text">
129 <string/>
130 </property>
131 <property name="icon">
132 <iconset resource="../resources.qrc">
133 <normaloff>:/resources/resources/play.png</normaloff>:/resources/resources/play.png</iconset>
134 </property>
135 <property name="iconSize">
136 <size>
137 <width>30</width>
138 <height>30</height>
139 </size>
140 </property>
141 <property name="checkable">
142 <bool>true</bool>
143 </property>
144 <property name="checked">
145 <bool>true</bool>
146 </property>
147 <property name="autoExclusive">
148 <bool>true</bool>
149 </property>
150 </widget>
151 </item>
152 <item>
153 <widget class="QToolButton" name="pauseButton">
154 <property name="text">
155 <string/>
156 </property>
157 <property name="icon">
158 <iconset resource="../resources.qrc">
159 <normaloff>:/resources/resources/pause.png</normaloff>:/resources/resources/pause.png</iconset>
160 </property>
161 <property name="iconSize">
162 <size>
163 <width>30</width>
164 <height>30</height>
165 </size>
166 </property>
167 <property name="checkable">
168 <bool>true</bool>
169 </property>
170 <property name="checked">
171 <bool>false</bool>
172 </property>
173 <property name="autoExclusive">
174 <bool>true</bool>
175 </property>
176 </widget>
177 </item>
178 <item>
179 <widget class="QToolButton" name="rwndButton">
180 <property name="text">
181 <string/>
182 </property>
183 <property name="icon">
184 <iconset resource="../resources.qrc">
185 <normaloff>:/resources/resources/rwnd.png</normaloff>:/resources/resources/rwnd.png</iconset>
186 </property>
187 <property name="iconSize">
188 <size>
189 <width>30</width>
190 <height>30</height>
191 </size>
192 </property>
193 <property name="checkable">
194 <bool>true</bool>
195 </property>
196 <property name="autoExclusive">
197 <bool>true</bool>
198 </property>
199 </widget>
200 </item>
201 <item>
202 <widget class="QToolButton" name="ffwdButton">
203 <property name="text">
204 <string/>
205 </property>
206 <property name="icon">
207 <iconset resource="../resources.qrc">
208 <normaloff>:/resources/resources/ffwd.png</normaloff>:/resources/resources/ffwd.png</iconset>
209 </property>
210 <property name="iconSize">
211 <size>
212 <width>30</width>
213 <height>30</height>
214 </size>
215 </property>
216 <property name="checkable">
217 <bool>true</bool>
218 </property>
219 <property name="autoExclusive">
220 <bool>true</bool>
221 </property>
222 </widget>
223 </item>
224 </layout>
225 </item>
226 </layout>
227 </widget>
228 <resources>
229 <include location="../resources.qrc"/>
230 </resources>
231 <connections/>
232</ui>
diff --git a/utils/themeeditor/resources.qrc b/utils/themeeditor/resources.qrc
index a000c3701e..87211b95e9 100644
--- a/utils/themeeditor/resources.qrc
+++ b/utils/themeeditor/resources.qrc
@@ -9,6 +9,10 @@
9 <file>resources/zoomeven.png</file> 9 <file>resources/zoomeven.png</file>
10 <file>resources/zoomin.png</file> 10 <file>resources/zoomin.png</file>
11 <file>resources/zoomout.png</file> 11 <file>resources/zoomout.png</file>
12 <file>resources/play.png</file>
13 <file>resources/ffwd.png</file>
14 <file>resources/pause.png</file>
15 <file>resources/rwnd.png</file>
12 </qresource> 16 </qresource>
13 <qresource prefix="/render"> 17 <qresource prefix="/render">
14 <file alias="scenebg.png">resources/render/scenebg.png</file> 18 <file alias="scenebg.png">resources/render/scenebg.png</file>
diff --git a/utils/themeeditor/resources/ffwd.png b/utils/themeeditor/resources/ffwd.png
new file mode 100644
index 0000000000..8cf50ca048
--- /dev/null
+++ b/utils/themeeditor/resources/ffwd.png
Binary files differ
diff --git a/utils/themeeditor/resources/ffwd.xcf b/utils/themeeditor/resources/ffwd.xcf
new file mode 100644
index 0000000000..629e258940
--- /dev/null
+++ b/utils/themeeditor/resources/ffwd.xcf
Binary files differ
diff --git a/utils/themeeditor/resources/pause.png b/utils/themeeditor/resources/pause.png
new file mode 100644
index 0000000000..dabfdc01be
--- /dev/null
+++ b/utils/themeeditor/resources/pause.png
Binary files differ
diff --git a/utils/themeeditor/resources/pause.xcf b/utils/themeeditor/resources/pause.xcf
new file mode 100644
index 0000000000..e3dbb4560b
--- /dev/null
+++ b/utils/themeeditor/resources/pause.xcf
Binary files differ
diff --git a/utils/themeeditor/resources/play.png b/utils/themeeditor/resources/play.png
new file mode 100644
index 0000000000..c439befc75
--- /dev/null
+++ b/utils/themeeditor/resources/play.png
Binary files differ
diff --git a/utils/themeeditor/resources/play.xcf b/utils/themeeditor/resources/play.xcf
new file mode 100644
index 0000000000..ee6c4bceb2
--- /dev/null
+++ b/utils/themeeditor/resources/play.xcf
Binary files differ
diff --git a/utils/themeeditor/resources/rwnd.png b/utils/themeeditor/resources/rwnd.png
new file mode 100644
index 0000000000..59fda48567
--- /dev/null
+++ b/utils/themeeditor/resources/rwnd.png
Binary files differ
diff --git a/utils/themeeditor/themeeditor.pro b/utils/themeeditor/themeeditor.pro
index 904adf239b..49e1be953a 100644
--- a/utils/themeeditor/themeeditor.pro
+++ b/utils/themeeditor/themeeditor.pro
@@ -52,7 +52,8 @@ HEADERS += models/parsetreemodel.h \
52 gui/findreplacedialog.h \ 52 gui/findreplacedialog.h \
53 graphics/rbtext.h \ 53 graphics/rbtext.h \
54 graphics/rbfontcache.h \ 54 graphics/rbfontcache.h \
55 graphics/rbtextcache.h 55 graphics/rbtextcache.h \
56 gui/skintimer.h
56SOURCES += main.cpp \ 57SOURCES += main.cpp \
57 models/parsetreemodel.cpp \ 58 models/parsetreemodel.cpp \
58 models/parsetreenode.cpp \ 59 models/parsetreenode.cpp \
@@ -75,7 +76,8 @@ SOURCES += main.cpp \
75 gui/findreplacedialog.cpp \ 76 gui/findreplacedialog.cpp \
76 graphics/rbtext.cpp \ 77 graphics/rbtext.cpp \
77 graphics/rbfontcache.cpp \ 78 graphics/rbfontcache.cpp \
78 graphics/rbtextcache.cpp 79 graphics/rbtextcache.cpp \
80 gui/skintimer.cpp
79OTHER_FILES += README \ 81OTHER_FILES += README \
80 resources/windowicon.png \ 82 resources/windowicon.png \
81 resources/appicon.xcf \ 83 resources/appicon.xcf \
@@ -85,12 +87,20 @@ OTHER_FILES += README \
85 resources/document-new.png \ 87 resources/document-new.png \
86 resources/deviceoptions \ 88 resources/deviceoptions \
87 resources/render/statusbar.png \ 89 resources/render/statusbar.png \
88 resources/render/scenebg.png 90 resources/render/scenebg.png \
91 resources/play.xcf \
92 resources/play.png \
93 resources/rwnd.png \
94 resources/pause.xcf \
95 resources/pause.png \
96 resources/ffwd.xcf \
97 resources/ffwd.png
89FORMS += gui/editorwindow.ui \ 98FORMS += gui/editorwindow.ui \
90 gui/preferencesdialog.ui \ 99 gui/preferencesdialog.ui \
91 gui/configdocument.ui \ 100 gui/configdocument.ui \
92 gui/skinviewer.ui \ 101 gui/skinviewer.ui \
93 gui/findreplacedialog.ui 102 gui/findreplacedialog.ui \
103 gui/skintimer.ui
94RESOURCES += resources.qrc 104RESOURCES += resources.qrc
95win32:RC_FILE = themeeditor.rc 105win32:RC_FILE = themeeditor.rc
96macx { 106macx {