Implement Advanced Saving Management subsystem

Closes #4696
This commit is contained in:
Vladimir Golovnev (Glassez) 2016-02-09 11:56:48 +03:00
parent d05d5a85a5
commit dd34663224
59 changed files with 1796 additions and 1280 deletions

View file

@ -104,7 +104,7 @@ QVariant TorrentModel::headerData(int section, Qt::Orientation orientation, int
case TR_UPSPEED: return tr("Up Speed", "i.e: Upload speed");
case TR_RATIO: return tr("Ratio", "Share ratio");
case TR_ETA: return tr("ETA", "i.e: Estimated Time of Arrival / Time left");
case TR_LABEL: return tr("Label");
case TR_CATEGORY: return tr("Category");
case TR_ADD_DATE: return tr("Added On", "Torrent was added to transfer list on 01/01/2010 08:00");
case TR_SEED_DATE: return tr("Completed On", "Torrent was completed on 01/01/2010 08:00");
case TR_TRACKER: return tr("Tracker");
@ -196,8 +196,8 @@ QVariant TorrentModel::data(const QModelIndex &index, int role) const
return torrent->eta();
case TR_RATIO:
return torrent->realRatio();
case TR_LABEL:
return torrent->label();
case TR_CATEGORY:
return torrent->category();
case TR_ADD_DATE:
return torrent->addedTime();
case TR_SEED_DATE:
@ -250,13 +250,13 @@ bool TorrentModel::setData(const QModelIndex &index, const QVariant &value, int
BitTorrent::TorrentHandle *const torrent = m_torrents.value(index.row());
if (!torrent) return false;
// Label, seed date and Name columns can be edited
// Category, seed date and Name columns can be edited
switch(index.column()) {
case TR_NAME:
torrent->setName(value.toString());
break;
case TR_LABEL:
torrent->setLabel(value.toString());
case TR_CATEGORY:
torrent->setCategory(value.toString());
break;
default:
return false;