mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 23:07:59 +00:00
- Added back "Sequential download" feature
This commit is contained in:
parent
75e5a7e3d4
commit
c756412ee6
@ -39,6 +39,7 @@
|
|||||||
PropertiesWidget::PropertiesWidget(QWidget *parent, TransferListWidget *transferList): QWidget(parent), transferList(transferList) {
|
PropertiesWidget::PropertiesWidget(QWidget *parent, TransferListWidget *transferList): QWidget(parent), transferList(transferList) {
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
connect(transferList, SIGNAL(currentTorrentChanged(QTorrentHandle&)), this, SLOT(loadTorrentInfos(QTorrentHandle &)));
|
connect(transferList, SIGNAL(currentTorrentChanged(QTorrentHandle&)), this, SLOT(loadTorrentInfos(QTorrentHandle &)));
|
||||||
|
connect(incrementalDownload, SIGNAL(stateChanged(int)), this, SLOT(setIncrementalDownload(int)));
|
||||||
// Downloaded pieces progress bar
|
// Downloaded pieces progress bar
|
||||||
progressBar = new RealProgressBar(this);
|
progressBar = new RealProgressBar(this);
|
||||||
progressBar->setForegroundColor(Qt::blue);
|
progressBar->setForegroundColor(Qt::blue);
|
||||||
@ -77,6 +78,8 @@ void PropertiesWidget::loadTorrentInfos(QTorrentHandle &_h) {
|
|||||||
hash_lbl->setText(h.hash());
|
hash_lbl->setText(h.hash());
|
||||||
// Comment
|
// Comment
|
||||||
comment_lbl->setText(h.comment());
|
comment_lbl->setText(h.comment());
|
||||||
|
// Sequential download
|
||||||
|
incrementalDownload->setChecked(TorrentPersistentData::isSequentialDownload(h.hash()));
|
||||||
// downloaded pieces updater
|
// downloaded pieces updater
|
||||||
progressBarUpdater = new RealProgressBarThread(progressBar, h);
|
progressBarUpdater = new RealProgressBarThread(progressBar, h);
|
||||||
progressBarUpdater->start();
|
progressBarUpdater->start();
|
||||||
@ -113,3 +116,9 @@ void PropertiesWidget::loadDynamicData() {
|
|||||||
progressBarUpdater->refresh();
|
progressBarUpdater->refresh();
|
||||||
} catch(invalid_handle e) {}
|
} catch(invalid_handle e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PropertiesWidget::setIncrementalDownload(int checkboxState) {
|
||||||
|
if(!h.is_valid()) return;
|
||||||
|
h.set_sequential_download(checkboxState == Qt::Checked);
|
||||||
|
TorrentPersistentData::saveSequentialStatus(h);
|
||||||
|
}
|
||||||
|
@ -55,6 +55,7 @@ private:
|
|||||||
protected slots:
|
protected slots:
|
||||||
void loadTorrentInfos(QTorrentHandle &h);
|
void loadTorrentInfos(QTorrentHandle &h);
|
||||||
void loadDynamicData();
|
void loadDynamicData();
|
||||||
|
void setIncrementalDownload(int checkboxState);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PropertiesWidget(QWidget *parent, TransferListWidget *transferList);
|
PropertiesWidget(QWidget *parent, TransferListWidget *transferList);
|
||||||
|
Loading…
Reference in New Issue
Block a user