- FEATURE: Real progress bar in torrent properties that displays downloaded pieces (contribution by

Ishan Arora)
This commit is contained in:
Christophe Dumez
2007-11-18 18:06:44 +00:00
parent 5484ec923d
commit 58c78fa6f6
10 changed files with 298 additions and 57 deletions

View File

@@ -24,6 +24,8 @@
#include "PropListDelegate.h"
#include "bittorrent.h"
#include "arborescence.h"
#include "realprogressbar.h"
#include "realprogressbarthread.h"
#include <QInputDialog>
#include <QMessageBox>
@@ -120,6 +122,15 @@ properties::properties(QWidget *parent, bittorrent *BTSession, QTorrentHandle &h
updateInfosTimer = new QTimer(this);
connect(updateInfosTimer, SIGNAL(timeout()), this, SLOT(updateInfos()));
updateInfosTimer->start(3000);
progressBar = new RealProgressBar(this);
progressBar->setForegroundColor(Qt::blue);
QVBoxLayout *vbox = new QVBoxLayout(this);
vbox->addWidget(progressBar);
RealProgressBox->setLayout(vbox);
progressBarUpdater = new RealProgressBarThread(progressBar, h);
progressBarUpdater->start();
// progressBarUpdater->refresh();
connect(updateInfosTimer, SIGNAL(timeout()), progressBarUpdater, SLOT(refresh()));
loadSettings();
}
@@ -128,6 +139,8 @@ properties::~properties(){
delete updateInfosTimer;
delete PropDelegate;
delete PropListModel;
delete progressBarUpdater;
delete progressBar;
}
void properties::addFilesToTree(file *root, QStandardItem *parent) {