From a52d17293479075d074c56c4faedc2ef15a14414 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Mon, 30 Jul 2007 18:11:21 +0000 Subject: 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 --- rbutil/rbutilqt/rbutilqt.cpp | 35 +++++++ rbutil/rbutilqt/rbutilqt.h | 1 + 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) userSettings->endGroup(); ui.comboBoxDevice->setCurrentIndex(ui.comboBoxDevice->findData(platform)); updateDevice(ui.comboBoxDevice->currentIndex()); + + // manual tab + ui.buttonDownloadManual->setEnabled(false); + updateManual(); connect(ui.actionAbout_Qt, SIGNAL(triggered()), qApp, SLOT(aboutQt())); connect(ui.action_About, SIGNAL(triggered()), this, SLOT(about())); @@ -217,6 +221,37 @@ void RbUtilQt::updateDevice(int index) devices->endGroup(); qDebug() << "new device selected:" << platform; + // update manual from here to make sure new device is already selected + updateManual(); +} + + +void RbUtilQt::updateManual() +{ + if(userSettings->value("defaults/platform").toString() != "") + { + devices->beginGroup(userSettings->value("defaults/platform").toString()); + QString manual; + manual = devices->value("manualname", "").toString(); + + if(manual == "") + manual = "rockbox-" + devices->value("platform").toString(); + devices->endGroup(); + QString pdfmanual; + pdfmanual = devices->value("manual_url").toString() + "/" + manual + ".pdf"; + QString htmlmanual; + htmlmanual = devices->value("manual_url").toString() + "/" + manual + "/rockbox-build.html"; + ui.labelPdfManual->setText(tr("PDF Manual") + .arg(pdfmanual)); + ui.labelHtmlManual->setText(tr("HTML Manual (opens in browser)") + .arg(htmlmanual)); + } + else { + ui.labelPdfManual->setText(tr("Select a device for a link to the correct manual")); + ui.labelHtmlManual->setText(tr("Manual Overview") + .arg("http://www.rockbox.org/manual.shtml")); + + } } 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 HttpGet *daily; QString absolutePath; QTemporaryFile buildInfo; + void updateManual(void); private slots: 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 @@ 0 0 577 - 548 + 511 @@ -47,6 +47,12 @@ + + CompleteInstallationButton + + + This performs a complete installation of Rockbox. It installs the bootloader, a current build and the extras package. + ... @@ -141,54 +147,10 @@ p, li { white-space: pre-wrap; } &Installation - - 9 - - - 9 - - - 9 - - - 9 - - - 6 - - - 6 - - - - - Qt::Vertical - - - - 20 - 81 - - - - - - - - Qt::Vertical - - - - 20 - 91 - - - - - ... + Install Bootloader :/icons/icons/bootloader_btn.png @@ -215,10 +177,19 @@ p, li { white-space: pre-wrap; } - + + + Install Rockbox + + + ButtonInstall + + + This installs a build of Rockbox on your player. It can also upgrade an existing build. + - ... + Install Rockbox :/icons/icons/rbinstall_btn.png @@ -231,7 +202,7 @@ p, li { white-space: pre-wrap; } - + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> @@ -250,6 +221,32 @@ p, li { white-space: pre-wrap; } + + + + Qt::Vertical + + + + 20 + 91 + + + + + + + + Qt::Vertical + + + + 20 + 81 + + + + @@ -260,7 +257,7 @@ p, li { white-space: pre-wrap; } - ... + Install Fonts package :/icons/icons/font_btn.png @@ -290,7 +287,7 @@ p, li { white-space: pre-wrap; } - ... + Install themes :/icons/icons/themes_btn.png @@ -320,7 +317,7 @@ p, li { white-space: pre-wrap; } - ... + Install game files :/icons/icons/doom_btn.png @@ -383,7 +380,7 @@ p, li { white-space: pre-wrap; } - ... + Uninstall Bootloader :/icons/icons/rembootloader_btn.png @@ -413,7 +410,7 @@ p, li { white-space: pre-wrap; } - ... + Uninstall Rockbox :/icons/icons/remrb_btn.png @@ -478,6 +475,103 @@ p, li { white-space: pre-wrap; } &Manual + + + + + Read the manual + + + + + + PDF manual + + + true + + + Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::NoTextInteraction + + + + + + + HTML manual + + + true + + + Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::NoTextInteraction + + + + + + + + + + Download the manual + + + + + + + + &PDF version + + + + + + + &HTML version (zip file) + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Down&load + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + @@ -514,7 +608,7 @@ p, li { white-space: pre-wrap; } - + :/icons/icons/rblogo.xpm @@ -577,6 +671,9 @@ p, li { white-space: pre-wrap; } 0 + + Device selection combo box + @@ -655,11 +752,21 @@ p, li { white-space: pre-wrap; } + comboBoxDevice buttonDetect tabWidget + buttonComplete + buttonSmall buttonBootloader buttonRockbox - comboBoxDevice + buttonFonts + buttonThemes + buttonGames + buttonRemoveBootloader + buttonRemoveRockbox + radioPdf + radioHtmlzip + buttonDownloadManual -- cgit v1.2.3