- Fixed compiling error in finishedTorrents.cpp

- Added icons for bandwidth allocation actions
This commit is contained in:
Christophe Dumez 2007-04-10 10:50:34 +00:00
parent e1660e592b
commit 30d328774f
2 changed files with 7 additions and 5 deletions

View File

@ -22,6 +22,7 @@
#include "misc.h"
#include "GUI.h"
#include "properties_imp.h"
#include "allocationDlg.h"
#include <QFile>
#include <QSettings>
@ -49,7 +50,7 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession){
actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.png")));
actionDelete_Permanently->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete_perm.png")));
actionTorrent_Properties->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/properties.png")));
// TODO: Set icons for upload limit
actionSet_upload_limit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/seeding.png")));
connect(actionDelete, SIGNAL(triggered()), (GUI*)parent, SLOT(deleteSelection()));
connect(actionPreview_file, SIGNAL(triggered()), (GUI*)parent, SLOT(previewFileSelection()));
connect(actionDelete_Permanently, SIGNAL(triggered()), (GUI*)parent, SLOT(deletePermanently()));
@ -106,16 +107,16 @@ void FinishedTorrents::setRowColor(int row, const QString& color){
}
void FinishedTorrents::on_actionSet_upload_limit_triggered(){
QModelIndexList selectedIndexes = downloadList->selectionModel()->selectedIndexes();
QModelIndexList selectedIndexes = finishedList->selectionModel()->selectedIndexes();
QModelIndex index;
QStringList hashes;
foreach(index, selectedIndexes){
if(index.column() == NAME){
// Get the file hash
hashes << DLListModel->data(DLListModel->index(index.row(), HASH)).toString();
hashes << finishedListModel->data(finishedListModel->index(index.row(), HASH)).toString();
}
}
new BandwidthAllocationDialog(this, true, &BTSession, hashes);
new BandwidthAllocationDialog(this, true, BTSession, hashes);
}
void FinishedTorrents::updateFinishedList(){

View File

@ -98,7 +98,8 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){
actionStart_All->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play_all.png")));
actionClearLog->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete.png")));
actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.png")));
//TODO: set icons for Upload/Download limit actions
actionSet_upload_limit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/seeding.png")));
actionSet_download_limit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/downloading.png")));
// actionDocumentation->setIcon(QIcon(QString::fromUtf8(":/Icons/help.png")));
connecStatusLblIcon = new QLabel();
connecStatusLblIcon->setFrameShape(QFrame::NoFrame);