@ -59,104 +59,104 @@ class StatusBar;
class GUI : public QMainWindow , private Ui : : MainWindow {
class GUI : public QMainWindow , private Ui : : MainWindow {
Q_OBJECT
Q_OBJECT
private :
private :
// Bittorrent
// Bittorrent
Bittorrent * BTSession ;
Bittorrent * BTSession ;
QList < QPair < QTorrentHandle , QString > > unauthenticated_trackers ; // Still needed?
QList < QPair < QTorrentHandle , QString > > unauthenticated_trackers ; // Still needed?
// GUI related
// GUI related
QTimer * guiUpdater ;
QTimer * guiUpdater ;
QTabWidget * tabs ;
QTabWidget * tabs ;
StatusBar * status_bar ;
StatusBar * status_bar ;
QPointer < options_imp > options ;
QPointer < options_imp > options ;
QPointer < QSystemTrayIcon > systrayIcon ;
QPointer < QSystemTrayIcon > systrayIcon ;
QPointer < QTimer > systrayCreator ;
QPointer < QTimer > systrayCreator ;
QMenu * myTrayIconMenu ;
QMenu * myTrayIconMenu ;
TransferListWidget * transferList ;
TransferListWidget * transferList ;
TransferListFiltersWidget * transferListFilters ;
TransferListFiltersWidget * transferListFilters ;
PropertiesWidget * properties ;
PropertiesWidget * properties ;
bool displaySpeedInTitle ;
bool displaySpeedInTitle ;
bool force_exit ;
bool force_exit ;
// Keyboard shortcuts
// Keyboard shortcuts
QShortcut * switchSearchShortcut ;
QShortcut * switchSearchShortcut ;
QShortcut * switchSearchShortcut2 ;
QShortcut * switchSearchShortcut2 ;
QShortcut * switchTransferShortcut ;
QShortcut * switchTransferShortcut ;
QShortcut * switchRSSShortcut ;
QShortcut * switchRSSShortcut ;
// Widgets
// Widgets
QAction * prioSeparator ;
QAction * prioSeparator ;
QAction * prioSeparator2 ;
QAction * prioSeparator2 ;
QSplitter * hSplitter ;
QSplitter * hSplitter ;
QSplitter * vSplitter ;
QSplitter * vSplitter ;
// Search
// Search
SearchEngine * searchEngine ;
SearchEngine * searchEngine ;
// RSS
// RSS
QPointer < RSSImp > rssWidget ;
QPointer < RSSImp > rssWidget ;
// Misc
// Misc
QLocalServer * localServer ;
QLocalServer * localServer ;
protected slots :
protected slots :
// GUI related slots
// GUI related slots
void dropEvent ( QDropEvent * event ) ;
void dropEvent ( QDropEvent * event ) ;
void dragEnterEvent ( QDragEnterEvent * event ) ;
void dragEnterEvent ( QDragEnterEvent * event ) ;
void toggleVisibility ( QSystemTrayIcon : : ActivationReason e ) ;
void toggleVisibility ( QSystemTrayIcon : : ActivationReason e ) ;
void on_actionAbout_triggered ( ) ;
void on_actionAbout_triggered ( ) ;
void on_actionCreate_torrent_triggered ( ) ;
void on_actionCreate_torrent_triggered ( ) ;
void on_actionWebsite_triggered ( ) const ;
void on_actionWebsite_triggered ( ) const ;
void on_actionBugReport_triggered ( ) const ;
void on_actionBugReport_triggered ( ) const ;
void on_actionShow_console_triggered ( ) ;
void on_actionShow_console_triggered ( ) ;
void readParamsOnSocket ( ) ;
void readParamsOnSocket ( ) ;
void acceptConnection ( ) ;
void acceptConnection ( ) ;
void balloonClicked ( ) ;
void balloonClicked ( ) ;
void writeSettings ( ) ;
void writeSettings ( ) ;
void readSettings ( ) ;
void readSettings ( ) ;
void on_actionExit_triggered ( ) ;
void on_actionExit_triggered ( ) ;
void createTrayIcon ( ) ;
void createTrayIcon ( ) ;
void fullDiskError ( QTorrentHandle & h , QString msg ) const ;
void fullDiskError ( QTorrentHandle & h , QString msg ) const ;
void handleDownloadFromUrlFailure ( QString , QString ) const ;
void handleDownloadFromUrlFailure ( QString , QString ) const ;
void createSystrayDelayed ( ) ;
void createSystrayDelayed ( ) ;
void tab_changed ( int ) ;
void tab_changed ( int ) ;
// Keyboard shortcuts
// Keyboard shortcuts
void createKeyboardShortcuts ( ) ;
void createKeyboardShortcuts ( ) ;
void displayTransferTab ( ) const ;
void displayTransferTab ( ) const ;
void displaySearchTab ( ) const ;
void displaySearchTab ( ) const ;
void displayRSSTab ( ) const ;
void displayRSSTab ( ) const ;
// Torrent actions
// Torrent actions
void on_actionSet_global_upload_limit_triggered ( ) ;
void on_actionSet_global_upload_limit_triggered ( ) ;
void on_actionSet_global_download_limit_triggered ( ) ;
void on_actionSet_global_download_limit_triggered ( ) ;
void on_actionDocumentation_triggered ( ) const ;
void on_actionDocumentation_triggered ( ) const ;
void on_actionOpen_triggered ( ) ;
void on_actionOpen_triggered ( ) ;
void updateGUI ( ) ;
void updateGUI ( ) ;
void loadPreferences ( bool configure_session = true ) ;
void loadPreferences ( bool configure_session = true ) ;
void processParams ( const QStringList & params ) ;
void processParams ( const QStringList & params ) ;
void addTorrent ( QString path ) ;
void addTorrent ( QString path ) ;
void addUnauthenticatedTracker ( QPair < QTorrentHandle , QString > tracker ) ;
void addUnauthenticatedTracker ( QPair < QTorrentHandle , QString > tracker ) ;
void processDownloadedFiles ( QString path , QString url ) ;
void processDownloadedFiles ( QString path , QString url ) ;
void downloadFromURLList ( const QStringList & urls ) ;
void finishedTorrent ( QTorrentHandle & h ) const ;
void finishedTorrent ( QTorrentHandle & h ) const ;
// Options slots
// Options slots
void on_actionOptions_triggered ( ) ;
void on_actionOptions_triggered ( ) ;
void optionsSaved ( ) ;
void optionsSaved ( ) ;
// HTTP slots
// HTTP slots
void on_actionDownload_from_URL_triggered ( ) ;
void on_actionDownload_from_URL_triggered ( ) ;
public slots :
public slots :
void trackerAuthenticationRequired ( QTorrentHandle & h ) ;
void trackerAuthenticationRequired ( QTorrentHandle & h ) ;
void setTabText ( int index , QString text ) const ;
void setTabText ( int index , QString text ) const ;
void showNotificationBaloon ( QString title , QString msg ) const ;
void showNotificationBaloon ( QString title , QString msg ) const ;
void downloadFromURLList ( const QStringList & urls ) ;
protected :
protected :
void closeEvent ( QCloseEvent * ) ;
void closeEvent ( QCloseEvent * ) ;
void showEvent ( QShowEvent * ) ;
void showEvent ( QShowEvent * ) ;
bool event ( QEvent * event ) ;
bool event ( QEvent * event ) ;
void displayRSSTab ( bool enable ) ;
void displayRSSTab ( bool enable ) ;
public :
public :
// Construct / Destruct
// Construct / Destruct
GUI ( QWidget * parent = 0 , QStringList torrentCmdLine = QStringList ( ) ) ;
GUI ( QWidget * parent = 0 , QStringList torrentCmdLine = QStringList ( ) ) ;
~ GUI ( ) ;
~ GUI ( ) ;
// Methods
// Methods
int getCurrentTabIndex ( ) const ;
int getCurrentTabIndex ( ) const ;
QPoint screenCenter ( ) const ;
QPoint screenCenter ( ) const ;
} ;
} ;
# endif
# endif