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