forked from len0rd/rockbox
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
This commit is contained in:
parent
e2dca3e92a
commit
a52d172934
3 changed files with 199 additions and 56 deletions
|
|
@ -72,6 +72,10 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent)
|
||||||
userSettings->endGroup();
|
userSettings->endGroup();
|
||||||
ui.comboBoxDevice->setCurrentIndex(ui.comboBoxDevice->findData(platform));
|
ui.comboBoxDevice->setCurrentIndex(ui.comboBoxDevice->findData(platform));
|
||||||
updateDevice(ui.comboBoxDevice->currentIndex());
|
updateDevice(ui.comboBoxDevice->currentIndex());
|
||||||
|
|
||||||
|
// manual tab
|
||||||
|
ui.buttonDownloadManual->setEnabled(false);
|
||||||
|
updateManual();
|
||||||
|
|
||||||
connect(ui.actionAbout_Qt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
|
connect(ui.actionAbout_Qt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
|
||||||
connect(ui.action_About, SIGNAL(triggered()), this, SLOT(about()));
|
connect(ui.action_About, SIGNAL(triggered()), this, SLOT(about()));
|
||||||
|
|
@ -217,6 +221,37 @@ void RbUtilQt::updateDevice(int index)
|
||||||
devices->endGroup();
|
devices->endGroup();
|
||||||
|
|
||||||
qDebug() << "new device selected:" << platform;
|
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("<a href='%1'>PDF Manual</a>")
|
||||||
|
.arg(pdfmanual));
|
||||||
|
ui.labelHtmlManual->setText(tr("<a href='%1'>HTML Manual (opens in browser)</a>")
|
||||||
|
.arg(htmlmanual));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ui.labelPdfManual->setText(tr("Select a device for a link to the correct manual"));
|
||||||
|
ui.labelHtmlManual->setText(tr("<a href='%1'>Manual Overview</a>")
|
||||||
|
.arg("http://www.rockbox.org/manual.shtml"));
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ class RbUtilQt : public QMainWindow
|
||||||
HttpGet *daily;
|
HttpGet *daily;
|
||||||
QString absolutePath;
|
QString absolutePath;
|
||||||
QTemporaryFile buildInfo;
|
QTemporaryFile buildInfo;
|
||||||
|
void updateManual(void);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void about(void);
|
void about(void);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>577</width>
|
<width>577</width>
|
||||||
<height>548</height>
|
<height>511</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
|
|
@ -47,6 +47,12 @@
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<widget class="QToolButton" name="buttonComplete" >
|
<widget class="QToolButton" name="buttonComplete" >
|
||||||
|
<property name="accessibleName" >
|
||||||
|
<string>CompleteInstallationButton</string>
|
||||||
|
</property>
|
||||||
|
<property name="accessibleDescription" >
|
||||||
|
<string>This performs a complete installation of Rockbox. It installs the bootloader, a current build and the extras package.</string>
|
||||||
|
</property>
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
@ -141,54 +147,10 @@ p, li { white-space: pre-wrap; }
|
||||||
<string>&Installation</string>
|
<string>&Installation</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
<property name="leftMargin" >
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin" >
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin" >
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin" >
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="horizontalSpacing" >
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="verticalSpacing" >
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item row="4" column="1" >
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" >
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>81</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0" >
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" >
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>91</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<widget class="QToolButton" name="buttonBootloader" >
|
<widget class="QToolButton" name="buttonBootloader" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>...</string>
|
<string>Install Bootloader</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon" >
|
<property name="icon" >
|
||||||
<iconset resource="rbutilqt.qrc" >:/icons/icons/bootloader_btn.png</iconset>
|
<iconset resource="rbutilqt.qrc" >:/icons/icons/bootloader_btn.png</iconset>
|
||||||
|
|
@ -215,10 +177,19 @@ p, li { white-space: pre-wrap; }
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" >
|
<item row="1" column="0" >
|
||||||
<widget class="QToolButton" name="buttonRockbox" >
|
<widget class="QToolButton" name="buttonRockbox" >
|
||||||
|
<property name="toolTip" >
|
||||||
|
<string>Install Rockbox</string>
|
||||||
|
</property>
|
||||||
|
<property name="accessibleName" >
|
||||||
|
<string>ButtonInstall</string>
|
||||||
|
</property>
|
||||||
|
<property name="accessibleDescription" >
|
||||||
|
<string>This installs a build of Rockbox on your player. It can also upgrade an existing build.</string>
|
||||||
|
</property>
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>...</string>
|
<string>Install Rockbox</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon" >
|
<property name="icon" >
|
||||||
<iconset resource="rbutilqt.qrc" >:/icons/icons/rbinstall_btn.png</iconset>
|
<iconset resource="rbutilqt.qrc" >:/icons/icons/rbinstall_btn.png</iconset>
|
||||||
|
|
@ -231,7 +202,7 @@ p, li { white-space: pre-wrap; }
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1" >
|
<item row="1" column="1" >
|
||||||
<widget class="QLabel" name="labelInstall" >
|
<widget class="QLabel" name="labelInstall" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
|
|
@ -250,6 +221,32 @@ p, li { white-space: pre-wrap; }
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0" >
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" >
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>91</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1" >
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" >
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>81</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="extras" >
|
<widget class="QWidget" name="extras" >
|
||||||
|
|
@ -260,7 +257,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<widget class="QToolButton" name="buttonFonts" >
|
<widget class="QToolButton" name="buttonFonts" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>...</string>
|
<string>Install Fonts package</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon" >
|
<property name="icon" >
|
||||||
<iconset resource="rbutilqt.qrc" >:/icons/icons/font_btn.png</iconset>
|
<iconset resource="rbutilqt.qrc" >:/icons/icons/font_btn.png</iconset>
|
||||||
|
|
@ -290,7 +287,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<item row="1" column="0" >
|
<item row="1" column="0" >
|
||||||
<widget class="QToolButton" name="buttonThemes" >
|
<widget class="QToolButton" name="buttonThemes" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>...</string>
|
<string>Install themes</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon" >
|
<property name="icon" >
|
||||||
<iconset resource="rbutilqt.qrc" >:/icons/icons/themes_btn.png</iconset>
|
<iconset resource="rbutilqt.qrc" >:/icons/icons/themes_btn.png</iconset>
|
||||||
|
|
@ -320,7 +317,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<item row="2" column="0" >
|
<item row="2" column="0" >
|
||||||
<widget class="QToolButton" name="buttonGames" >
|
<widget class="QToolButton" name="buttonGames" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>...</string>
|
<string>Install game files</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon" >
|
<property name="icon" >
|
||||||
<iconset resource="rbutilqt.qrc" >:/icons/icons/doom_btn.png</iconset>
|
<iconset resource="rbutilqt.qrc" >:/icons/icons/doom_btn.png</iconset>
|
||||||
|
|
@ -383,7 +380,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<widget class="QToolButton" name="buttonRemoveBootloader" >
|
<widget class="QToolButton" name="buttonRemoveBootloader" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>...</string>
|
<string>Uninstall Bootloader</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon" >
|
<property name="icon" >
|
||||||
<iconset resource="rbutilqt.qrc" >:/icons/icons/rembootloader_btn.png</iconset>
|
<iconset resource="rbutilqt.qrc" >:/icons/icons/rembootloader_btn.png</iconset>
|
||||||
|
|
@ -413,7 +410,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<item row="1" column="0" >
|
<item row="1" column="0" >
|
||||||
<widget class="QToolButton" name="buttonRemoveRockbox" >
|
<widget class="QToolButton" name="buttonRemoveRockbox" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>...</string>
|
<string>Uninstall Rockbox</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon" >
|
<property name="icon" >
|
||||||
<iconset resource="rbutilqt.qrc" >:/icons/icons/remrb_btn.png</iconset>
|
<iconset resource="rbutilqt.qrc" >:/icons/icons/remrb_btn.png</iconset>
|
||||||
|
|
@ -478,6 +475,103 @@ p, li { white-space: pre-wrap; }
|
||||||
<attribute name="title" >
|
<attribute name="title" >
|
||||||
<string>&Manual</string>
|
<string>&Manual</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<layout class="QGridLayout" >
|
||||||
|
<item row="0" column="0" >
|
||||||
|
<widget class="QGroupBox" name="groupBox_2" >
|
||||||
|
<property name="title" >
|
||||||
|
<string>Read the manual</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" >
|
||||||
|
<item row="0" column="0" >
|
||||||
|
<widget class="QLabel" name="labelPdfManual" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>PDF manual</string>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags" >
|
||||||
|
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::NoTextInteraction</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" >
|
||||||
|
<widget class="QLabel" name="labelHtmlManual" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>HTML manual</string>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags" >
|
||||||
|
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::NoTextInteraction</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" >
|
||||||
|
<widget class="QGroupBox" name="groupBox" >
|
||||||
|
<property name="title" >
|
||||||
|
<string>Download the manual</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" >
|
||||||
|
<item row="0" column="0" >
|
||||||
|
<layout class="QVBoxLayout" >
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="radioPdf" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>&PDF version</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="radioHtmlzip" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>&HTML version (zip file)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" >
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" >
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2" >
|
||||||
|
<widget class="QPushButton" name="buttonDownloadManual" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Down&load</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" >
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" >
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
@ -514,7 +608,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="logoLabel" >
|
<widget class="QLabel" name="logoLabel" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string/>
|
<string comment="Welcome to Rockbox Utility, the installation and housekeeping tool for Rockbox." />
|
||||||
</property>
|
</property>
|
||||||
<property name="pixmap" >
|
<property name="pixmap" >
|
||||||
<pixmap resource="rbutilqt.qrc" >:/icons/icons/rblogo.xpm</pixmap>
|
<pixmap resource="rbutilqt.qrc" >:/icons/icons/rblogo.xpm</pixmap>
|
||||||
|
|
@ -577,6 +671,9 @@ p, li { white-space: pre-wrap; }
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="accessibleDescription" >
|
||||||
|
<string>Device selection combo box</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|
@ -655,11 +752,21 @@ p, li { white-space: pre-wrap; }
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
|
<tabstop>comboBoxDevice</tabstop>
|
||||||
<tabstop>buttonDetect</tabstop>
|
<tabstop>buttonDetect</tabstop>
|
||||||
<tabstop>tabWidget</tabstop>
|
<tabstop>tabWidget</tabstop>
|
||||||
|
<tabstop>buttonComplete</tabstop>
|
||||||
|
<tabstop>buttonSmall</tabstop>
|
||||||
<tabstop>buttonBootloader</tabstop>
|
<tabstop>buttonBootloader</tabstop>
|
||||||
<tabstop>buttonRockbox</tabstop>
|
<tabstop>buttonRockbox</tabstop>
|
||||||
<tabstop>comboBoxDevice</tabstop>
|
<tabstop>buttonFonts</tabstop>
|
||||||
|
<tabstop>buttonThemes</tabstop>
|
||||||
|
<tabstop>buttonGames</tabstop>
|
||||||
|
<tabstop>buttonRemoveBootloader</tabstop>
|
||||||
|
<tabstop>buttonRemoveRockbox</tabstop>
|
||||||
|
<tabstop>radioPdf</tabstop>
|
||||||
|
<tabstop>radioHtmlzip</tabstop>
|
||||||
|
<tabstop>buttonDownloadManual</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="rbutilqt.qrc" />
|
<include location="rbutilqt.qrc" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue