|
|
@ -46,18 +46,14 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession){ |
|
|
|
finishedListDelegate = new DLListDelegate(); |
|
|
|
finishedListDelegate = new DLListDelegate(); |
|
|
|
finishedList->setItemDelegate(finishedListDelegate); |
|
|
|
finishedList->setItemDelegate(finishedListDelegate); |
|
|
|
connect(finishedList, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedListMenu(const QPoint&))); |
|
|
|
connect(finishedList, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedListMenu(const QPoint&))); |
|
|
|
actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png"))); |
|
|
|
|
|
|
|
actionPause->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/pause.png"))); |
|
|
|
|
|
|
|
actionDelete->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete.png"))); |
|
|
|
actionDelete->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete.png"))); |
|
|
|
actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.png"))); |
|
|
|
actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.png"))); |
|
|
|
actionDelete_Permanently->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete_perm.png"))); |
|
|
|
actionDelete_Permanently->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete_perm.png"))); |
|
|
|
actionTorrent_Properties->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/properties.png"))); |
|
|
|
actionTorrent_Properties->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/properties.png"))); |
|
|
|
connect(actionStart, SIGNAL(triggered()), (GUI*)parent, SLOT(startSelection())); |
|
|
|
|
|
|
|
connect(actionPause, SIGNAL(triggered()), (GUI*)parent, SLOT(pauseSelection())); |
|
|
|
|
|
|
|
connect(actionDelete, SIGNAL(triggered()), (GUI*)parent, SLOT(deleteSelection())); |
|
|
|
connect(actionDelete, SIGNAL(triggered()), (GUI*)parent, SLOT(deleteSelection())); |
|
|
|
connect(actionPreview_file, SIGNAL(triggered()), (GUI*)parent, SLOT(startSelection())); |
|
|
|
connect(actionPreview_file, SIGNAL(triggered()), (GUI*)parent, SLOT(startSelection())); |
|
|
|
connect(actionDelete_Permanently, SIGNAL(triggered()), (GUI*)parent, SLOT(deletePermanently())); |
|
|
|
connect(actionDelete_Permanently, SIGNAL(triggered()), (GUI*)parent, SLOT(deletePermanently())); |
|
|
|
connect(actionTorrent_Properties, SIGNAL(triggered()), this, SLOT(propertiesSelection)); |
|
|
|
connect(actionTorrent_Properties, SIGNAL(triggered()), this, SLOT(propertiesSelection())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FinishedTorrents::~FinishedTorrents(){ |
|
|
|
FinishedTorrents::~FinishedTorrents(){ |
|
|
@ -198,11 +194,6 @@ void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){ |
|
|
|
QString fileHash = finishedListModel->data(finishedListModel->index(index.row(), HASH)).toString(); |
|
|
|
QString fileHash = finishedListModel->data(finishedListModel->index(index.row(), HASH)).toString(); |
|
|
|
// Get handle and pause the torrent
|
|
|
|
// Get handle and pause the torrent
|
|
|
|
torrent_handle h = BTSession->getTorrentHandle(fileHash); |
|
|
|
torrent_handle h = BTSession->getTorrentHandle(fileHash); |
|
|
|
if(h.is_paused()){ |
|
|
|
|
|
|
|
myFinishedListMenu.addAction(actionStart); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
myFinishedListMenu.addAction(actionPause); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
myFinishedListMenu.addAction(actionDelete); |
|
|
|
myFinishedListMenu.addAction(actionDelete); |
|
|
|
myFinishedListMenu.addAction(actionDelete_Permanently); |
|
|
|
myFinishedListMenu.addAction(actionDelete_Permanently); |
|
|
|
myFinishedListMenu.addAction(actionTorrent_Properties); |
|
|
|
myFinishedListMenu.addAction(actionTorrent_Properties); |
|
|
|