|
|
|
@ -62,42 +62,20 @@ class createtorrent;
@@ -62,42 +62,20 @@ class createtorrent;
|
|
|
|
|
class GUI : public QMainWindow, private Ui::MainWindow{ |
|
|
|
|
Q_OBJECT |
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
// Bittorrent
|
|
|
|
|
Bittorrent *BTSession; |
|
|
|
|
QList<QPair<QTorrentHandle,QString> > unauthenticated_trackers; // Still needed?
|
|
|
|
|
// GUI related
|
|
|
|
|
QTimer *guiUpdater; |
|
|
|
|
QTabWidget *tabs; |
|
|
|
|
StatusBar *status_bar; |
|
|
|
|
QPointer<options_imp> options; |
|
|
|
|
QPointer<consoleDlg> console; |
|
|
|
|
QPointer<about> aboutDlg; |
|
|
|
|
QPointer<createtorrent> createTorrentDlg; |
|
|
|
|
QPointer<QSystemTrayIcon> systrayIcon; |
|
|
|
|
QPointer<QTimer> systrayCreator; |
|
|
|
|
QMenu *myTrayIconMenu; |
|
|
|
|
TransferListWidget *transferList; |
|
|
|
|
TransferListFiltersWidget *transferListFilters; |
|
|
|
|
PropertiesWidget *properties; |
|
|
|
|
bool displaySpeedInTitle; |
|
|
|
|
bool force_exit; |
|
|
|
|
// Keyboard shortcuts
|
|
|
|
|
QShortcut *switchSearchShortcut; |
|
|
|
|
QShortcut *switchSearchShortcut2; |
|
|
|
|
QShortcut *switchTransferShortcut; |
|
|
|
|
QShortcut *switchRSSShortcut; |
|
|
|
|
// Widgets
|
|
|
|
|
QAction *prioSeparator; |
|
|
|
|
QAction *prioSeparator2; |
|
|
|
|
QSplitter *hSplitter; |
|
|
|
|
QSplitter *vSplitter; |
|
|
|
|
// Search
|
|
|
|
|
SearchEngine *searchEngine; |
|
|
|
|
// RSS
|
|
|
|
|
QPointer<RSSImp> rssWidget; |
|
|
|
|
// Misc
|
|
|
|
|
QLocalServer *localServer; |
|
|
|
|
public: |
|
|
|
|
// Construct / Destruct
|
|
|
|
|
GUI(QWidget *parent=0, QStringList torrentCmdLine=QStringList()); |
|
|
|
|
~GUI(); |
|
|
|
|
// Methods
|
|
|
|
|
int getCurrentTabIndex() const; |
|
|
|
|
TransferListWidget* getTransferList() const { return transferList; } |
|
|
|
|
|
|
|
|
|
public slots: |
|
|
|
|
void trackerAuthenticationRequired(QTorrentHandle& h); |
|
|
|
|
void setTabText(int index, QString text) const; |
|
|
|
|
void showNotificationBaloon(QString title, QString msg) const; |
|
|
|
|
void downloadFromURLList(const QStringList& urls); |
|
|
|
|
void updateAltSpeedsBtn(bool alternative); |
|
|
|
|
|
|
|
|
|
protected slots: |
|
|
|
|
// GUI related slots
|
|
|
|
@ -143,27 +121,48 @@ protected slots:
@@ -143,27 +121,48 @@ protected slots:
|
|
|
|
|
// HTTP slots
|
|
|
|
|
void on_actionDownload_from_URL_triggered(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public slots: |
|
|
|
|
void trackerAuthenticationRequired(QTorrentHandle& h); |
|
|
|
|
void setTabText(int index, QString text) const; |
|
|
|
|
void showNotificationBaloon(QString title, QString msg) const; |
|
|
|
|
void downloadFromURLList(const QStringList& urls); |
|
|
|
|
void updateAltSpeedsBtn(bool alternative); |
|
|
|
|
|
|
|
|
|
protected: |
|
|
|
|
void closeEvent(QCloseEvent *); |
|
|
|
|
void showEvent(QShowEvent *); |
|
|
|
|
bool event(QEvent * event); |
|
|
|
|
void displayRSSTab(bool enable); |
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
// Construct / Destruct
|
|
|
|
|
GUI(QWidget *parent=0, QStringList torrentCmdLine=QStringList()); |
|
|
|
|
~GUI(); |
|
|
|
|
// Methods
|
|
|
|
|
int getCurrentTabIndex() const; |
|
|
|
|
TransferListWidget* getTransferList() const { return transferList; } |
|
|
|
|
private: |
|
|
|
|
// Bittorrent
|
|
|
|
|
Bittorrent *BTSession; |
|
|
|
|
QList<QPair<QTorrentHandle,QString> > unauthenticated_trackers; // Still needed?
|
|
|
|
|
// GUI related
|
|
|
|
|
QTimer *guiUpdater; |
|
|
|
|
QTabWidget *tabs; |
|
|
|
|
StatusBar *status_bar; |
|
|
|
|
QPointer<options_imp> options; |
|
|
|
|
QPointer<consoleDlg> console; |
|
|
|
|
QPointer<about> aboutDlg; |
|
|
|
|
QPointer<createtorrent> createTorrentDlg; |
|
|
|
|
QPointer<QSystemTrayIcon> systrayIcon; |
|
|
|
|
QPointer<QTimer> systrayCreator; |
|
|
|
|
QMenu *myTrayIconMenu; |
|
|
|
|
TransferListWidget *transferList; |
|
|
|
|
TransferListFiltersWidget *transferListFilters; |
|
|
|
|
PropertiesWidget *properties; |
|
|
|
|
bool displaySpeedInTitle; |
|
|
|
|
bool force_exit; |
|
|
|
|
// Keyboard shortcuts
|
|
|
|
|
QShortcut *switchSearchShortcut; |
|
|
|
|
QShortcut *switchSearchShortcut2; |
|
|
|
|
QShortcut *switchTransferShortcut; |
|
|
|
|
QShortcut *switchRSSShortcut; |
|
|
|
|
// Widgets
|
|
|
|
|
QAction *prioSeparator; |
|
|
|
|
QAction *prioSeparator2; |
|
|
|
|
QSplitter *hSplitter; |
|
|
|
|
QSplitter *vSplitter; |
|
|
|
|
// Search
|
|
|
|
|
SearchEngine *searchEngine; |
|
|
|
|
// RSS
|
|
|
|
|
QPointer<RSSImp> rssWidget; |
|
|
|
|
// Misc
|
|
|
|
|
QLocalServer *localServer; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
#endif |
|
|
|
|