- Huge forward porting of all previous properties features to the new properties panel (probably very buggy but most of the code should be there and it compiles)

This commit is contained in:
Christophe Dumez 2009-11-09 08:56:21 +00:00
parent 6ecde51e45
commit 9bc90fc7b2
12 changed files with 572 additions and 2125 deletions

View file

@ -832,3 +832,11 @@ void TransferListWidget::applyFilter(int f) {
if(selectionModel()->selectedRows(0).empty() && proxyModel->rowCount() > 0)
selectionModel()->setCurrentIndex(proxyModel->index(0, NAME), QItemSelectionModel::SelectCurrent|QItemSelectionModel::Rows);
}
void TransferListWidget::updateTorrentSizeAndProgress(QString hash) {
int row = getRowFromHash(hash);
Q_ASSERT(row != -1);
QTorrentHandle h = BTSession->getTorrentHandle(hash);
listModel->setData(listModel->index(row, SIZE), QVariant((qlonglong)h.actual_size()));
listModel->setData(listModel->index(row, PROGRESS), QVariant((double)h.progress()));
}