##// END OF EJS Templates
added quick fileName generation for data export, and fixed wrong date reading...
added quick fileName generation for data export, and fixed wrong date reading on cassini data files.

File last commit:

r4:b41a5ed0a855 default
r10:63067c6877ba 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;
}
}