|
|
@ -131,10 +131,6 @@ TorrentModel* TransferListWidget::getSourceModel() const { |
|
|
|
return listModel; |
|
|
|
return listModel; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int TransferListWidget::getNbTorrents() const { |
|
|
|
|
|
|
|
return listModel->rowCount(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void TransferListWidget::previewFile(QString filePath) { |
|
|
|
void TransferListWidget::previewFile(QString filePath) { |
|
|
|
#ifdef Q_WS_WIN |
|
|
|
#ifdef Q_WS_WIN |
|
|
|
QDesktopServices::openUrl(QUrl(QString("file:///")+filePath)); |
|
|
|
QDesktopServices::openUrl(QUrl(QString("file:///")+filePath)); |
|
|
@ -260,15 +256,6 @@ void TransferListWidget::startSelectedTorrents() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void TransferListWidget::startAllTorrents() { |
|
|
|
|
|
|
|
for(int i=0; i<listModel->rowCount(); ++i) { |
|
|
|
|
|
|
|
QTorrentHandle h = BTSession->getTorrentHandle(getHashFromRow(i)); |
|
|
|
|
|
|
|
if(h.is_valid() && h.is_paused()) { |
|
|
|
|
|
|
|
h.resume(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void TransferListWidget::startVisibleTorrents() { |
|
|
|
void TransferListWidget::startVisibleTorrents() { |
|
|
|
QStringList hashes; |
|
|
|
QStringList hashes; |
|
|
|
for(int i=0; i<nameFilterModel->rowCount(); ++i) { |
|
|
|
for(int i=0; i<nameFilterModel->rowCount(); ++i) { |
|
|
@ -293,15 +280,6 @@ void TransferListWidget::pauseSelectedTorrents() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void TransferListWidget::pauseAllTorrents() { |
|
|
|
|
|
|
|
for(int i=0; i<listModel->rowCount(); ++i) { |
|
|
|
|
|
|
|
QTorrentHandle h = BTSession->getTorrentHandle(getHashFromRow(i)); |
|
|
|
|
|
|
|
if(h.is_valid() && !h.is_paused()) { |
|
|
|
|
|
|
|
h.pause(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void TransferListWidget::pauseVisibleTorrents() { |
|
|
|
void TransferListWidget::pauseVisibleTorrents() { |
|
|
|
QStringList hashes; |
|
|
|
QStringList hashes; |
|
|
|
for(int i=0; i<nameFilterModel->rowCount(); ++i) { |
|
|
|
for(int i=0; i<nameFilterModel->rowCount(); ++i) { |
|
|
|