From cf2bc1e980c2367c7dae764e43ba24c79b0ba68d Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Wed, 11 Apr 2007 18:31:21 +0000 Subject: [PATCH] - removed ETA & DL speed columns in finished torrents list --- TODO | 3 +-- src/DLListDelegate.h | 2 +- src/FinishedTorrents.cpp | 6 ++++-- src/GUI.cpp | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index 2d6ef8101..74b247409 100644 --- a/TODO +++ b/TODO @@ -47,5 +47,4 @@ - Improve ratio display / calculation / saving / per torrent... - Use buttonboxes when possible - Display the sum of the size of the selected files in the torrent instead of the whole torrent size in download list -- Sorting in Download Status column should be smarter than just an alphabetical sort -- remove ETA from finished list \ No newline at end of file +- Sorting in Download Status column should be smarter than just an alphabetical sort \ No newline at end of file diff --git a/src/DLListDelegate.h b/src/DLListDelegate.h index a91c5f557..649665f45 100644 --- a/src/DLListDelegate.h +++ b/src/DLListDelegate.h @@ -45,7 +45,7 @@ class DLListDelegate: public QAbstractItemDelegate { Q_OBJECT public: - DLListDelegate(QObject *parent=0) : QAbstractItemDelegate(parent){} + DLListDelegate(QObject *parent) : QAbstractItemDelegate(parent){} ~DLListDelegate(){} diff --git a/src/FinishedTorrents.cpp b/src/FinishedTorrents.cpp index ae4974dfa..e258b662d 100644 --- a/src/FinishedTorrents.cpp +++ b/src/FinishedTorrents.cpp @@ -41,8 +41,10 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession){ finishedListModel->setHeaderData(STATUS, Qt::Horizontal, tr("Status")); finishedListModel->setHeaderData(ETA, Qt::Horizontal, tr("ETA", "i.e: Estimated Time of Arrival / Time left")); finishedList->setModel(finishedListModel); - // Hide hash column + // Hide ETA & hash column finishedList->hideColumn(HASH); + finishedList->hideColumn(ETA); + finishedList->hideColumn(DLSPEED); // Load last columns width for download list if(!loadColWidthFinishedList()){ finishedList->header()->resizeSection(0, 200); @@ -51,7 +53,7 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession){ finishedList->header()->setClickable(true); finishedList->header()->setSortIndicatorShown(true); connect(finishedList->header(), SIGNAL(sectionPressed(int)), this, SLOT(sortFinishedList(int))); - finishedListDelegate = new DLListDelegate(); + finishedListDelegate = new DLListDelegate(finishedList); finishedList->setItemDelegate(finishedListDelegate); connect(finishedList, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedListMenu(const QPoint&))); connect(finishedList, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(propertiesSelection())); diff --git a/src/GUI.cpp b/src/GUI.cpp index 5387b4e6d..b30c099de 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -126,7 +126,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){ DLListModel->setHeaderData(STATUS, Qt::Horizontal, tr("Status")); DLListModel->setHeaderData(ETA, Qt::Horizontal, tr("ETA", "i.e: Estimated Time of Arrival / Time left")); downloadList->setModel(DLListModel); - DLDelegate = new DLListDelegate(); + DLDelegate = new DLListDelegate(downloadList); downloadList->setItemDelegate(DLDelegate); // Hide hash column downloadList->hideColumn(HASH);