|
|
|
@ -141,6 +141,7 @@ TransferListWidget::TransferListWidget(QWidget *parent, GUI *main_window, QBtSes
@@ -141,6 +141,7 @@ TransferListWidget::TransferListWidget(QWidget *parent, GUI *main_window, QBtSes
|
|
|
|
|
connect(BTSession, SIGNAL(pausedTorrent(QTorrentHandle&)), this, SLOT(pauseTorrent(QTorrentHandle&))); |
|
|
|
|
connect(BTSession, SIGNAL(resumedTorrent(QTorrentHandle&)), this, SLOT(resumeTorrent(QTorrentHandle&))); |
|
|
|
|
connect(BTSession, SIGNAL(torrentFinishedChecking(QTorrentHandle&)), this, SLOT(updateMetadata(QTorrentHandle&))); |
|
|
|
|
connect(BTSession, SIGNAL(deletedTorrent(QString)), SLOT(deleteTorrent(QString))); |
|
|
|
|
|
|
|
|
|
// Listen for list events
|
|
|
|
|
connect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(torrentDoubleClicked(QModelIndex))); |
|
|
|
@ -256,6 +257,13 @@ void TransferListWidget::pauseTorrent(QTorrentHandle &h) {
@@ -256,6 +257,13 @@ void TransferListWidget::pauseTorrent(QTorrentHandle &h) {
|
|
|
|
|
pauseTorrent(getRowFromHash(h.hash())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void TransferListWidget::deleteTorrent(QString hash) { |
|
|
|
|
const int row = getRowFromHash(hash); |
|
|
|
|
if(row >= 0) { |
|
|
|
|
deleteTorrent(row, true); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void TransferListWidget::pauseTorrent(int row, bool refresh_list) { |
|
|
|
|
const QTorrentHandle h = BTSession->getTorrentHandle(getHashFromRow(row)); |
|
|
|
|
listModel->setData(listModel->index(row, TR_DLSPEED), QVariant((double)0.0)); |
|
|
|
|