|
|
@ -54,12 +54,14 @@ |
|
|
|
GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){ |
|
|
|
GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){ |
|
|
|
setupUi(this); |
|
|
|
setupUi(this); |
|
|
|
setWindowTitle(tr("qBittorrent %1", "e.g: qBittorrent v0.x").arg(VERSION)); |
|
|
|
setWindowTitle(tr("qBittorrent %1", "e.g: qBittorrent v0.x").arg(VERSION)); |
|
|
|
|
|
|
|
QSettings settings("qBittorrent", "qBittorrent"); |
|
|
|
|
|
|
|
systrayIntegration = settings.value("Options/Misc/Behaviour/SystrayIntegration", true).toBool(); |
|
|
|
// Finished torrents tab
|
|
|
|
// Finished torrents tab
|
|
|
|
finishedTorrentTab = new FinishedTorrents(this, &BTSession); |
|
|
|
finishedTorrentTab = new FinishedTorrents(this, &BTSession); |
|
|
|
tabs->addTab(finishedTorrentTab, tr("Finished")); |
|
|
|
tabs->addTab(finishedTorrentTab, tr("Finished")); |
|
|
|
tabs->setTabIcon(1, QIcon(QString::fromUtf8(":/Icons/skin/seeding.png"))); |
|
|
|
tabs->setTabIcon(1, QIcon(QString::fromUtf8(":/Icons/skin/seeding.png"))); |
|
|
|
// Search engine tab
|
|
|
|
// Search engine tab
|
|
|
|
searchEngine = new SearchEngine(&BTSession, myTrayIcon); |
|
|
|
searchEngine = new SearchEngine(&BTSession, myTrayIcon, systrayIntegration); |
|
|
|
tabs->addTab(searchEngine, tr("Search")); |
|
|
|
tabs->addTab(searchEngine, tr("Search")); |
|
|
|
tabs->setTabIcon(2, QIcon(QString::fromUtf8(":/Icons/skin/search.png"))); |
|
|
|
tabs->setTabIcon(2, QIcon(QString::fromUtf8(":/Icons/skin/search.png"))); |
|
|
|
// RSS tab
|
|
|
|
// RSS tab
|
|
|
@ -87,6 +89,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){ |
|
|
|
actionStart_All->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play_all.png"))); |
|
|
|
actionStart_All->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play_all.png"))); |
|
|
|
actionClearLog->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete.png"))); |
|
|
|
actionClearLog->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete.png"))); |
|
|
|
actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.png"))); |
|
|
|
actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.png"))); |
|
|
|
|
|
|
|
//TODO: set icons for Upload/Download limit actions
|
|
|
|
// actionDocumentation->setIcon(QIcon(QString::fromUtf8(":/Icons/help.png")));
|
|
|
|
// actionDocumentation->setIcon(QIcon(QString::fromUtf8(":/Icons/help.png")));
|
|
|
|
connecStatusLblIcon = new QLabel(); |
|
|
|
connecStatusLblIcon = new QLabel(); |
|
|
|
connecStatusLblIcon->setFrameShape(QFrame::NoFrame); |
|
|
|
connecStatusLblIcon->setFrameShape(QFrame::NoFrame); |
|
|
@ -157,8 +160,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){ |
|
|
|
connect(infoBar, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayInfoBarMenu(const QPoint&))); |
|
|
|
connect(infoBar, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayInfoBarMenu(const QPoint&))); |
|
|
|
// Create tray icon
|
|
|
|
// Create tray icon
|
|
|
|
if (QSystemTrayIcon::isSystemTrayAvailable()){ |
|
|
|
if (QSystemTrayIcon::isSystemTrayAvailable()){ |
|
|
|
QSettings settings("qBittorrent", "qBittorrent"); |
|
|
|
|
|
|
|
systrayIntegration = settings.value("Options/Misc/Behaviour/SystrayIntegration", true).toBool(); |
|
|
|
|
|
|
|
if(systrayIntegration){ |
|
|
|
if(systrayIntegration){ |
|
|
|
createTrayIcon(); |
|
|
|
createTrayIcon(); |
|
|
|
} |
|
|
|
} |
|
|
@ -295,6 +296,10 @@ void GUI::togglePausedState(const QModelIndex& index){ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// void GUI::on_actionSet_download_limit_triggered(){
|
|
|
|
|
|
|
|
// new BandwidthAllocationDialog(this,
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
void GUI::on_actionPreview_file_triggered(){ |
|
|
|
void GUI::on_actionPreview_file_triggered(){ |
|
|
|
if(tabs->currentIndex() > 1) return; |
|
|
|
if(tabs->currentIndex() > 1) return; |
|
|
|
bool inDownloadList = true; |
|
|
|
bool inDownloadList = true; |
|
|
|