mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 12:34:19 +00:00
FEATURE: Added a transfer list column to display the current tracker
This commit is contained in:
parent
86fb4a323a
commit
ccf0002c0f
@ -1,5 +1,6 @@
|
|||||||
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.5.0
|
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.5.0
|
||||||
- FEATURE: Added feature to shutdown qbittorrent on torrents completion
|
- FEATURE: Added feature to shutdown qbittorrent on torrents completion
|
||||||
|
- FEATURE: Added a transfer list column to display the current tracker
|
||||||
|
|
||||||
* Tue Aug 24 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.0
|
* Tue Aug 24 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.0
|
||||||
- FEATURE: Added actions to "Move to top/bottom" of priority queue
|
- FEATURE: Added actions to "Move to top/bottom" of priority queue
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
// Defines for download list list columns
|
// Defines for download list list columns
|
||||||
enum TorrentState {STATE_DOWNLOADING, STATE_STALLED_DL, STATE_STALLED_UP, STATE_SEEDING, STATE_PAUSED_DL, STATE_PAUSED_UP, STATE_QUEUED_DL, STATE_QUEUED_UP, STATE_CHECKING_UP, STATE_CHECKING_DL, STATE_INVALID};
|
enum TorrentState {STATE_DOWNLOADING, STATE_STALLED_DL, STATE_STALLED_UP, STATE_SEEDING, STATE_PAUSED_DL, STATE_PAUSED_UP, STATE_QUEUED_DL, STATE_QUEUED_UP, STATE_CHECKING_UP, STATE_CHECKING_DL, STATE_INVALID};
|
||||||
enum Column {TR_NAME, TR_PRIORITY, TR_SIZE, TR_PROGRESS, TR_STATUS, TR_SEEDS, TR_PEERS, TR_DLSPEED, TR_UPSPEED, TR_ETA, TR_RATIO, TR_LABEL, TR_ADD_DATE, TR_SEED_DATE, TR_DLLIMIT, TR_UPLIMIT, TR_HASH};
|
enum Column {TR_NAME, TR_PRIORITY, TR_SIZE, TR_PROGRESS, TR_STATUS, TR_SEEDS, TR_PEERS, TR_DLSPEED, TR_UPSPEED, TR_ETA, TR_RATIO, TR_LABEL, TR_ADD_DATE, TR_SEED_DATE, TR_TRACKER, TR_DLLIMIT, TR_UPLIMIT, TR_HASH};
|
||||||
|
|
||||||
class TransferListDelegate: public QItemDelegate {
|
class TransferListDelegate: public QItemDelegate {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -63,7 +63,7 @@ TransferListWidget::TransferListWidget(QWidget *parent, GUI *main_window, Bittor
|
|||||||
setItemDelegate(listDelegate);
|
setItemDelegate(listDelegate);
|
||||||
|
|
||||||
// Create transfer list model
|
// Create transfer list model
|
||||||
listModel = new QStandardItemModel(0,17);
|
listModel = new QStandardItemModel(0,18);
|
||||||
listModel->setHeaderData(TR_NAME, Qt::Horizontal, tr("Name", "i.e: torrent name"));
|
listModel->setHeaderData(TR_NAME, Qt::Horizontal, tr("Name", "i.e: torrent name"));
|
||||||
listModel->setHeaderData(TR_PRIORITY, Qt::Horizontal, "#");
|
listModel->setHeaderData(TR_PRIORITY, Qt::Horizontal, "#");
|
||||||
listModel->horizontalHeaderItem(TR_PRIORITY)->setTextAlignment(Qt::AlignRight);
|
listModel->horizontalHeaderItem(TR_PRIORITY)->setTextAlignment(Qt::AlignRight);
|
||||||
@ -86,6 +86,7 @@ TransferListWidget::TransferListWidget(QWidget *parent, GUI *main_window, Bittor
|
|||||||
listModel->setHeaderData(TR_LABEL, Qt::Horizontal, tr("Label"));
|
listModel->setHeaderData(TR_LABEL, Qt::Horizontal, tr("Label"));
|
||||||
listModel->setHeaderData(TR_ADD_DATE, Qt::Horizontal, tr("Added On", "Torrent was added to transfer list on 01/01/2010 08:00"));
|
listModel->setHeaderData(TR_ADD_DATE, Qt::Horizontal, tr("Added On", "Torrent was added to transfer list on 01/01/2010 08:00"));
|
||||||
listModel->setHeaderData(TR_SEED_DATE, Qt::Horizontal, tr("Completed On", "Torrent was completed on 01/01/2010 08:00"));
|
listModel->setHeaderData(TR_SEED_DATE, Qt::Horizontal, tr("Completed On", "Torrent was completed on 01/01/2010 08:00"));
|
||||||
|
listModel->setHeaderData(TR_TRACKER, Qt::Horizontal, tr("Tracker"));
|
||||||
listModel->setHeaderData(TR_DLLIMIT, Qt::Horizontal, tr("Down Limit", "i.e: Download limit"));
|
listModel->setHeaderData(TR_DLLIMIT, Qt::Horizontal, tr("Down Limit", "i.e: Download limit"));
|
||||||
listModel->horizontalHeaderItem(TR_DLLIMIT)->setTextAlignment(Qt::AlignRight);
|
listModel->horizontalHeaderItem(TR_DLLIMIT)->setTextAlignment(Qt::AlignRight);
|
||||||
listModel->setHeaderData(TR_UPLIMIT, Qt::Horizontal, tr("Up Limit", "i.e: Upload limit"));;
|
listModel->setHeaderData(TR_UPLIMIT, Qt::Horizontal, tr("Up Limit", "i.e: Upload limit"));;
|
||||||
@ -358,6 +359,9 @@ int TransferListWidget::updateTorrent(int row) {
|
|||||||
peers += 1;
|
peers += 1;
|
||||||
listModel->setData(listModel->index(row, TR_PEERS), QVariant(peers));
|
listModel->setData(listModel->index(row, TR_PEERS), QVariant(peers));
|
||||||
}
|
}
|
||||||
|
if(!isColumnHidden(TR_TRACKER)) {
|
||||||
|
listModel->setData(listModel->index(row, TR_TRACKER), QVariant(h.current_tracker()));
|
||||||
|
}
|
||||||
// Update torrent size. It changes when files are filtered from torrent properties
|
// Update torrent size. It changes when files are filtered from torrent properties
|
||||||
// or Web UI
|
// or Web UI
|
||||||
listModel->setData(listModel->index(row, TR_SIZE), QVariant((qlonglong)h.actual_size()));
|
listModel->setData(listModel->index(row, TR_SIZE), QVariant((qlonglong)h.actual_size()));
|
||||||
@ -1005,6 +1009,7 @@ bool TransferListWidget::loadHiddenColumns() {
|
|||||||
setColumnHidden(TR_SEED_DATE, true);
|
setColumnHidden(TR_SEED_DATE, true);
|
||||||
setColumnHidden(TR_UPLIMIT, true);
|
setColumnHidden(TR_UPLIMIT, true);
|
||||||
setColumnHidden(TR_DLLIMIT, true);
|
setColumnHidden(TR_DLLIMIT, true);
|
||||||
|
setColumnHidden(TR_TRACKER, true);
|
||||||
}
|
}
|
||||||
return loaded;
|
return loaded;
|
||||||
}
|
}
|
||||||
@ -1465,13 +1470,13 @@ void TransferListWidget::applyStatusFilter(int f) {
|
|||||||
switch(f) {
|
switch(f) {
|
||||||
case FILTER_DOWNLOADING:
|
case FILTER_DOWNLOADING:
|
||||||
statusFilterModel->setFilterRegExp(QRegExp(QString::number(STATE_DOWNLOADING)+"|"+QString::number(STATE_STALLED_DL)+"|"+
|
statusFilterModel->setFilterRegExp(QRegExp(QString::number(STATE_DOWNLOADING)+"|"+QString::number(STATE_STALLED_DL)+"|"+
|
||||||
QString::number(STATE_PAUSED_DL)+"|"+QString::number(STATE_CHECKING_DL)+"|"+
|
QString::number(STATE_PAUSED_DL)+"|"+QString::number(STATE_CHECKING_DL)+"|"+
|
||||||
QString::number(STATE_QUEUED_DL), Qt::CaseSensitive));
|
QString::number(STATE_QUEUED_DL), Qt::CaseSensitive));
|
||||||
break;
|
break;
|
||||||
case FILTER_COMPLETED:
|
case FILTER_COMPLETED:
|
||||||
statusFilterModel->setFilterRegExp(QRegExp(QString::number(STATE_SEEDING)+"|"+QString::number(STATE_STALLED_UP)+"|"+
|
statusFilterModel->setFilterRegExp(QRegExp(QString::number(STATE_SEEDING)+"|"+QString::number(STATE_STALLED_UP)+"|"+
|
||||||
QString::number(STATE_PAUSED_UP)+"|"+QString::number(STATE_CHECKING_UP)+"|"+
|
QString::number(STATE_PAUSED_UP)+"|"+QString::number(STATE_CHECKING_UP)+"|"+
|
||||||
QString::number(STATE_QUEUED_UP), Qt::CaseSensitive));
|
QString::number(STATE_QUEUED_UP), Qt::CaseSensitive));
|
||||||
break;
|
break;
|
||||||
case FILTER_ACTIVE:
|
case FILTER_ACTIVE:
|
||||||
statusFilterModel->setFilterRegExp(QRegExp(QString::number(STATE_DOWNLOADING)+"|"+QString::number(STATE_SEEDING), Qt::CaseSensitive));
|
statusFilterModel->setFilterRegExp(QRegExp(QString::number(STATE_DOWNLOADING)+"|"+QString::number(STATE_SEEDING), Qt::CaseSensitive));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user