|
|
@ -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; |
|
|
|
} |
|
|
|
} |
|
|
|