mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 21:14:33 +00:00
Fix MainWindow coding style (Issue #2192)
This commit is contained in:
parent
a6595507f0
commit
1760beed17
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Bittorrent Client using Qt4 and libtorrent.
|
* Bittorrent Client using Qt and libtorrent.
|
||||||
* Copyright (C) 2006 Christophe Dumez
|
* Copyright (C) 2006 Christophe Dumez
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
@ -28,14 +28,19 @@
|
|||||||
* Contact : chris@qbittorrent.org
|
* Contact : chris@qbittorrent.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GUI_H
|
#ifndef MAINWINDOW_H
|
||||||
#define GUI_H
|
#define MAINWINDOW_H
|
||||||
|
|
||||||
#include <QProcess>
|
#include <QMainWindow>
|
||||||
#include <QSystemTrayIcon>
|
#include <QSystemTrayIcon>
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
#include "ui_mainwindow.h"
|
|
||||||
#include "statsdialog.h"
|
class QCloseEvent;
|
||||||
|
class QFileSystemWatcher;
|
||||||
|
class QShortcut;
|
||||||
|
class QSplitter;
|
||||||
|
class QTabWidget;
|
||||||
|
class QTimer;
|
||||||
|
|
||||||
class downloadFromURL;
|
class downloadFromURL;
|
||||||
class SearchWidget;
|
class SearchWidget;
|
||||||
@ -52,34 +57,30 @@ class downloadFromURL;
|
|||||||
class LineEdit;
|
class LineEdit;
|
||||||
class ExecutionLog;
|
class ExecutionLog;
|
||||||
class PowerManagement;
|
class PowerManagement;
|
||||||
|
class StatsDialog;
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
class QCloseEvent;
|
|
||||||
class QFileSystemWatcher;
|
|
||||||
class QShortcut;
|
|
||||||
class QSplitter;
|
|
||||||
class QTabWidget;
|
|
||||||
class QTimer;
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
namespace BitTorrent
|
namespace BitTorrent
|
||||||
{
|
{
|
||||||
class TorrentHandle;
|
class TorrentHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
class MainWindow: public QMainWindow, private Ui::MainWindow
|
namespace Ui
|
||||||
|
{
|
||||||
|
class MainWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
class MainWindow : public QMainWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Construct / Destruct
|
|
||||||
explicit MainWindow(QWidget *parent = 0);
|
explicit MainWindow(QWidget *parent = 0);
|
||||||
~MainWindow();
|
~MainWindow() override;
|
||||||
// Methods
|
|
||||||
QWidget* getCurrentTabWidget() const;
|
QWidget* currentTabWidget() const;
|
||||||
TransferListWidget* getTransferList() const { return transferList; }
|
TransferListWidget* transferListWidget() const;
|
||||||
QMenu* getTrayIconMenu();
|
PropertiesWidget *propertiesWidget() const;
|
||||||
PropertiesWidget *getProperties() const { return properties; }
|
QMenu* trayIconMenu();
|
||||||
|
|
||||||
// ExecutionLog properties
|
// ExecutionLog properties
|
||||||
bool isExecutionLogEnabled() const;
|
bool isExecutionLogEnabled() const;
|
||||||
@ -87,32 +88,22 @@ public:
|
|||||||
int executionLogMsgTypes() const;
|
int executionLogMsgTypes() const;
|
||||||
void setExecutionLogMsgTypes(const int value);
|
void setExecutionLogMsgTypes(const int value);
|
||||||
|
|
||||||
public slots:
|
|
||||||
void trackerAuthenticationRequired(BitTorrent::TorrentHandle *const torrent);
|
|
||||||
void setTabText(int index, QString text) const;
|
|
||||||
void showNotificationBaloon(QString title, QString msg) const;
|
|
||||||
void downloadFromURLList(const QStringList& urls);
|
|
||||||
void updateAltSpeedsBtn(bool alternative);
|
|
||||||
void updateNbTorrents();
|
|
||||||
void activate();
|
void activate();
|
||||||
void cleanup();
|
void cleanup();
|
||||||
|
|
||||||
protected slots:
|
void showNotificationBaloon(QString title, QString msg) const;
|
||||||
// GUI related slots
|
|
||||||
|
private slots:
|
||||||
void toggleVisibility(QSystemTrayIcon::ActivationReason e = QSystemTrayIcon::Trigger);
|
void toggleVisibility(QSystemTrayIcon::ActivationReason e = QSystemTrayIcon::Trigger);
|
||||||
void on_actionAbout_triggered();
|
|
||||||
void on_actionStatistics_triggered();
|
|
||||||
void on_actionCreate_torrent_triggered();
|
|
||||||
void balloonClicked();
|
void balloonClicked();
|
||||||
void writeSettings();
|
void writeSettings();
|
||||||
void readSettings();
|
void readSettings();
|
||||||
void on_actionExit_triggered();
|
|
||||||
void createTrayIcon();
|
void createTrayIcon();
|
||||||
void fullDiskError(BitTorrent::TorrentHandle *const torrent, QString msg) const;
|
void fullDiskError(BitTorrent::TorrentHandle *const torrent, QString msg) const;
|
||||||
void handleDownloadFromUrlFailure(QString, QString) const;
|
void handleDownloadFromUrlFailure(QString, QString) const;
|
||||||
void createSystrayDelayed();
|
void createSystrayDelayed();
|
||||||
void tab_changed(int);
|
void tabChanged(int newTab);
|
||||||
void on_actionLock_qBittorrent_triggered();
|
|
||||||
void defineUILockPassword();
|
void defineUILockPassword();
|
||||||
void clearUILockPassword();
|
void clearUILockPassword();
|
||||||
bool unlockUI();
|
bool unlockUI();
|
||||||
@ -125,37 +116,18 @@ protected slots:
|
|||||||
void displayTransferTab() const;
|
void displayTransferTab() const;
|
||||||
void displaySearchTab() const;
|
void displaySearchTab() const;
|
||||||
void displayRSSTab() const;
|
void displayRSSTab() const;
|
||||||
// Torrent actions
|
|
||||||
void on_actionSet_global_upload_limit_triggered();
|
|
||||||
void on_actionSet_global_download_limit_triggered();
|
|
||||||
void on_actionDocumentation_triggered() const;
|
|
||||||
void on_actionOpen_triggered();
|
|
||||||
void updateGUI();
|
void updateGUI();
|
||||||
void loadPreferences(bool configure_session = true);
|
void loadPreferences(bool configureSession = true);
|
||||||
void addUnauthenticatedTracker(const QPair<BitTorrent::TorrentHandle*, QString> &tracker);
|
void addUnauthenticatedTracker(const QPair<BitTorrent::TorrentHandle*, QString> &tracker);
|
||||||
void addTorrentFailed(const QString &error) const;
|
void addTorrentFailed(const QString &error) const;
|
||||||
void finishedTorrent(BitTorrent::TorrentHandle *const torrent) const;
|
void finishedTorrent(BitTorrent::TorrentHandle *const torrent) const;
|
||||||
void askRecursiveTorrentDownloadConfirmation(BitTorrent::TorrentHandle *const torrent);
|
void askRecursiveTorrentDownloadConfirmation(BitTorrent::TorrentHandle *const torrent);
|
||||||
// Options slots
|
|
||||||
void on_actionOptions_triggered();
|
|
||||||
void optionsSaved();
|
void optionsSaved();
|
||||||
// HTTP slots
|
|
||||||
void on_actionDownload_from_URL_triggered();
|
|
||||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||||
void handleUpdateCheckFinished(bool update_available, QString new_version, bool invokedByUser);
|
void handleUpdateCheckFinished(bool updateAvailable, QString newVersion, bool invokedByUser);
|
||||||
#endif
|
#endif
|
||||||
void updateRSSTabLabel(int count);
|
void updateRSSTabLabel(int count);
|
||||||
|
|
||||||
protected:
|
|
||||||
void dropEvent(QDropEvent *event);
|
|
||||||
void dragEnterEvent(QDragEnterEvent *event);
|
|
||||||
void closeEvent(QCloseEvent *);
|
|
||||||
void showEvent(QShowEvent *);
|
|
||||||
bool event(QEvent * event);
|
|
||||||
void displayRSSTab(bool enable);
|
|
||||||
void displaySearchTab(bool enable);
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
void pythonDownloadSuccess(const QString &url, const QString &filePath);
|
void pythonDownloadSuccess(const QString &url, const QString &filePath);
|
||||||
void pythonDownloadFailure(const QString &url, const QString &error);
|
void pythonDownloadFailure(const QString &url, const QString &error);
|
||||||
@ -163,74 +135,37 @@ private slots:
|
|||||||
void addToolbarContextMenu();
|
void addToolbarContextMenu();
|
||||||
void manageCookies();
|
void manageCookies();
|
||||||
|
|
||||||
private:
|
void trackerAuthenticationRequired(BitTorrent::TorrentHandle *const torrent);
|
||||||
QIcon getSystrayIcon() const;
|
void downloadFromURLList(const QStringList &urlList);
|
||||||
#ifdef Q_OS_WIN
|
void updateAltSpeedsBtn(bool alternative);
|
||||||
bool addPythonPathToEnv();
|
void updateNbTorrents();
|
||||||
void installPython();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QFileSystemWatcher *executable_watcher;
|
void on_actionSearchWidget_triggered();
|
||||||
// Bittorrent
|
void on_actionRSSReader_triggered();
|
||||||
QList<QPair<BitTorrent::TorrentHandle*, QString>> unauthenticated_trackers; // Still needed?
|
void on_actionSpeedInTitleBar_triggered();
|
||||||
// GUI related
|
void on_actionTopToolBar_triggered();
|
||||||
bool m_posInitialized;
|
void on_actionImportTorrent_triggered();
|
||||||
QTabWidget *tabs;
|
void on_actionDonateMoney_triggered();
|
||||||
StatusBar *status_bar;
|
|
||||||
QPointer<options_imp> options;
|
|
||||||
QPointer<about> aboutDlg;
|
|
||||||
QPointer<StatsDialog> statsDlg;
|
|
||||||
QPointer<TorrentCreatorDlg> createTorrentDlg;
|
|
||||||
QPointer<downloadFromURL> downloadFromURLDialog;
|
|
||||||
QPointer<QSystemTrayIcon> systrayIcon;
|
|
||||||
QPointer<QTimer> systrayCreator;
|
|
||||||
QPointer<QMenu> myTrayIconMenu;
|
|
||||||
TransferListWidget *transferList;
|
|
||||||
TransferListFiltersWidget *transferListFilters;
|
|
||||||
PropertiesWidget *properties;
|
|
||||||
bool displaySpeedInTitle;
|
|
||||||
bool force_exit;
|
|
||||||
bool ui_locked;
|
|
||||||
bool unlockDlgShowing;
|
|
||||||
LineEdit *search_filter;
|
|
||||||
QAction *searchFilterAct;
|
|
||||||
// Widgets
|
|
||||||
QAction *prioSeparator;
|
|
||||||
QAction *prioSeparatorMenu;
|
|
||||||
QSplitter *hSplitter;
|
|
||||||
QSplitter *vSplitter;
|
|
||||||
// Search
|
|
||||||
QPointer<SearchWidget> searchEngine;
|
|
||||||
// RSS
|
|
||||||
QPointer<RSSImp> rssWidget;
|
|
||||||
// Execution Log
|
|
||||||
QPointer<ExecutionLog> m_executionLog;
|
|
||||||
// Power Management
|
|
||||||
PowerManagement *m_pwr;
|
|
||||||
QTimer *preventTimer;
|
|
||||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
|
||||||
QTimer programUpdateTimer;
|
|
||||||
bool m_wasUpdateCheckEnabled;
|
|
||||||
#endif
|
|
||||||
bool has_python;
|
|
||||||
QMenu* toolbarMenu;
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void on_actionSearch_engine_triggered();
|
|
||||||
void on_actionRSS_Reader_triggered();
|
|
||||||
void on_actionSpeed_in_title_bar_triggered();
|
|
||||||
void on_actionTop_tool_bar_triggered();
|
|
||||||
void on_action_Import_Torrent_triggered();
|
|
||||||
void on_actionDonate_money_triggered();
|
|
||||||
void on_actionExecutionLogs_triggered(bool checked);
|
void on_actionExecutionLogs_triggered(bool checked);
|
||||||
void on_actionNormalMessages_triggered(bool checked);
|
void on_actionNormalMessages_triggered(bool checked);
|
||||||
void on_actionInformationMessages_triggered(bool checked);
|
void on_actionInformationMessages_triggered(bool checked);
|
||||||
void on_actionWarningMessages_triggered(bool checked);
|
void on_actionWarningMessages_triggered(bool checked);
|
||||||
void on_actionCriticalMessages_triggered(bool checked);
|
void on_actionCriticalMessages_triggered(bool checked);
|
||||||
void on_actionAutoExit_qBittorrent_toggled(bool );
|
void on_actionAutoExit_toggled(bool);
|
||||||
void on_actionAutoSuspend_system_toggled(bool );
|
void on_actionAutoSuspend_toggled(bool);
|
||||||
void on_actionAutoHibernate_system_toggled(bool );
|
void on_actionAutoHibernate_toggled(bool);
|
||||||
void on_actionAutoShutdown_system_toggled(bool );
|
void on_actionAutoShutdown_toggled(bool);
|
||||||
|
void on_actionAbout_triggered();
|
||||||
|
void on_actionStatistics_triggered();
|
||||||
|
void on_actionCreateTorrent_triggered();
|
||||||
|
void on_actionOptions_triggered();
|
||||||
|
void on_actionSetGlobalUploadLimit_triggered();
|
||||||
|
void on_actionSetGlobalDownloadLimit_triggered();
|
||||||
|
void on_actionDocumentation_triggered() const;
|
||||||
|
void on_actionOpen_triggered();
|
||||||
|
void on_actionDownloadFromURL_triggered();
|
||||||
|
void on_actionExit_triggered();
|
||||||
|
void on_actionLock_triggered();
|
||||||
// Check for active torrents and set preventing from suspend state
|
// Check for active torrents and set preventing from suspend state
|
||||||
void checkForActiveTorrents();
|
void checkForActiveTorrents();
|
||||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||||
@ -242,6 +177,64 @@ private slots:
|
|||||||
void toolbarTextBeside();
|
void toolbarTextBeside();
|
||||||
void toolbarTextUnder();
|
void toolbarTextUnder();
|
||||||
void toolbarFollowSystem();
|
void toolbarFollowSystem();
|
||||||
|
|
||||||
|
private:
|
||||||
|
QIcon getSystrayIcon() const;
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
bool addPythonPathToEnv();
|
||||||
|
void installPython();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void dropEvent(QDropEvent *event) override;
|
||||||
|
void dragEnterEvent(QDragEnterEvent *event) override;
|
||||||
|
void closeEvent(QCloseEvent *) override;
|
||||||
|
void showEvent(QShowEvent *) override;
|
||||||
|
bool event(QEvent * event) override;
|
||||||
|
void displayRSSTab(bool enable);
|
||||||
|
void displaySearchTab(bool enable);
|
||||||
|
|
||||||
|
Ui::MainWindow *m_ui;
|
||||||
|
|
||||||
|
QFileSystemWatcher *m_executableWatcher;
|
||||||
|
// Bittorrent
|
||||||
|
QList<QPair<BitTorrent::TorrentHandle*, QString>> m_unauthenticatedTrackers; // Still needed?
|
||||||
|
// GUI related
|
||||||
|
bool m_posInitialized;
|
||||||
|
QTabWidget *m_tabs;
|
||||||
|
StatusBar *m_statusBar;
|
||||||
|
QPointer<options_imp> m_options;
|
||||||
|
QPointer<about> m_aboutDlg;
|
||||||
|
QPointer<StatsDialog> m_statsDlg;
|
||||||
|
QPointer<TorrentCreatorDlg> m_createTorrentDlg;
|
||||||
|
QPointer<downloadFromURL> m_downloadFromURLDialog;
|
||||||
|
QPointer<QSystemTrayIcon> m_systrayIcon;
|
||||||
|
QPointer<QTimer> m_systrayCreator;
|
||||||
|
QPointer<QMenu> m_trayIconMenu;
|
||||||
|
TransferListWidget *m_transferListWidget;
|
||||||
|
TransferListFiltersWidget *m_transferListFiltersWidget;
|
||||||
|
PropertiesWidget *m_propertiesWidget;
|
||||||
|
bool m_displaySpeedInTitle;
|
||||||
|
bool m_forceExit;
|
||||||
|
bool m_uiLocked;
|
||||||
|
bool m_unlockDlgShowing;
|
||||||
|
LineEdit *m_searchFilter;
|
||||||
|
QAction *m_searchFilterAction;
|
||||||
|
// Widgets
|
||||||
|
QAction *m_prioSeparator;
|
||||||
|
QAction *m_prioSeparatorMenu;
|
||||||
|
QSplitter *m_splitter;
|
||||||
|
QPointer<SearchWidget> m_searchWidget;
|
||||||
|
QPointer<RSSImp> m_rssWidget;
|
||||||
|
QPointer<ExecutionLog> m_executionLog;
|
||||||
|
// Power Management
|
||||||
|
PowerManagement *m_pwr;
|
||||||
|
QTimer *m_preventTimer;
|
||||||
|
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||||
|
QTimer *m_programUpdateTimer;
|
||||||
|
bool m_wasUpdateCheckEnabled;
|
||||||
|
#endif
|
||||||
|
bool m_hasPython;
|
||||||
|
QMenu *m_toolbarMenu;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif // MAINWINDOW_H
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
<height>21</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menu_Edit">
|
<widget class="QMenu" name="menuEdit">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>&Edit</string>
|
<string>&Edit</string>
|
||||||
</property>
|
</property>
|
||||||
@ -51,44 +51,44 @@
|
|||||||
<addaction name="actionDecreasePriority"/>
|
<addaction name="actionDecreasePriority"/>
|
||||||
<addaction name="actionBottomPriority"/>
|
<addaction name="actionBottomPriority"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menu_Help">
|
<widget class="QMenu" name="menuHelp">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>&Help</string>
|
<string>&Help</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionDocumentation"/>
|
<addaction name="actionDocumentation"/>
|
||||||
<addaction name="actionCheck_for_updates"/>
|
<addaction name="actionCheckForUpdates"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionDonate_money"/>
|
<addaction name="actionDonateMoney"/>
|
||||||
<addaction name="actionAbout"/>
|
<addaction name="actionAbout"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menu_Options">
|
<widget class="QMenu" name="menuOptions">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>&Tools</string>
|
<string>&Tools</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuAuto_Shutdown_on_downloads_completion">
|
<widget class="QMenu" name="menuAutoShutdownOnDownloadsCompletion">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>On Downloads &Done</string>
|
<string>On Downloads &Done</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionAutoShutdown_Disabled"/>
|
<addaction name="actionAutoShutdownDisabled"/>
|
||||||
<addaction name="actionAutoExit_qBittorrent"/>
|
<addaction name="actionAutoExit"/>
|
||||||
<addaction name="actionAutoSuspend_system"/>
|
<addaction name="actionAutoSuspend"/>
|
||||||
<addaction name="actionAutoHibernate_system"/>
|
<addaction name="actionAutoHibernate"/>
|
||||||
<addaction name="actionAutoShutdown_system"/>
|
<addaction name="actionAutoShutdown"/>
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="actionCreate_torrent"/>
|
<addaction name="actionCreateTorrent"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionManageCookies"/>
|
<addaction name="actionManageCookies"/>
|
||||||
<addaction name="actionOptions"/>
|
<addaction name="actionOptions"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="menuAuto_Shutdown_on_downloads_completion"/>
|
<addaction name="menuAutoShutdownOnDownloadsCompletion"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menu_File">
|
<widget class="QMenu" name="menuFile">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>&File</string>
|
<string>&File</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionOpen"/>
|
<addaction name="actionOpen"/>
|
||||||
<addaction name="actionDownload_from_URL"/>
|
<addaction name="actionDownloadFromURL"/>
|
||||||
<addaction name="action_Import_Torrent"/>
|
<addaction name="actionImportTorrent"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionExit"/>
|
<addaction name="actionExit"/>
|
||||||
</widget>
|
</widget>
|
||||||
@ -107,22 +107,25 @@
|
|||||||
<addaction name="actionWarningMessages"/>
|
<addaction name="actionWarningMessages"/>
|
||||||
<addaction name="actionCriticalMessages"/>
|
<addaction name="actionCriticalMessages"/>
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="actionTop_tool_bar"/>
|
|
||||||
<addaction name="actionSpeed_in_title_bar"/>
|
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionSearch_engine"/>
|
<addaction name="actionSearch_engine"/>
|
||||||
<addaction name="actionRSS_Reader"/>
|
<addaction name="actionRSS_Reader"/>
|
||||||
<addaction name="menuLog"/>
|
<addaction name="menuLog"/>
|
||||||
|
<addaction name="actionTopToolBar"/>
|
||||||
|
<addaction name="actionSpeedInTitleBar"/>
|
||||||
|
<addaction name="separator"/>
|
||||||
|
<addaction name="actionSearchWidget"/>
|
||||||
|
<addaction name="actionRSSReader"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionStatistics"/>
|
<addaction name="actionStatistics"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionLock_qBittorrent"/>
|
<addaction name="actionLock"/>
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="menu_File"/>
|
<addaction name="menuFile"/>
|
||||||
<addaction name="menu_Edit"/>
|
<addaction name="menuEdit"/>
|
||||||
<addaction name="menuView"/>
|
<addaction name="menuView"/>
|
||||||
<addaction name="menu_Options"/>
|
<addaction name="menuOptions"/>
|
||||||
<addaction name="menu_Help"/>
|
<addaction name="menuHelp"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QToolBar" name="toolBar">
|
<widget class="QToolBar" name="toolBar">
|
||||||
<property name="movable">
|
<property name="movable">
|
||||||
@ -143,7 +146,7 @@
|
|||||||
<attribute name="toolBarBreak">
|
<attribute name="toolBarBreak">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
<addaction name="actionDownload_from_URL"/>
|
<addaction name="actionDownloadFromURL"/>
|
||||||
<addaction name="actionOpen"/>
|
<addaction name="actionOpen"/>
|
||||||
<addaction name="actionDelete"/>
|
<addaction name="actionDelete"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
@ -155,7 +158,7 @@
|
|||||||
<addaction name="actionBottomPriority"/>
|
<addaction name="actionBottomPriority"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionOptions"/>
|
<addaction name="actionOptions"/>
|
||||||
<addaction name="actionLock_qBittorrent"/>
|
<addaction name="actionLock"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusBar"/>
|
<widget class="QStatusBar" name="statusBar"/>
|
||||||
<action name="actionOpen">
|
<action name="actionOpen">
|
||||||
@ -196,7 +199,7 @@
|
|||||||
<string>&Delete</string>
|
<string>&Delete</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionDownload_from_URL">
|
<action name="actionDownloadFromURL">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Add Torrent &Link...</string>
|
<string>Add Torrent &Link...</string>
|
||||||
</property>
|
</property>
|
||||||
@ -204,17 +207,17 @@
|
|||||||
<string>Open URL</string>
|
<string>Open URL</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionCreate_torrent">
|
<action name="actionCreateTorrent">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Torrent &Creator</string>
|
<string>Torrent &Creator</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionSet_upload_limit">
|
<action name="actionSetUploadLimit">
|
||||||
<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="actionSetDownloadLimit">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Set Download Limit...</string>
|
<string>Set Download Limit...</string>
|
||||||
</property>
|
</property>
|
||||||
@ -224,12 +227,12 @@
|
|||||||
<string>&Documentation</string>
|
<string>&Documentation</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionSet_global_download_limit">
|
<action name="actionSetGlobalDownloadLimit">
|
||||||
<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="actionSetGlobalUploadLimit">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Set Global Upload Limit...</string>
|
<string>Set Global Upload Limit...</string>
|
||||||
</property>
|
</property>
|
||||||
@ -266,7 +269,7 @@
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionUse_alternative_speed_limits">
|
<action name="actionUseAlternativeSpeedLimits">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -277,7 +280,7 @@
|
|||||||
<string>Alternative Speed Limits</string>
|
<string>Alternative Speed Limits</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionTop_tool_bar">
|
<action name="actionTopToolBar">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -288,7 +291,7 @@
|
|||||||
<string>Display Top Toolbar</string>
|
<string>Display Top Toolbar</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionSpeed_in_title_bar">
|
<action name="actionSpeedInTitleBar">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -299,7 +302,7 @@
|
|||||||
<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="actionRSSReader">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -307,7 +310,7 @@
|
|||||||
<string>&RSS Reader</string>
|
<string>&RSS Reader</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionSearch_engine">
|
<action name="actionSearchWidget">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -315,7 +318,7 @@
|
|||||||
<string>Search &Engine</string>
|
<string>Search &Engine</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionLock_qBittorrent">
|
<action name="actionLock">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>L&ock qBittorrent</string>
|
<string>L&ock qBittorrent</string>
|
||||||
</property>
|
</property>
|
||||||
@ -326,7 +329,7 @@
|
|||||||
<string notr="true">Ctrl+L</string>
|
<string notr="true">Ctrl+L</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="action_Import_Torrent">
|
<action name="actionImportTorrent">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Import Existing Torrent...</string>
|
<string>&Import Existing Torrent...</string>
|
||||||
</property>
|
</property>
|
||||||
@ -334,7 +337,7 @@
|
|||||||
<string>Import Torrent...</string>
|
<string>Import Torrent...</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionDonate_money">
|
<action name="actionDonateMoney">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Do&nate!</string>
|
<string>Do&nate!</string>
|
||||||
</property>
|
</property>
|
||||||
@ -342,17 +345,28 @@
|
|||||||
<string>If you like qBittorrent, please donate!</string>
|
<string>If you like qBittorrent, please donate!</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionStart_All">
|
<action name="actionStartAll">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>R&esume All</string>
|
<string>R&esume All</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionPause_All">
|
<action name="actionPauseAll">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>P&ause All</string>
|
<string>P&ause All</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionAutoExit_qBittorrent">
|
<action name="actionExecutionLogs">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>&Log</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Execution Log</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionAutoExit">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -360,7 +374,7 @@
|
|||||||
<string>&Exit qBittorrent</string>
|
<string>&Exit qBittorrent</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionAutoSuspend_system">
|
<action name="actionAutoSuspend">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -368,7 +382,7 @@
|
|||||||
<string>&Suspend System</string>
|
<string>&Suspend System</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionAutoHibernate_system">
|
<action name="actionAutoHibernate">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -376,7 +390,7 @@
|
|||||||
<string>&Hibernate System</string>
|
<string>&Hibernate System</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionAutoShutdown_system">
|
<action name="actionAutoShutdown">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -384,7 +398,7 @@
|
|||||||
<string>S&hutdown System</string>
|
<string>S&hutdown System</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionAutoShutdown_Disabled">
|
<action name="actionAutoShutdownDisabled">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -407,7 +421,7 @@
|
|||||||
<string>&Statistics</string>
|
<string>&Statistics</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionCheck_for_updates">
|
<action name="actionCheckForUpdates">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Check for Updates</string>
|
<string>Check for Updates</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -373,7 +373,7 @@ void PropertiesWidget::reloadPreferences() {
|
|||||||
|
|
||||||
void PropertiesWidget::loadDynamicData() {
|
void PropertiesWidget::loadDynamicData() {
|
||||||
// Refresh only if the torrent handle is valid and if visible
|
// Refresh only if the torrent handle is valid and if visible
|
||||||
if (!m_torrent || (main_window->getCurrentTabWidget() != transferList) || (state != VISIBLE)) return;
|
if (!m_torrent || (main_window->currentTabWidget() != transferList) || (state != VISIBLE)) return;
|
||||||
|
|
||||||
// Transfer infos
|
// Transfer infos
|
||||||
switch(stackedProperties->currentIndex()) {
|
switch(stackedProperties->currentIndex()) {
|
||||||
|
@ -301,7 +301,7 @@ void SearchWidget::searchStarted()
|
|||||||
// Error | Stopped by user | Finished normally
|
// Error | Stopped by user | Finished normally
|
||||||
void SearchWidget::searchFinished(bool cancelled)
|
void SearchWidget::searchFinished(bool cancelled)
|
||||||
{
|
{
|
||||||
if (Preferences::instance()->useProgramNotification() && (m_mainWindow->getCurrentTabWidget() != this))
|
if (Preferences::instance()->useProgramNotification() && (m_mainWindow->currentTabWidget() != this))
|
||||||
m_mainWindow->showNotificationBaloon(tr("Search Engine"), tr("Search has finished"));
|
m_mainWindow->showNotificationBaloon(tr("Search Engine"), tr("Search has finished"));
|
||||||
|
|
||||||
if (m_activeSearchTab.isNull()) return; // The active tab was closed
|
if (m_activeSearchTab.isNull()) return; // The active tab was closed
|
||||||
@ -319,7 +319,7 @@ void SearchWidget::searchFinished(bool cancelled)
|
|||||||
|
|
||||||
void SearchWidget::searchFailed()
|
void SearchWidget::searchFailed()
|
||||||
{
|
{
|
||||||
if (Preferences::instance()->useProgramNotification() && (m_mainWindow->getCurrentTabWidget() != this))
|
if (Preferences::instance()->useProgramNotification() && (m_mainWindow->currentTabWidget() != this))
|
||||||
m_mainWindow->showNotificationBaloon(tr("Search Engine"), tr("Search has failed"));
|
m_mainWindow->showNotificationBaloon(tr("Search Engine"), tr("Search has failed"));
|
||||||
|
|
||||||
if (m_activeSearchTab.isNull()) return; // The active tab was closed
|
if (m_activeSearchTab.isNull()) return; // The active tab was closed
|
||||||
|
@ -311,7 +311,7 @@ void TransferListWidget::pauseVisibleTorrents()
|
|||||||
|
|
||||||
void TransferListWidget::deleteSelectedTorrents()
|
void TransferListWidget::deleteSelectedTorrents()
|
||||||
{
|
{
|
||||||
if (main_window->getCurrentTabWidget() != this) return;
|
if (main_window->currentTabWidget() != this) return;
|
||||||
|
|
||||||
const QList<BitTorrent::TorrentHandle *> torrents = getSelectedTorrents();
|
const QList<BitTorrent::TorrentHandle *> torrents = getSelectedTorrents();
|
||||||
if (torrents.empty()) return;
|
if (torrents.empty()) return;
|
||||||
@ -343,26 +343,26 @@ void TransferListWidget::deleteVisibleTorrents()
|
|||||||
void TransferListWidget::increasePrioSelectedTorrents()
|
void TransferListWidget::increasePrioSelectedTorrents()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
qDebug() << Q_FUNC_INFO;
|
||||||
if (main_window->getCurrentTabWidget() == this)
|
if (main_window->currentTabWidget() == this)
|
||||||
BitTorrent::Session::instance()->increaseTorrentsPriority(extractHashes(getSelectedTorrents()));
|
BitTorrent::Session::instance()->increaseTorrentsPriority(extractHashes(getSelectedTorrents()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransferListWidget::decreasePrioSelectedTorrents()
|
void TransferListWidget::decreasePrioSelectedTorrents()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
qDebug() << Q_FUNC_INFO;
|
||||||
if (main_window->getCurrentTabWidget() == this)
|
if (main_window->currentTabWidget() == this)
|
||||||
BitTorrent::Session::instance()->decreaseTorrentsPriority(extractHashes(getSelectedTorrents()));
|
BitTorrent::Session::instance()->decreaseTorrentsPriority(extractHashes(getSelectedTorrents()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransferListWidget::topPrioSelectedTorrents()
|
void TransferListWidget::topPrioSelectedTorrents()
|
||||||
{
|
{
|
||||||
if (main_window->getCurrentTabWidget() == this)
|
if (main_window->currentTabWidget() == this)
|
||||||
BitTorrent::Session::instance()->topTorrentsPriority(extractHashes(getSelectedTorrents()));
|
BitTorrent::Session::instance()->topTorrentsPriority(extractHashes(getSelectedTorrents()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransferListWidget::bottomPrioSelectedTorrents()
|
void TransferListWidget::bottomPrioSelectedTorrents()
|
||||||
{
|
{
|
||||||
if (main_window->getCurrentTabWidget() == this)
|
if (main_window->currentTabWidget() == this)
|
||||||
BitTorrent::Session::instance()->bottomTorrentsPriority(extractHashes(getSelectedTorrents()));
|
BitTorrent::Session::instance()->bottomTorrentsPriority(extractHashes(getSelectedTorrents()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user