mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 01:03:08 -07:00
- Added priority buttons
This commit is contained in:
parent
600308aaa1
commit
ca118697e9
4 changed files with 69 additions and 32 deletions
39
src/GUI.cpp
39
src/GUI.cpp
|
@ -1227,6 +1227,45 @@ void GUI::on_actionPause_All_triggered() {
|
|||
}
|
||||
}
|
||||
|
||||
void GUI::on_actionIncreasePriority_triggered() {
|
||||
bool inDownloadList = true;
|
||||
if(tabs->currentIndex() > 1) return;
|
||||
if(tabs->currentIndex() == 1)
|
||||
inDownloadList = false;
|
||||
if(!inDownloadList)
|
||||
return;
|
||||
QStringList hashes;
|
||||
if(inDownloadList) {
|
||||
hashes = downloadingTorrentTab->getSelectedTorrents();
|
||||
} else {
|
||||
hashes = finishedTorrentTab->getSelectedTorrents();
|
||||
}
|
||||
foreach(QString hash, hashes) {
|
||||
BTSession->increaseDlTorrentPriority(hash);
|
||||
downloadingTorrentTab->updateDlList();
|
||||
}
|
||||
}
|
||||
|
||||
void GUI::on_actionDecreasePriority_triggered() {
|
||||
bool inDownloadList = true;
|
||||
if(tabs->currentIndex() > 1) return;
|
||||
if(tabs->currentIndex() == 1)
|
||||
inDownloadList = false;
|
||||
if(!inDownloadList)
|
||||
return;
|
||||
QStringList hashes;
|
||||
if(inDownloadList) {
|
||||
hashes = downloadingTorrentTab->getSelectedTorrents();
|
||||
} else {
|
||||
hashes = finishedTorrentTab->getSelectedTorrents();
|
||||
}
|
||||
QString hash;
|
||||
foreach(QString hash, hashes) {
|
||||
BTSession->decreaseDlTorrentPriority(hash);
|
||||
downloadingTorrentTab->updateDlList();
|
||||
}
|
||||
}
|
||||
|
||||
// pause selected items in the list
|
||||
void GUI::on_actionPause_triggered() {
|
||||
bool inDownloadList = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue