Browse Source

Merge pull request #2847 from Chocobo1/move_stats

Revamp menu items
adaptive-webui-19844
sledgehammer999 10 years ago
parent
commit
e4282c10c7
  1. 15
      src/gui/mainwindow.cpp
  2. 2
      src/gui/mainwindow.h
  3. 97
      src/gui/mainwindow.ui

15
src/gui/mainwindow.cpp

@ -133,7 +133,6 @@ MainWindow::MainWindow(QWidget *parent)
actionCreate_torrent->setIcon(GuiIconProvider::instance()->getIcon("document-edit")); actionCreate_torrent->setIcon(GuiIconProvider::instance()->getIcon("document-edit"));
actionAbout->setIcon(GuiIconProvider::instance()->getIcon("help-about")); actionAbout->setIcon(GuiIconProvider::instance()->getIcon("help-about"));
actionStatistics->setIcon(GuiIconProvider::instance()->getIcon("view-statistics")); actionStatistics->setIcon(GuiIconProvider::instance()->getIcon("view-statistics"));
actionBugReport->setIcon(GuiIconProvider::instance()->getIcon("tools-report-bug"));
actionDecreasePriority->setIcon(GuiIconProvider::instance()->getIcon("go-down")); actionDecreasePriority->setIcon(GuiIconProvider::instance()->getIcon("go-down"));
actionBottomPriority->setIcon(GuiIconProvider::instance()->getIcon("go-bottom")); actionBottomPriority->setIcon(GuiIconProvider::instance()->getIcon("go-bottom"));
actionDelete->setIcon(GuiIconProvider::instance()->getIcon("list-remove")); actionDelete->setIcon(GuiIconProvider::instance()->getIcon("list-remove"));
@ -158,9 +157,9 @@ MainWindow::MainWindow(QWidget *parent)
pauseAllMenu->addAction(actionPause_All); pauseAllMenu->addAction(actionPause_All);
actionPause->setMenu(pauseAllMenu); actionPause->setMenu(pauseAllMenu);
QMenu *lockMenu = new QMenu(this); QMenu *lockMenu = new QMenu(this);
QAction *defineUiLockPasswdAct = lockMenu->addAction(tr("Set the password...")); QAction *defineUiLockPasswdAct = lockMenu->addAction(tr("&Set Password"));
connect(defineUiLockPasswdAct, SIGNAL(triggered()), this, SLOT(defineUILockPassword())); connect(defineUiLockPasswdAct, SIGNAL(triggered()), this, SLOT(defineUILockPassword()));
QAction *clearUiLockPasswdAct = lockMenu->addAction(tr("Clear the password")); QAction *clearUiLockPasswdAct = lockMenu->addAction(tr("&Clear Password"));
connect(clearUiLockPasswdAct, SIGNAL(triggered()), this, SLOT(clearUILockPassword())); connect(clearUiLockPasswdAct, SIGNAL(triggered()), this, SLOT(clearUILockPassword()));
actionLock_qBittorrent->setMenu(lockMenu); actionLock_qBittorrent->setMenu(lockMenu);
@ -537,21 +536,11 @@ void MainWindow::updateNbTorrents()
tabs->setTabText(0, tr("Transfers (%1)").arg(transferList->getSourceModel()->rowCount())); tabs->setTabText(0, tr("Transfers (%1)").arg(transferList->getSourceModel()->rowCount()));
} }
void MainWindow::on_actionWebsite_triggered() const
{
QDesktopServices::openUrl(QUrl(QString::fromUtf8("http://www.qbittorrent.org")));
}
void MainWindow::on_actionDocumentation_triggered() const void MainWindow::on_actionDocumentation_triggered() const
{ {
QDesktopServices::openUrl(QUrl(QString::fromUtf8("http://doc.qbittorrent.org"))); QDesktopServices::openUrl(QUrl(QString::fromUtf8("http://doc.qbittorrent.org")));
} }
void MainWindow::on_actionBugReport_triggered() const
{
QDesktopServices::openUrl(QUrl(QString::fromUtf8("http://bugs.qbittorrent.org")));
}
void MainWindow::tab_changed(int new_tab) void MainWindow::tab_changed(int new_tab)
{ {
Q_UNUSED(new_tab); Q_UNUSED(new_tab);

2
src/gui/mainwindow.h

@ -97,8 +97,6 @@ protected slots:
void on_actionAbout_triggered(); void on_actionAbout_triggered();
void on_actionStatistics_triggered(); void on_actionStatistics_triggered();
void on_actionCreate_torrent_triggered(); void on_actionCreate_torrent_triggered();
void on_actionWebsite_triggered() const;
void on_actionBugReport_triggered() const;
void balloonClicked(); void balloonClicked();
void writeSettings(); void writeSettings();
void readSettings(); void readSettings();

97
src/gui/mainwindow.ui

@ -29,7 +29,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>914</width> <width>914</width>
<height>22</height> <height>20</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menu_Edit"> <widget class="QMenu" name="menu_Edit">
@ -40,7 +40,6 @@
<addaction name="actionPause"/> <addaction name="actionPause"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionDelete"/> <addaction name="actionDelete"/>
<!--Dynamic separator from mainwindow.cpp-->
<addaction name="actionTopPriority"/> <addaction name="actionTopPriority"/>
<addaction name="actionIncreasePriority"/> <addaction name="actionIncreasePriority"/>
<addaction name="actionDecreasePriority"/> <addaction name="actionDecreasePriority"/>
@ -50,11 +49,10 @@
<property name="title"> <property name="title">
<string>&amp;Help</string> <string>&amp;Help</string>
</property> </property>
<addaction name="actionBugReport"/>
<addaction name="actionWebsite"/>
<addaction name="actionDocumentation"/> <addaction name="actionDocumentation"/>
<addaction name="actionDonate_money"/>
<addaction name="actionCheck_for_updates"/> <addaction name="actionCheck_for_updates"/>
<addaction name="separator"/>
<addaction name="actionDonate_money"/>
<addaction name="actionAbout"/> <addaction name="actionAbout"/>
</widget> </widget>
<widget class="QMenu" name="menu_Options"> <widget class="QMenu" name="menu_Options">
@ -63,7 +61,7 @@
</property> </property>
<widget class="QMenu" name="menuAuto_Shutdown_on_downloads_completion"> <widget class="QMenu" name="menuAuto_Shutdown_on_downloads_completion">
<property name="title"> <property name="title">
<string>Auto-Shutdown on downloads completion</string> <string>On Downloads &amp;Done</string>
</property> </property>
<addaction name="actionAutoShutdown_Disabled"/> <addaction name="actionAutoShutdown_Disabled"/>
<addaction name="actionAutoExit_qBittorrent"/> <addaction name="actionAutoExit_qBittorrent"/>
@ -72,7 +70,6 @@
<addaction name="actionAutoShutdown_system"/> <addaction name="actionAutoShutdown_system"/>
</widget> </widget>
<addaction name="actionCreate_torrent"/> <addaction name="actionCreate_torrent"/>
<addaction name="actionStatistics"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionOptions"/> <addaction name="actionOptions"/>
<addaction name="separator"/> <addaction name="separator"/>
@ -85,6 +82,7 @@
<addaction name="actionOpen"/> <addaction name="actionOpen"/>
<addaction name="actionDownload_from_URL"/> <addaction name="actionDownload_from_URL"/>
<addaction name="action_Import_Torrent"/> <addaction name="action_Import_Torrent"/>
<addaction name="separator"/>
<addaction name="actionExit"/> <addaction name="actionExit"/>
</widget> </widget>
<widget class="QMenu" name="menuView"> <widget class="QMenu" name="menuView">
@ -98,6 +96,8 @@
<addaction name="actionRSS_Reader"/> <addaction name="actionRSS_Reader"/>
<addaction name="actionExecution_Logs"/> <addaction name="actionExecution_Logs"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionStatistics"/>
<addaction name="separator"/>
<addaction name="actionLock_qBittorrent"/> <addaction name="actionLock_qBittorrent"/>
</widget> </widget>
<addaction name="menu_File"/> <addaction name="menu_File"/>
@ -131,7 +131,6 @@
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionStart"/> <addaction name="actionStart"/>
<addaction name="actionPause"/> <addaction name="actionPause"/>
<!--Dynamic separator from mainwindow.cpp-->
<addaction name="actionBottomPriority"/> <addaction name="actionBottomPriority"/>
<addaction name="actionDecreasePriority"/> <addaction name="actionDecreasePriority"/>
<addaction name="actionIncreasePriority"/> <addaction name="actionIncreasePriority"/>
@ -151,7 +150,7 @@
</action> </action>
<action name="actionExit"> <action name="actionExit">
<property name="text"> <property name="text">
<string>Exit</string> <string>E&amp;xit</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Exit</string> <string>Exit</string>
@ -194,15 +193,6 @@
<string>Delete</string> <string>Delete</string>
</property> </property>
</action> </action>
<action name="actionWebsite">
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/skin/qbittorrent32.png</normaloff>:/icons/skin/qbittorrent32.png</iconset>
</property>
<property name="text">
<string>Visit &amp;Website</string>
</property>
</action>
<action name="actionDownload_from_URL"> <action name="actionDownload_from_URL">
<property name="text"> <property name="text">
<string>Add Torrent &amp;Link...</string> <string>Add Torrent &amp;Link...</string>
@ -213,22 +203,17 @@
</action> </action>
<action name="actionCreate_torrent"> <action name="actionCreate_torrent">
<property name="text"> <property name="text">
<string>Torrent &amp;creator</string> <string>Torrent &amp;Creator</string>
</property>
</action>
<action name="actionBugReport">
<property name="text">
<string>Report a &amp;bug</string>
</property> </property>
</action> </action>
<action name="actionSet_upload_limit"> <action name="actionSet_upload_limit">
<property name="text"> <property name="text">
<string>Set upload limit...</string> <string>Set Upload Limit...</string>
</property> </property>
</action> </action>
<action name="actionSet_download_limit"> <action name="actionSet_download_limit">
<property name="text"> <property name="text">
<string>Set download limit...</string> <string>Set Download Limit...</string>
</property> </property>
</action> </action>
<action name="actionDocumentation"> <action name="actionDocumentation">
@ -238,17 +223,17 @@
</action> </action>
<action name="actionSet_global_download_limit"> <action name="actionSet_global_download_limit">
<property name="text"> <property name="text">
<string>Set global download limit...</string> <string>Set Global Download Limit...</string>
</property> </property>
</action> </action>
<action name="actionSet_global_upload_limit"> <action name="actionSet_global_upload_limit">
<property name="text"> <property name="text">
<string>Set global upload limit...</string> <string>Set Global Upload Limit...</string>
</property> </property>
</action> </action>
<action name="actionBottomPriority"> <action name="actionBottomPriority">
<property name="text"> <property name="text">
<string>Minimum priority</string> <string>Minimum Priority</string>
</property> </property>
<property name="visible"> <property name="visible">
<bool>true</bool> <bool>true</bool>
@ -256,7 +241,7 @@
</action> </action>
<action name="actionTopPriority"> <action name="actionTopPriority">
<property name="text"> <property name="text">
<string>Top priority</string> <string>Top Priority</string>
</property> </property>
<property name="visible"> <property name="visible">
<bool>true</bool> <bool>true</bool>
@ -264,7 +249,7 @@
</action> </action>
<action name="actionDecreasePriority"> <action name="actionDecreasePriority">
<property name="text"> <property name="text">
<string>Decrease priority</string> <string>Decrease Priority</string>
</property> </property>
<property name="visible"> <property name="visible">
<bool>true</bool> <bool>true</bool>
@ -272,7 +257,7 @@
</action> </action>
<action name="actionIncreasePriority"> <action name="actionIncreasePriority">
<property name="text"> <property name="text">
<string>Increase priority</string> <string>Increase Priority</string>
</property> </property>
<property name="visible"> <property name="visible">
<bool>true</bool> <bool>true</bool>
@ -283,10 +268,10 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Alternative speed limits</string> <string>Alternative Speed Limits</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Alternative speed limits</string> <string>Alternative Speed Limits</string>
</property> </property>
</action> </action>
<action name="actionTop_tool_bar"> <action name="actionTop_tool_bar">
@ -294,10 +279,10 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Top &amp;tool bar</string> <string>&amp;Top Toolbar</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Display top tool bar</string> <string>Display Top Toolbar</string>
</property> </property>
</action> </action>
<action name="actionSpeed_in_title_bar"> <action name="actionSpeed_in_title_bar">
@ -305,10 +290,10 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>&amp;Speed in title bar</string> <string>S&amp;peed in Title Bar</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Show transfer speed in title bar</string> <string>Show Transfer Speed in Title Bar</string>
</property> </property>
</action> </action>
<action name="actionRSS_Reader"> <action name="actionRSS_Reader">
@ -316,7 +301,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>&amp;RSS reader</string> <string>&amp;RSS Reader</string>
</property> </property>
</action> </action>
<action name="actionSearch_engine"> <action name="actionSearch_engine">
@ -324,34 +309,34 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Search &amp;engine</string> <string>Search &amp;Engine</string>
</property> </property>
</action> </action>
<action name="actionLock_qBittorrent"> <action name="actionLock_qBittorrent">
<property name="text"> <property name="text">
<string>Lock qBittorrent</string> <string>L&amp;ock qBittorrent</string>
</property>
<property name="toolTip">
<string>Lock qBittorrent</string>
</property> </property>
<property name="iconText"> <property name="iconText">
<string>Lock</string> <string>Lock</string>
</property> </property>
<property name="toolTip">
<string>Lock qBittorrent</string>
</property>
<property name="shortcut"> <property name="shortcut">
<string notr="true">Ctrl+L</string> <string notr="true">Ctrl+L</string>
</property> </property>
</action> </action>
<action name="action_Import_Torrent"> <action name="action_Import_Torrent">
<property name="text"> <property name="text">
<string>Import existing torrent...</string> <string>&amp;Import Existing Torrent...</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Import torrent...</string> <string>Import Torrent...</string>
</property> </property>
</action> </action>
<action name="actionDonate_money"> <action name="actionDonate_money">
<property name="text"> <property name="text">
<string>Donate money</string> <string>Do&amp;nate!</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>If you like qBittorrent, please donate!</string> <string>If you like qBittorrent, please donate!</string>
@ -372,7 +357,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Execution &amp;Log</string> <string>&amp;Log</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Execution Log</string> <string>Execution Log</string>
@ -383,7 +368,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Exit qBittorrent</string> <string>&amp;Exit qBittorrent</string>
</property> </property>
</action> </action>
<action name="actionAutoSuspend_system"> <action name="actionAutoSuspend_system">
@ -391,7 +376,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Suspend system</string> <string>&amp;Suspend System</string>
</property> </property>
</action> </action>
<action name="actionAutoHibernate_system"> <action name="actionAutoHibernate_system">
@ -399,7 +384,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Hibernate system</string> <string>&amp;Hibernate System</string>
</property> </property>
</action> </action>
<action name="actionAutoShutdown_system"> <action name="actionAutoShutdown_system">
@ -407,7 +392,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Shutdown system</string> <string>S&amp;hutdown System</string>
</property> </property>
</action> </action>
<action name="actionAutoShutdown_Disabled"> <action name="actionAutoShutdown_Disabled">
@ -415,7 +400,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Disabled</string> <string>&amp;Disabled</string>
</property> </property>
</action> </action>
<action name="actionToggleVisibility"> <action name="actionToggleVisibility">
@ -430,15 +415,15 @@
</action> </action>
<action name="actionStatistics"> <action name="actionStatistics">
<property name="text"> <property name="text">
<string>Statistics</string> <string>&amp;Statistics</string>
</property> </property>
</action> </action>
<action name="actionCheck_for_updates"> <action name="actionCheck_for_updates">
<property name="text"> <property name="text">
<string>Check for updates</string> <string>Check for Updates</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Check for program updates</string> <string>Check for Program Updates</string>
</property> </property>
</action> </action>
</widget> </widget>

Loading…
Cancel
Save