diff options
-rw-r--r-- | utils/themeeditor/gui/devicestate.cpp | 35 | ||||
-rw-r--r-- | utils/themeeditor/gui/devicestate.h | 41 | ||||
-rw-r--r-- | utils/themeeditor/gui/devicestate.ui | 130 | ||||
-rw-r--r-- | utils/themeeditor/gui/editorwindow.cpp | 2 | ||||
-rw-r--r-- | utils/themeeditor/gui/editorwindow.h | 2 | ||||
-rw-r--r-- | utils/themeeditor/gui/editorwindow.ui | 19 | ||||
-rw-r--r-- | utils/themeeditor/themeeditor.pro | 9 |
7 files changed, 229 insertions, 9 deletions
diff --git a/utils/themeeditor/gui/devicestate.cpp b/utils/themeeditor/gui/devicestate.cpp new file mode 100644 index 0000000000..af0b846372 --- /dev/null +++ b/utils/themeeditor/gui/devicestate.cpp | |||
@@ -0,0 +1,35 @@ | |||
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 "devicestate.h" | ||
23 | #include "ui_devicestate.h" | ||
24 | |||
25 | DeviceState::DeviceState(QWidget *parent) : | ||
26 | QWidget(parent), | ||
27 | ui(new Ui::DeviceState) | ||
28 | { | ||
29 | ui->setupUi(this); | ||
30 | } | ||
31 | |||
32 | DeviceState::~DeviceState() | ||
33 | { | ||
34 | delete ui; | ||
35 | } | ||
diff --git a/utils/themeeditor/gui/devicestate.h b/utils/themeeditor/gui/devicestate.h new file mode 100644 index 0000000000..66cd98be78 --- /dev/null +++ b/utils/themeeditor/gui/devicestate.h | |||
@@ -0,0 +1,41 @@ | |||
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 DEVICESTATE_H | ||
23 | #define DEVICESTATE_H | ||
24 | |||
25 | #include <QWidget> | ||
26 | |||
27 | namespace Ui { | ||
28 | class DeviceState; | ||
29 | } | ||
30 | |||
31 | class DeviceState : public QWidget { | ||
32 | Q_OBJECT | ||
33 | public: | ||
34 | DeviceState(QWidget *parent = 0); | ||
35 | virtual ~DeviceState(); | ||
36 | |||
37 | private: | ||
38 | Ui::DeviceState *ui; | ||
39 | }; | ||
40 | |||
41 | #endif // DEVICESTATE_H | ||
diff --git a/utils/themeeditor/gui/devicestate.ui b/utils/themeeditor/gui/devicestate.ui new file mode 100644 index 0000000000..17f6129c9e --- /dev/null +++ b/utils/themeeditor/gui/devicestate.ui | |||
@@ -0,0 +1,130 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <ui version="4.0"> | ||
3 | <class>DeviceState</class> | ||
4 | <widget class="QWidget" name="DeviceState"> | ||
5 | <property name="geometry"> | ||
6 | <rect> | ||
7 | <x>0</x> | ||
8 | <y>0</y> | ||
9 | <width>400</width> | ||
10 | <height>300</height> | ||
11 | </rect> | ||
12 | </property> | ||
13 | <property name="windowTitle"> | ||
14 | <string>Device Settings</string> | ||
15 | </property> | ||
16 | <property name="windowIcon"> | ||
17 | <iconset resource="../resources.qrc"> | ||
18 | <normaloff>:/resources/resources/windowicon.png</normaloff>:/resources/resources/windowicon.png</iconset> | ||
19 | </property> | ||
20 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
21 | <item> | ||
22 | <widget class="QToolBox" name="toolBox"> | ||
23 | <property name="currentIndex"> | ||
24 | <number>1</number> | ||
25 | </property> | ||
26 | <widget class="QWidget" name="page"> | ||
27 | <property name="geometry"> | ||
28 | <rect> | ||
29 | <x>0</x> | ||
30 | <y>0</y> | ||
31 | <width>382</width> | ||
32 | <height>220</height> | ||
33 | </rect> | ||
34 | </property> | ||
35 | <attribute name="label"> | ||
36 | <string>Device Basics</string> | ||
37 | </attribute> | ||
38 | <layout class="QVBoxLayout" name="verticalLayout_2"> | ||
39 | <item> | ||
40 | <layout class="QHBoxLayout" name="horizontalLayout"> | ||
41 | <item> | ||
42 | <widget class="QLabel" name="label"> | ||
43 | <property name="text"> | ||
44 | <string>Screen Width</string> | ||
45 | </property> | ||
46 | <property name="buddy"> | ||
47 | <cstring>widthBox</cstring> | ||
48 | </property> | ||
49 | </widget> | ||
50 | </item> | ||
51 | <item> | ||
52 | <widget class="QLineEdit" name="widthBox"/> | ||
53 | </item> | ||
54 | </layout> | ||
55 | </item> | ||
56 | <item> | ||
57 | <layout class="QHBoxLayout" name="horizontalLayout_2"> | ||
58 | <item> | ||
59 | <widget class="QLabel" name="label_2"> | ||
60 | <property name="text"> | ||
61 | <string>Screen Height</string> | ||
62 | </property> | ||
63 | <property name="buddy"> | ||
64 | <cstring>heightBox</cstring> | ||
65 | </property> | ||
66 | </widget> | ||
67 | </item> | ||
68 | <item> | ||
69 | <widget class="QLineEdit" name="heightBox"/> | ||
70 | </item> | ||
71 | </layout> | ||
72 | </item> | ||
73 | <item> | ||
74 | <layout class="QHBoxLayout" name="horizontalLayout_3"> | ||
75 | <item> | ||
76 | <widget class="QLabel" name="label_3"> | ||
77 | <property name="text"> | ||
78 | <string>Remote Width</string> | ||
79 | </property> | ||
80 | <property name="buddy"> | ||
81 | <cstring>rWidthBox</cstring> | ||
82 | </property> | ||
83 | </widget> | ||
84 | </item> | ||
85 | <item> | ||
86 | <widget class="QLineEdit" name="rWidthBox"/> | ||
87 | </item> | ||
88 | </layout> | ||
89 | </item> | ||
90 | <item> | ||
91 | <layout class="QHBoxLayout" name="horizontalLayout_4"> | ||
92 | <item> | ||
93 | <widget class="QLabel" name="label_4"> | ||
94 | <property name="text"> | ||
95 | <string>Remote Height</string> | ||
96 | </property> | ||
97 | <property name="buddy"> | ||
98 | <cstring>rHeightBox</cstring> | ||
99 | </property> | ||
100 | </widget> | ||
101 | </item> | ||
102 | <item> | ||
103 | <widget class="QLineEdit" name="rHeightBox"/> | ||
104 | </item> | ||
105 | </layout> | ||
106 | </item> | ||
107 | </layout> | ||
108 | </widget> | ||
109 | <widget class="QWidget" name="page_2"> | ||
110 | <property name="geometry"> | ||
111 | <rect> | ||
112 | <x>0</x> | ||
113 | <y>0</y> | ||
114 | <width>382</width> | ||
115 | <height>220</height> | ||
116 | </rect> | ||
117 | </property> | ||
118 | <attribute name="label"> | ||
119 | <string>Device Status</string> | ||
120 | </attribute> | ||
121 | </widget> | ||
122 | </widget> | ||
123 | </item> | ||
124 | </layout> | ||
125 | </widget> | ||
126 | <resources> | ||
127 | <include location="../resources.qrc"/> | ||
128 | </resources> | ||
129 | <connections/> | ||
130 | </ui> | ||
diff --git a/utils/themeeditor/gui/editorwindow.cpp b/utils/themeeditor/gui/editorwindow.cpp index c40a420e98..2bd3b5343e 100644 --- a/utils/themeeditor/gui/editorwindow.cpp +++ b/utils/themeeditor/gui/editorwindow.cpp | |||
@@ -155,6 +155,8 @@ void EditorWindow::setupMenus() | |||
155 | this, SLOT(showPanel())); | 155 | this, SLOT(showPanel())); |
156 | QObject::connect(ui->actionPreview_Panel, SIGNAL(triggered()), | 156 | QObject::connect(ui->actionPreview_Panel, SIGNAL(triggered()), |
157 | this, SLOT(showPanel())); | 157 | this, SLOT(showPanel())); |
158 | QObject::connect(ui->actionDevice_Configuration, SIGNAL(triggered()), | ||
159 | &deviceConfig, SLOT(show())); | ||
158 | 160 | ||
159 | /* Connecting the document management actions */ | 161 | /* Connecting the document management actions */ |
160 | QObject::connect(ui->actionNew_Document, SIGNAL(triggered()), | 162 | QObject::connect(ui->actionNew_Document, SIGNAL(triggered()), |
diff --git a/utils/themeeditor/gui/editorwindow.h b/utils/themeeditor/gui/editorwindow.h index 08af08ac41..0bfaac3957 100644 --- a/utils/themeeditor/gui/editorwindow.h +++ b/utils/themeeditor/gui/editorwindow.h | |||
@@ -32,6 +32,7 @@ | |||
32 | #include "configdocument.h" | 32 | #include "configdocument.h" |
33 | #include "preferencesdialog.h" | 33 | #include "preferencesdialog.h" |
34 | #include "skinviewer.h" | 34 | #include "skinviewer.h" |
35 | #include "devicestate.h" | ||
35 | 36 | ||
36 | class ProjectModel; | 37 | class ProjectModel; |
37 | class TabContent; | 38 | class TabContent; |
@@ -88,6 +89,7 @@ private: | |||
88 | ProjectModel* project; | 89 | ProjectModel* project; |
89 | QItemSelectionModel* parseTreeSelection; | 90 | QItemSelectionModel* parseTreeSelection; |
90 | SkinViewer* viewer; | 91 | SkinViewer* viewer; |
92 | DeviceState deviceConfig; | ||
91 | }; | 93 | }; |
92 | 94 | ||
93 | #endif // EDITORWINDOW_H | 95 | #endif // EDITORWINDOW_H |
diff --git a/utils/themeeditor/gui/editorwindow.ui b/utils/themeeditor/gui/editorwindow.ui index 10e2c524c6..a7d804bd6b 100644 --- a/utils/themeeditor/gui/editorwindow.ui +++ b/utils/themeeditor/gui/editorwindow.ui | |||
@@ -14,7 +14,7 @@ | |||
14 | <string>Rockbox Theme Editor</string> | 14 | <string>Rockbox Theme Editor</string> |
15 | </property> | 15 | </property> |
16 | <property name="windowIcon"> | 16 | <property name="windowIcon"> |
17 | <iconset resource="resources.qrc"> | 17 | <iconset resource="../resources.qrc"> |
18 | <normaloff>:/resources/resources/windowicon.png</normaloff>:/resources/resources/windowicon.png</iconset> | 18 | <normaloff>:/resources/resources/windowicon.png</normaloff>:/resources/resources/windowicon.png</iconset> |
19 | </property> | 19 | </property> |
20 | <widget class="QWidget" name="centralwidget"> | 20 | <widget class="QWidget" name="centralwidget"> |
@@ -40,7 +40,7 @@ | |||
40 | <x>0</x> | 40 | <x>0</x> |
41 | <y>0</y> | 41 | <y>0</y> |
42 | <width>628</width> | 42 | <width>628</width> |
43 | <height>25</height> | 43 | <height>27</height> |
44 | </rect> | 44 | </rect> |
45 | </property> | 45 | </property> |
46 | <widget class="QMenu" name="menuFile"> | 46 | <widget class="QMenu" name="menuFile"> |
@@ -67,6 +67,8 @@ | |||
67 | <addaction name="actionPreview_Panel"/> | 67 | <addaction name="actionPreview_Panel"/> |
68 | <addaction name="actionDisplay_Panel"/> | 68 | <addaction name="actionDisplay_Panel"/> |
69 | <addaction name="actionFile_Panel"/> | 69 | <addaction name="actionFile_Panel"/> |
70 | <addaction name="separator"/> | ||
71 | <addaction name="actionDevice_Configuration"/> | ||
70 | </widget> | 72 | </widget> |
71 | <addaction name="menuFile"/> | 73 | <addaction name="menuFile"/> |
72 | <addaction name="menuView"/> | 74 | <addaction name="menuView"/> |
@@ -248,7 +250,7 @@ | |||
248 | </action> | 250 | </action> |
249 | <action name="actionToolbarNew"> | 251 | <action name="actionToolbarNew"> |
250 | <property name="icon"> | 252 | <property name="icon"> |
251 | <iconset resource="resources.qrc"> | 253 | <iconset resource="../resources.qrc"> |
252 | <normaloff>:/resources/resources/document-new.png</normaloff>:/resources/resources/document-new.png</iconset> | 254 | <normaloff>:/resources/resources/document-new.png</normaloff>:/resources/resources/document-new.png</iconset> |
253 | </property> | 255 | </property> |
254 | <property name="text"> | 256 | <property name="text"> |
@@ -260,7 +262,7 @@ | |||
260 | </action> | 262 | </action> |
261 | <action name="actionToolbarOpen"> | 263 | <action name="actionToolbarOpen"> |
262 | <property name="icon"> | 264 | <property name="icon"> |
263 | <iconset resource="resources.qrc"> | 265 | <iconset resource="../resources.qrc"> |
264 | <normaloff>:/resources/resources/document-open.png</normaloff>:/resources/resources/document-open.png</iconset> | 266 | <normaloff>:/resources/resources/document-open.png</normaloff>:/resources/resources/document-open.png</iconset> |
265 | </property> | 267 | </property> |
266 | <property name="text"> | 268 | <property name="text"> |
@@ -275,7 +277,7 @@ | |||
275 | <bool>false</bool> | 277 | <bool>false</bool> |
276 | </property> | 278 | </property> |
277 | <property name="icon"> | 279 | <property name="icon"> |
278 | <iconset resource="resources.qrc"> | 280 | <iconset resource="../resources.qrc"> |
279 | <normaloff>:/resources/resources/document-save.png</normaloff>:/resources/resources/document-save.png</iconset> | 281 | <normaloff>:/resources/resources/document-save.png</normaloff>:/resources/resources/document-save.png</iconset> |
280 | </property> | 282 | </property> |
281 | <property name="text"> | 283 | <property name="text"> |
@@ -293,6 +295,11 @@ | |||
293 | <string>Ctrl+Shift+O</string> | 295 | <string>Ctrl+Shift+O</string> |
294 | </property> | 296 | </property> |
295 | </action> | 297 | </action> |
298 | <action name="actionDevice_Configuration"> | ||
299 | <property name="text"> | ||
300 | <string>&Device Configuration</string> | ||
301 | </property> | ||
302 | </action> | ||
296 | </widget> | 303 | </widget> |
297 | <tabstops> | 304 | <tabstops> |
298 | <tabstop>projectTree</tabstop> | 305 | <tabstop>projectTree</tabstop> |
@@ -301,7 +308,7 @@ | |||
301 | <tabstop>editorTabs</tabstop> | 308 | <tabstop>editorTabs</tabstop> |
302 | </tabstops> | 309 | </tabstops> |
303 | <resources> | 310 | <resources> |
304 | <include location="resources.qrc"/> | 311 | <include location="../resources.qrc"/> |
305 | </resources> | 312 | </resources> |
306 | <connections> | 313 | <connections> |
307 | <connection> | 314 | <connection> |
diff --git a/utils/themeeditor/themeeditor.pro b/utils/themeeditor/themeeditor.pro index 05d117aa32..6237ee8f70 100644 --- a/utils/themeeditor/themeeditor.pro +++ b/utils/themeeditor/themeeditor.pro | |||
@@ -39,7 +39,8 @@ HEADERS += models/parsetreemodel.h \ | |||
39 | graphics/rbviewport.h \ | 39 | graphics/rbviewport.h \ |
40 | graphics/rbrenderinfo.h \ | 40 | graphics/rbrenderinfo.h \ |
41 | graphics/rbimage.h \ | 41 | graphics/rbimage.h \ |
42 | graphics/rbfont.h | 42 | graphics/rbfont.h \ |
43 | gui/devicestate.h | ||
43 | SOURCES += main.cpp \ | 44 | SOURCES += main.cpp \ |
44 | models/parsetreemodel.cpp \ | 45 | models/parsetreemodel.cpp \ |
45 | models/parsetreenode.cpp \ | 46 | models/parsetreenode.cpp \ |
@@ -55,7 +56,8 @@ SOURCES += main.cpp \ | |||
55 | graphics/rbviewport.cpp \ | 56 | graphics/rbviewport.cpp \ |
56 | graphics/rbrenderinfo.cpp \ | 57 | graphics/rbrenderinfo.cpp \ |
57 | graphics/rbimage.cpp \ | 58 | graphics/rbimage.cpp \ |
58 | graphics/rbfont.cpp | 59 | graphics/rbfont.cpp \ |
60 | gui/devicestate.cpp | ||
59 | OTHER_FILES += README \ | 61 | OTHER_FILES += README \ |
60 | resources/windowicon.png \ | 62 | resources/windowicon.png \ |
61 | resources/appicon.xcf \ | 63 | resources/appicon.xcf \ |
@@ -66,5 +68,6 @@ OTHER_FILES += README \ | |||
66 | FORMS += gui/editorwindow.ui \ | 68 | FORMS += gui/editorwindow.ui \ |
67 | gui/preferencesdialog.ui \ | 69 | gui/preferencesdialog.ui \ |
68 | gui/configdocument.ui \ | 70 | gui/configdocument.ui \ |
69 | gui/skinviewer.ui | 71 | gui/skinviewer.ui \ |
72 | gui/devicestate.ui | ||
70 | RESOURCES += resources.qrc | 73 | RESOURCES += resources.qrc |