- FEATURE: Display total amount of uploaded data in finished list

- Updated language files
This commit is contained in:
Christophe Dumez 2009-03-09 18:37:17 +00:00
parent f4502367f3
commit 5e41a64c8b
43 changed files with 9396 additions and 14206 deletions

View file

@ -1,5 +1,6 @@
* Unknown - Christophe Dumez <chris@qbittorrent.org> - v1.4.0
- FEATURE: Allow to define temporary download folder
- FEATURE: Display total amount of uploaded data in finished list
- COSMETIC: Redesigned program preferences
- COSMETIC: Updated icons set

View file

@ -36,8 +36,9 @@
#define F_SIZE 1
#define F_UPSPEED 2
#define F_LEECH 3
#define F_RATIO 4
#define F_HASH 5
#define F_UPLOAD 4
#define F_RATIO 5
#define F_HASH 6
class FinishedListDelegate: public QItemDelegate {
Q_OBJECT
@ -51,6 +52,7 @@ class FinishedListDelegate: public QItemDelegate {
QStyleOptionViewItemV2 opt = QItemDelegate::setOptions(index, option);
switch(index.column()){
case F_SIZE:
case F_UPLOAD:
QItemDelegate::drawBackground(painter, opt, index);
QItemDelegate::drawDisplay(painter, opt, option.rect, misc::friendlyUnit(index.data().toLongLong()));
break;

View file

@ -37,11 +37,12 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
setupUi(this);
actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png")));
actionPause->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/pause.png")));
finishedListModel = new QStandardItemModel(0,6);
finishedListModel = new QStandardItemModel(0,7);
finishedListModel->setHeaderData(F_NAME, Qt::Horizontal, tr("Name", "i.e: file name"));
finishedListModel->setHeaderData(F_SIZE, Qt::Horizontal, tr("Size", "i.e: file size"));
finishedListModel->setHeaderData(F_UPSPEED, Qt::Horizontal, tr("UP Speed", "i.e: Upload speed"));
finishedListModel->setHeaderData(F_LEECH, Qt::Horizontal, tr("Leechers", "i.e: full/partial sources"));
finishedListModel->setHeaderData(F_UPLOAD, Qt::Horizontal, tr("Total uploaded", "i.e: Total amount of uploaded data"));
finishedListModel->setHeaderData(F_RATIO, Qt::Horizontal, tr("Ratio"));
finishedList->setModel(finishedListModel);
loadHiddenColumns();
@ -80,6 +81,7 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
connect(actionHOSColSize, SIGNAL(triggered()), this, SLOT(hideOrShowColumnSize()));
connect(actionHOSColUpSpeed, SIGNAL(triggered()), this, SLOT(hideOrShowColumnUpSpeed()));
connect(actionHOSColLeechers, SIGNAL(triggered()), this, SLOT(hideOrShowColumnLeechers()));
connect(actionHOSColUpload, SIGNAL(triggered()), this, SLOT(hideOrShowColumnUpload()));
connect(actionHOSColRatio, SIGNAL(triggered()), this, SLOT(hideOrShowColumnRatio()));
}
@ -107,6 +109,7 @@ void FinishedTorrents::addTorrent(QString hash){
finishedListModel->setData(finishedListModel->index(row, F_SIZE), QVariant((qlonglong)h.actual_size()));
finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), QVariant((double)0.));
finishedListModel->setData(finishedListModel->index(row, F_LEECH), QVariant("0"));
finishedListModel->setData(finishedListModel->index(row, F_UPLOAD), QVariant((qlonglong)h.all_time_upload()));
finishedListModel->setData(finishedListModel->index(row, F_RATIO), QVariant(QString::fromUtf8(misc::toString(BTSession->getRealRatio(hash)).c_str())));
finishedListModel->setData(finishedListModel->index(row, F_HASH), QVariant(hash));
if(h.is_paused()) {
@ -263,6 +266,9 @@ void FinishedTorrents::updateTorrent(QTorrentHandle h) {
if(!finishedList->isColumnHidden(F_LEECH)) {
finishedListModel->setData(finishedListModel->index(row, F_LEECH), misc::toQString(h.num_peers() - h.num_seeds(), true));
}
if(!finishedList->isColumnHidden(F_UPLOAD)) {
finishedListModel->setData(finishedListModel->index(row, F_UPLOAD), QVariant((double)h.all_time_upload()));
}
if(!finishedList->isColumnHidden(F_RATIO)) {
finishedListModel->setData(finishedListModel->index(row, F_RATIO), QVariant(misc::toQString(BTSession->getRealRatio(hash))));
}
@ -458,6 +464,10 @@ void FinishedTorrents::hideOrShowColumnLeechers() {
hideOrShowColumn(F_LEECH);
}
void FinishedTorrents::hideOrShowColumnUpload() {
hideOrShowColumn(F_UPLOAD);
}
void FinishedTorrents::hideOrShowColumnRatio() {
hideOrShowColumn(F_RATIO);
}
@ -520,6 +530,9 @@ QAction* FinishedTorrents::getActionHoSCol(int index) {
case F_LEECH :
return actionHOSColLeechers;
break;
case F_UPLOAD :
return actionHOSColUpload;
break;
case F_RATIO :
return actionHOSColRatio;
break;
@ -542,6 +555,7 @@ void FinishedTorrents::toggleFinishedListSortOrder(int index) {
case F_SIZE:
case F_UPSPEED:
case F_RATIO:
case F_UPLOAD:
sortFinishedListFloat(index, sortOrder);
break;
default:
@ -566,6 +580,8 @@ void FinishedTorrents::sortFinishedList(int index, Qt::SortOrder sortOrder){
switch(index) {
case F_SIZE:
case F_UPSPEED:
case F_UPLOAD:
case F_RATIO:
sortFinishedListFloat(index, sortOrder);
break;
default:

View file

@ -71,6 +71,7 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
void hideOrShowColumnSize();
void hideOrShowColumnUpSpeed();
void hideOrShowColumnLeechers();
void hideOrShowColumnUpload();
void hideOrShowColumnRatio();
void forceRecheck();

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,8 @@
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>seeding</class>
<widget class="QWidget" name="seeding" >
<property name="geometry" >
<widget class="QWidget" name="seeding">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@ -9,129 +10,134 @@
<height>453</height>
</rect>
</property>
<property name="windowTitle" >
<property name="windowTitle">
<string>Search</string>
</property>
<layout class="QVBoxLayout" >
<property name="spacing" >
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin" >
<property name="margin">
<number>9</number>
</property>
<item>
<widget class="QTreeView" name="finishedList" >
<property name="contextMenuPolicy" >
<widget class="QTreeView" name="finishedList">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="selectionMode" >
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl_note" >
<property name="font" >
<widget class="QLabel" name="lbl_note">
<property name="font">
<font>
<italic>true</italic>
</font>
</property>
<property name="text" >
<string>&lt;u>Note:&lt;/u> It is important that you keep sharing your torrents after they are finished for the well being of the network.</string>
<property name="text">
<string>&lt;u&gt;Note:&lt;/u&gt; It is important that you keep sharing your torrents after they are finished for the well being of the network.</string>
</property>
</widget>
</item>
</layout>
<action name="actionStart" >
<property name="text" >
<action name="actionStart">
<property name="text">
<string>Start</string>
</property>
</action>
<action name="actionPause" >
<property name="text" >
<action name="actionPause">
<property name="text">
<string>Pause</string>
</property>
</action>
<action name="actionDelete" >
<property name="text" >
<action name="actionDelete">
<property name="text">
<string>Delete</string>
</property>
</action>
<action name="actionDelete_Permanently" >
<property name="text" >
<action name="actionDelete_Permanently">
<property name="text">
<string>Delete Permanently</string>
</property>
</action>
<action name="actionTorrent_Properties" >
<property name="text" >
<action name="actionTorrent_Properties">
<property name="text">
<string>Torrent Properties</string>
</property>
</action>
<action name="actionPreview_file" >
<property name="text" >
<action name="actionPreview_file">
<property name="text">
<string>Preview file</string>
</property>
</action>
<action name="actionSet_upload_limit" >
<property name="text" >
<action name="actionSet_upload_limit">
<property name="text">
<string>Set upload limit</string>
</property>
</action>
<action name="actionOpen_destination_folder" >
<property name="icon" >
<iconset resource="icons.qrc" >
<normaloff>:/Icons/oxygen/folder.png</normaloff>:/Icons/oxygen/folder.png</iconset>
<action name="actionOpen_destination_folder">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/Icons/oxygen/folder.png</normaloff>:/Icons/oxygen/folder.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>Open destination folder</string>
</property>
</action>
<action name="actionHOSColName" >
<property name="text" >
<action name="actionHOSColName">
<property name="text">
<string>Name</string>
</property>
</action>
<action name="actionHOSColSize" >
<property name="text" >
<action name="actionHOSColSize">
<property name="text">
<string>Size</string>
</property>
</action>
<action name="actionHOSColUpSpeed" >
<property name="text" >
<action name="actionHOSColUpSpeed">
<property name="text">
<string>Upload Speed</string>
</property>
</action>
<action name="actionHOSColLeechers" >
<property name="text" >
<action name="actionHOSColLeechers">
<property name="text">
<string>Leechers</string>
</property>
</action>
<action name="actionHOSColRatio" >
<property name="text" >
<action name="actionHOSColRatio">
<property name="text">
<string>Ratio</string>
</property>
</action>
<action name="actionBuy_it" >
<property name="icon" >
<iconset resource="icons.qrc" >
<action name="actionBuy_it">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/Icons/money.png</normaloff>:/Icons/money.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>Buy it</string>
</property>
</action>
<action name="actionForce_recheck" >
<property name="icon" >
<iconset resource="icons.qrc" >
<normaloff>:/Icons/oxygen/gear.png</normaloff>:/Icons/oxygen/gear.png</iconset>
<action name="actionForce_recheck">
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/Icons/oxygen/gear.png</normaloff>:/Icons/oxygen/gear.png</iconset>
</property>
<property name="text" >
<property name="text">
<string>Force recheck</string>
</property>
</action>
<action name="actionHOSColUpload">
<property name="text">
<string>Total uploaded</string>
</property>
</action>
</widget>
<resources>
<include location="icons.qrc" />
<include location="icons.qrc"/>
</resources>
<connections/>
</ui>