##// END OF EJS Templates
Added Python Console and some Wrappers....
Added Python Console and some Wrappers. More code cleaning, WIP.

File last commit:

r4:b41a5ed0a855 default
r5:92e4585e8fab default
Show More
downloadhistoryelement.cpp
44 lines | 1.2 KiB | text/x-c | CppLexer
/ src / Core / Widgets / downloadhistoryelement.cpp
#include "downloadhistoryelement.h"
#include "ui_downloadhistoryelement.h"
DownloadHistoryElement::DownloadHistoryElement(FileDownloaderTask *task, QWidget *parent) :
QWidget(parent),
ui(new Ui::DownloadHistoryElement)
{
ui->setupUi(this);
if(task)
{
this->associatedTask=task;
this->ui->DownloadDate->setText(task->startDateTime().toString("yyyy:MM:dd-hh:mm:ss"));
this->ui->FileNameLbl->setText(task->fileName());
this->ui->linkLbl->setText(task->url());
connect(associatedTask,SIGNAL(updateProgress(int)),this,SLOT(updateProgress(int)));
}
/*this->setStyleSheet("QWidget#DownloadHistoryElement{\
border: 1px solid gray;\
border-radius: 9px;\
margin-top: 0.5em; \
}");*/
}
DownloadHistoryElement::~DownloadHistoryElement()
{
delete ui;
}
void DownloadHistoryElement::updateProgress(int percent)
{
this->ui->progressBar->setValue(percent);
}
void DownloadHistoryElement::changeEvent(QEvent *e)
{
QWidget::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui->retranslateUi(this);
break;
default:
break;
}
}