diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2007-07-30 18:11:21 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2007-07-30 18:11:21 +0000 |
commit | a52d17293479075d074c56c4faedc2ef15a14414 (patch) | |
tree | a00f8907f5e3c9868332ca75a05ada5983c0f5de /rbutil/rbutilqt | |
parent | e2dca3e92a84c91ad2443a1103bea804e60690e7 (diff) | |
download | rockbox-a52d17293479075d074c56c4faedc2ef15a14414.tar.gz rockbox-a52d17293479075d074c56c4faedc2ef15a14414.zip |
Put links to the manual on the manual tab. Downloading the manual isn't finished yet.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14077 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt')
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.cpp | 35 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.h | 1 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqtfrm.ui | 219 |
3 files changed, 199 insertions, 56 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index 286047e2a7..dda324febb 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp | |||
@@ -72,6 +72,10 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent) | |||
72 | userSettings->endGroup(); | 72 | userSettings->endGroup(); |
73 | ui.comboBoxDevice->setCurrentIndex(ui.comboBoxDevice->findData(platform)); | 73 | ui.comboBoxDevice->setCurrentIndex(ui.comboBoxDevice->findData(platform)); |
74 | updateDevice(ui.comboBoxDevice->currentIndex()); | 74 | updateDevice(ui.comboBoxDevice->currentIndex()); |
75 | |||
76 | // manual tab | ||
77 | ui.buttonDownloadManual->setEnabled(false); | ||
78 | updateManual(); | ||
75 | 79 | ||
76 | connect(ui.actionAbout_Qt, SIGNAL(triggered()), qApp, SLOT(aboutQt())); | 80 | connect(ui.actionAbout_Qt, SIGNAL(triggered()), qApp, SLOT(aboutQt())); |
77 | connect(ui.action_About, SIGNAL(triggered()), this, SLOT(about())); | 81 | connect(ui.action_About, SIGNAL(triggered()), this, SLOT(about())); |
@@ -217,6 +221,37 @@ void RbUtilQt::updateDevice(int index) | |||
217 | devices->endGroup(); | 221 | devices->endGroup(); |
218 | 222 | ||
219 | qDebug() << "new device selected:" << platform; | 223 | qDebug() << "new device selected:" << platform; |
224 | // update manual from here to make sure new device is already selected | ||
225 | updateManual(); | ||
226 | } | ||
227 | |||
228 | |||
229 | void RbUtilQt::updateManual() | ||
230 | { | ||
231 | if(userSettings->value("defaults/platform").toString() != "") | ||
232 | { | ||
233 | devices->beginGroup(userSettings->value("defaults/platform").toString()); | ||
234 | QString manual; | ||
235 | manual = devices->value("manualname", "").toString(); | ||
236 | |||
237 | if(manual == "") | ||
238 | manual = "rockbox-" + devices->value("platform").toString(); | ||
239 | devices->endGroup(); | ||
240 | QString pdfmanual; | ||
241 | pdfmanual = devices->value("manual_url").toString() + "/" + manual + ".pdf"; | ||
242 | QString htmlmanual; | ||
243 | htmlmanual = devices->value("manual_url").toString() + "/" + manual + "/rockbox-build.html"; | ||
244 | ui.labelPdfManual->setText(tr("<a href='%1'>PDF Manual</a>") | ||
245 | .arg(pdfmanual)); | ||
246 | ui.labelHtmlManual->setText(tr("<a href='%1'>HTML Manual (opens in browser)</a>") | ||
247 | .arg(htmlmanual)); | ||
248 | } | ||
249 | else { | ||
250 | ui.labelPdfManual->setText(tr("Select a device for a link to the correct manual")); | ||
251 | ui.labelHtmlManual->setText(tr("<a href='%1'>Manual Overview</a>") | ||
252 | .arg("http://www.rockbox.org/manual.shtml")); | ||
253 | |||
254 | } | ||
220 | } | 255 | } |
221 | 256 | ||
222 | 257 | ||
diff --git a/rbutil/rbutilqt/rbutilqt.h b/rbutil/rbutilqt/rbutilqt.h index b9e24c17c1..86bde0cd99 100644 --- a/rbutil/rbutilqt/rbutilqt.h +++ b/rbutil/rbutilqt/rbutilqt.h | |||
@@ -43,6 +43,7 @@ class RbUtilQt : public QMainWindow | |||
43 | HttpGet *daily; | 43 | HttpGet *daily; |
44 | QString absolutePath; | 44 | QString absolutePath; |
45 | QTemporaryFile buildInfo; | 45 | QTemporaryFile buildInfo; |
46 | void updateManual(void); | ||
46 | 47 | ||
47 | private slots: | 48 | private slots: |
48 | void about(void); | 49 | void about(void); |
diff --git a/rbutil/rbutilqt/rbutilqtfrm.ui b/rbutil/rbutilqt/rbutilqtfrm.ui index 7666696b9c..3a5c6f7a7f 100644 --- a/rbutil/rbutilqt/rbutilqtfrm.ui +++ b/rbutil/rbutilqt/rbutilqtfrm.ui | |||
@@ -6,7 +6,7 @@ | |||
6 | <x>0</x> | 6 | <x>0</x> |
7 | <y>0</y> | 7 | <y>0</y> |
8 | <width>577</width> | 8 | <width>577</width> |
9 | <height>548</height> | 9 | <height>511</height> |
10 | </rect> | 10 | </rect> |
11 | </property> | 11 | </property> |
12 | <property name="windowTitle" > | 12 | <property name="windowTitle" > |
@@ -47,6 +47,12 @@ | |||
47 | <layout class="QGridLayout" > | 47 | <layout class="QGridLayout" > |
48 | <item row="0" column="0" > | 48 | <item row="0" column="0" > |
49 | <widget class="QToolButton" name="buttonComplete" > | 49 | <widget class="QToolButton" name="buttonComplete" > |
50 | <property name="accessibleName" > | ||
51 | <string>CompleteInstallationButton</string> | ||
52 | </property> | ||
53 | <property name="accessibleDescription" > | ||
54 | <string>This performs a complete installation of Rockbox. It installs the bootloader, a current build and the extras package.</string> | ||
55 | </property> | ||
50 | <property name="text" > | 56 | <property name="text" > |
51 | <string>...</string> | 57 | <string>...</string> |
52 | </property> | 58 | </property> |
@@ -141,54 +147,10 @@ p, li { white-space: pre-wrap; } | |||
141 | <string>&Installation</string> | 147 | <string>&Installation</string> |
142 | </attribute> | 148 | </attribute> |
143 | <layout class="QGridLayout" > | 149 | <layout class="QGridLayout" > |
144 | <property name="leftMargin" > | ||
145 | <number>9</number> | ||
146 | </property> | ||
147 | <property name="topMargin" > | ||
148 | <number>9</number> | ||
149 | </property> | ||
150 | <property name="rightMargin" > | ||
151 | <number>9</number> | ||
152 | </property> | ||
153 | <property name="bottomMargin" > | ||
154 | <number>9</number> | ||
155 | </property> | ||
156 | <property name="horizontalSpacing" > | ||
157 | <number>6</number> | ||
158 | </property> | ||
159 | <property name="verticalSpacing" > | ||
160 | <number>6</number> | ||
161 | </property> | ||
162 | <item row="4" column="1" > | ||
163 | <spacer> | ||
164 | <property name="orientation" > | ||
165 | <enum>Qt::Vertical</enum> | ||
166 | </property> | ||
167 | <property name="sizeHint" > | ||
168 | <size> | ||
169 | <width>20</width> | ||
170 | <height>81</height> | ||
171 | </size> | ||
172 | </property> | ||
173 | </spacer> | ||
174 | </item> | ||
175 | <item row="4" column="0" > | ||
176 | <spacer> | ||
177 | <property name="orientation" > | ||
178 | <enum>Qt::Vertical</enum> | ||
179 | </property> | ||
180 | <property name="sizeHint" > | ||
181 | <size> | ||
182 | <width>20</width> | ||
183 | <height>91</height> | ||
184 | </size> | ||
185 | </property> | ||
186 | </spacer> | ||
187 | </item> | ||
188 | <item row="0" column="0" > | 150 | <item row="0" column="0" > |
189 | <widget class="QToolButton" name="buttonBootloader" > | 151 | <widget class="QToolButton" name="buttonBootloader" > |
190 | <property name="text" > | 152 | <property name="text" > |
191 | <string>...</string> | 153 | <string>Install Bootloader</string> |
192 | </property> | 154 | </property> |
193 | <property name="icon" > | 155 | <property name="icon" > |
194 | <iconset resource="rbutilqt.qrc" >:/icons/icons/bootloader_btn.png</iconset> | 156 | <iconset resource="rbutilqt.qrc" >:/icons/icons/bootloader_btn.png</iconset> |
@@ -215,10 +177,19 @@ p, li { white-space: pre-wrap; } | |||
215 | </property> | 177 | </property> |
216 | </widget> | 178 | </widget> |
217 | </item> | 179 | </item> |
218 | <item row="2" column="0" > | 180 | <item row="1" column="0" > |
219 | <widget class="QToolButton" name="buttonRockbox" > | 181 | <widget class="QToolButton" name="buttonRockbox" > |
182 | <property name="toolTip" > | ||
183 | <string>Install Rockbox</string> | ||
184 | </property> | ||
185 | <property name="accessibleName" > | ||
186 | <string>ButtonInstall</string> | ||
187 | </property> | ||
188 | <property name="accessibleDescription" > | ||
189 | <string>This installs a build of Rockbox on your player. It can also upgrade an existing build.</string> | ||
190 | </property> | ||
220 | <property name="text" > | 191 | <property name="text" > |
221 | <string>...</string> | 192 | <string>Install Rockbox</string> |
222 | </property> | 193 | </property> |
223 | <property name="icon" > | 194 | <property name="icon" > |
224 | <iconset resource="rbutilqt.qrc" >:/icons/icons/rbinstall_btn.png</iconset> | 195 | <iconset resource="rbutilqt.qrc" >:/icons/icons/rbinstall_btn.png</iconset> |
@@ -231,7 +202,7 @@ p, li { white-space: pre-wrap; } | |||
231 | </property> | 202 | </property> |
232 | </widget> | 203 | </widget> |
233 | </item> | 204 | </item> |
234 | <item row="2" column="1" > | 205 | <item row="1" column="1" > |
235 | <widget class="QLabel" name="labelInstall" > | 206 | <widget class="QLabel" name="labelInstall" > |
236 | <property name="text" > | 207 | <property name="text" > |
237 | <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> | 208 | <string><html><head><meta name="qrichtext" content="1" /><style type="text/css"> |
@@ -250,6 +221,32 @@ p, li { white-space: pre-wrap; } | |||
250 | </property> | 221 | </property> |
251 | </widget> | 222 | </widget> |
252 | </item> | 223 | </item> |
224 | <item row="2" column="0" > | ||
225 | <spacer> | ||
226 | <property name="orientation" > | ||
227 | <enum>Qt::Vertical</enum> | ||
228 | </property> | ||
229 | <property name="sizeHint" > | ||
230 | <size> | ||
231 | <width>20</width> | ||
232 | <height>91</height> | ||
233 | </size> | ||
234 | </property> | ||
235 | </spacer> | ||
236 | </item> | ||
237 | <item row="2" column="1" > | ||
238 | <spacer> | ||
239 | <property name="orientation" > | ||
240 | <enum>Qt::Vertical</enum> | ||
241 | </property> | ||
242 | <property name="sizeHint" > | ||
243 | <size> | ||
244 | <width>20</width> | ||
245 | <height>81</height> | ||
246 | </size> | ||
247 | </property> | ||
248 | </spacer> | ||
249 | </item> | ||
253 | </layout> | 250 | </layout> |
254 | </widget> | 251 | </widget> |
255 | <widget class="QWidget" name="extras" > | 252 | <widget class="QWidget" name="extras" > |
@@ -260,7 +257,7 @@ p, li { white-space: pre-wrap; } | |||
260 | <item row="0" column="0" > | 257 | <item row="0" column="0" > |
261 | <widget class="QToolButton" name="buttonFonts" > | 258 | <widget class="QToolButton" name="buttonFonts" > |
262 | <property name="text" > | 259 | <property name="text" > |
263 | <string>...</string> | 260 | <string>Install Fonts package</string> |
264 | </property> | 261 | </property> |
265 | <property name="icon" > | 262 | <property name="icon" > |
266 | <iconset resource="rbutilqt.qrc" >:/icons/icons/font_btn.png</iconset> | 263 | <iconset resource="rbutilqt.qrc" >:/icons/icons/font_btn.png</iconset> |
@@ -290,7 +287,7 @@ p, li { white-space: pre-wrap; } | |||
290 | <item row="1" column="0" > | 287 | <item row="1" column="0" > |
291 | <widget class="QToolButton" name="buttonThemes" > | 288 | <widget class="QToolButton" name="buttonThemes" > |
292 | <property name="text" > | 289 | <property name="text" > |
293 | <string>...</string> | 290 | <string>Install themes</string> |
294 | </property> | 291 | </property> |
295 | <property name="icon" > | 292 | <property name="icon" > |
296 | <iconset resource="rbutilqt.qrc" >:/icons/icons/themes_btn.png</iconset> | 293 | <iconset resource="rbutilqt.qrc" >:/icons/icons/themes_btn.png</iconset> |
@@ -320,7 +317,7 @@ p, li { white-space: pre-wrap; } | |||
320 | <item row="2" column="0" > | 317 | <item row="2" column="0" > |
321 | <widget class="QToolButton" name="buttonGames" > | 318 | <widget class="QToolButton" name="buttonGames" > |
322 | <property name="text" > | 319 | <property name="text" > |
323 | <string>...</string> | 320 | <string>Install game files</string> |
324 | </property> | 321 | </property> |
325 | <property name="icon" > | 322 | <property name="icon" > |
326 | <iconset resource="rbutilqt.qrc" >:/icons/icons/doom_btn.png</iconset> | 323 | <iconset resource="rbutilqt.qrc" >:/icons/icons/doom_btn.png</iconset> |
@@ -383,7 +380,7 @@ p, li { white-space: pre-wrap; } | |||
383 | <item row="0" column="0" > | 380 | <item row="0" column="0" > |
384 | <widget class="QToolButton" name="buttonRemoveBootloader" > | 381 | <widget class="QToolButton" name="buttonRemoveBootloader" > |
385 | <property name="text" > | 382 | <property name="text" > |
386 | <string>...</string> | 383 | <string>Uninstall Bootloader</string> |
387 | </property> | 384 | </property> |
388 | <property name="icon" > | 385 | <property name="icon" > |
389 | <iconset resource="rbutilqt.qrc" >:/icons/icons/rembootloader_btn.png</iconset> | 386 | <iconset resource="rbutilqt.qrc" >:/icons/icons/rembootloader_btn.png</iconset> |
@@ -413,7 +410,7 @@ p, li { white-space: pre-wrap; } | |||
413 | <item row="1" column="0" > | 410 | <item row="1" column="0" > |
414 | <widget class="QToolButton" name="buttonRemoveRockbox" > | 411 | <widget class="QToolButton" name="buttonRemoveRockbox" > |
415 | <property name="text" > | 412 | <property name="text" > |
416 | <string>...</string> | 413 | <string>Uninstall Rockbox</string> |
417 | </property> | 414 | </property> |
418 | <property name="icon" > | 415 | <property name="icon" > |
419 | <iconset resource="rbutilqt.qrc" >:/icons/icons/remrb_btn.png</iconset> | 416 | <iconset resource="rbutilqt.qrc" >:/icons/icons/remrb_btn.png</iconset> |
@@ -478,6 +475,103 @@ p, li { white-space: pre-wrap; } | |||
478 | <attribute name="title" > | 475 | <attribute name="title" > |
479 | <string>&Manual</string> | 476 | <string>&Manual</string> |
480 | </attribute> | 477 | </attribute> |
478 | <layout class="QGridLayout" > | ||
479 | <item row="0" column="0" > | ||
480 | <widget class="QGroupBox" name="groupBox_2" > | ||
481 | <property name="title" > | ||
482 | <string>Read the manual</string> | ||
483 | </property> | ||
484 | <layout class="QGridLayout" > | ||
485 | <item row="0" column="0" > | ||
486 | <widget class="QLabel" name="labelPdfManual" > | ||
487 | <property name="text" > | ||
488 | <string>PDF manual</string> | ||
489 | </property> | ||
490 | <property name="openExternalLinks" > | ||
491 | <bool>true</bool> | ||
492 | </property> | ||
493 | <property name="textInteractionFlags" > | ||
494 | <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::NoTextInteraction</set> | ||
495 | </property> | ||
496 | </widget> | ||
497 | </item> | ||
498 | <item row="1" column="0" > | ||
499 | <widget class="QLabel" name="labelHtmlManual" > | ||
500 | <property name="text" > | ||
501 | <string>HTML manual</string> | ||
502 | </property> | ||
503 | <property name="openExternalLinks" > | ||
504 | <bool>true</bool> | ||
505 | </property> | ||
506 | <property name="textInteractionFlags" > | ||
507 | <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::NoTextInteraction</set> | ||
508 | </property> | ||
509 | </widget> | ||
510 | </item> | ||
511 | </layout> | ||
512 | </widget> | ||
513 | </item> | ||
514 | <item row="1" column="0" > | ||
515 | <widget class="QGroupBox" name="groupBox" > | ||
516 | <property name="title" > | ||
517 | <string>Download the manual</string> | ||
518 | </property> | ||
519 | <layout class="QGridLayout" > | ||
520 | <item row="0" column="0" > | ||
521 | <layout class="QVBoxLayout" > | ||
522 | <item> | ||
523 | <widget class="QRadioButton" name="radioPdf" > | ||
524 | <property name="text" > | ||
525 | <string>&PDF version</string> | ||
526 | </property> | ||
527 | </widget> | ||
528 | </item> | ||
529 | <item> | ||
530 | <widget class="QRadioButton" name="radioHtmlzip" > | ||
531 | <property name="text" > | ||
532 | <string>&HTML version (zip file)</string> | ||
533 | </property> | ||
534 | </widget> | ||
535 | </item> | ||
536 | </layout> | ||
537 | </item> | ||
538 | <item row="0" column="1" > | ||
539 | <spacer> | ||
540 | <property name="orientation" > | ||
541 | <enum>Qt::Horizontal</enum> | ||
542 | </property> | ||
543 | <property name="sizeHint" > | ||
544 | <size> | ||
545 | <width>40</width> | ||
546 | <height>20</height> | ||
547 | </size> | ||
548 | </property> | ||
549 | </spacer> | ||
550 | </item> | ||
551 | <item row="0" column="2" > | ||
552 | <widget class="QPushButton" name="buttonDownloadManual" > | ||
553 | <property name="text" > | ||
554 | <string>Down&load</string> | ||
555 | </property> | ||
556 | </widget> | ||
557 | </item> | ||
558 | </layout> | ||
559 | </widget> | ||
560 | </item> | ||
561 | <item row="2" column="0" > | ||
562 | <spacer> | ||
563 | <property name="orientation" > | ||
564 | <enum>Qt::Vertical</enum> | ||
565 | </property> | ||
566 | <property name="sizeHint" > | ||
567 | <size> | ||
568 | <width>20</width> | ||
569 | <height>40</height> | ||
570 | </size> | ||
571 | </property> | ||
572 | </spacer> | ||
573 | </item> | ||
574 | </layout> | ||
481 | </widget> | 575 | </widget> |
482 | </widget> | 576 | </widget> |
483 | </item> | 577 | </item> |
@@ -514,7 +608,7 @@ p, li { white-space: pre-wrap; } | |||
514 | <item> | 608 | <item> |
515 | <widget class="QLabel" name="logoLabel" > | 609 | <widget class="QLabel" name="logoLabel" > |
516 | <property name="text" > | 610 | <property name="text" > |
517 | <string/> | 611 | <string comment="Welcome to Rockbox Utility, the installation and housekeeping tool for Rockbox." /> |
518 | </property> | 612 | </property> |
519 | <property name="pixmap" > | 613 | <property name="pixmap" > |
520 | <pixmap resource="rbutilqt.qrc" >:/icons/icons/rblogo.xpm</pixmap> | 614 | <pixmap resource="rbutilqt.qrc" >:/icons/icons/rblogo.xpm</pixmap> |
@@ -577,6 +671,9 @@ p, li { white-space: pre-wrap; } | |||
577 | <verstretch>0</verstretch> | 671 | <verstretch>0</verstretch> |
578 | </sizepolicy> | 672 | </sizepolicy> |
579 | </property> | 673 | </property> |
674 | <property name="accessibleDescription" > | ||
675 | <string>Device selection combo box</string> | ||
676 | </property> | ||
580 | </widget> | 677 | </widget> |
581 | </item> | 678 | </item> |
582 | <item> | 679 | <item> |
@@ -655,11 +752,21 @@ p, li { white-space: pre-wrap; } | |||
655 | </action> | 752 | </action> |
656 | </widget> | 753 | </widget> |
657 | <tabstops> | 754 | <tabstops> |
755 | <tabstop>comboBoxDevice</tabstop> | ||
658 | <tabstop>buttonDetect</tabstop> | 756 | <tabstop>buttonDetect</tabstop> |
659 | <tabstop>tabWidget</tabstop> | 757 | <tabstop>tabWidget</tabstop> |
758 | <tabstop>buttonComplete</tabstop> | ||
759 | <tabstop>buttonSmall</tabstop> | ||
660 | <tabstop>buttonBootloader</tabstop> | 760 | <tabstop>buttonBootloader</tabstop> |
661 | <tabstop>buttonRockbox</tabstop> | 761 | <tabstop>buttonRockbox</tabstop> |
662 | <tabstop>comboBoxDevice</tabstop> | 762 | <tabstop>buttonFonts</tabstop> |
763 | <tabstop>buttonThemes</tabstop> | ||
764 | <tabstop>buttonGames</tabstop> | ||
765 | <tabstop>buttonRemoveBootloader</tabstop> | ||
766 | <tabstop>buttonRemoveRockbox</tabstop> | ||
767 | <tabstop>radioPdf</tabstop> | ||
768 | <tabstop>radioHtmlzip</tabstop> | ||
769 | <tabstop>buttonDownloadManual</tabstop> | ||
663 | </tabstops> | 770 | </tabstops> |
664 | <resources> | 771 | <resources> |
665 | <include location="rbutilqt.qrc" /> | 772 | <include location="rbutilqt.qrc" /> |