save files with comment
This commit is contained in:
@@ -83,6 +83,9 @@ MainWindow::MainWindow(Worker *worker, QWidget *parent)
|
||||
connect(m_worker, SIGNAL(showSummary(QString)),this,SLOT(onShowSummary(QString)));
|
||||
connect(m_worker, SIGNAL(disableExit()),this,SLOT(onDisableExit()));
|
||||
connect(m_worker, SIGNAL(showDcDownload(QString)),this,SLOT(onShowDcDownload(QString)));
|
||||
connect(m_worker, SIGNAL(showJsonDownload(QString)),this,SLOT(onShowJsonDownload(QString)));
|
||||
connect(m_worker, SIGNAL(showTariffUpdate(QString)),this,SLOT(onShowTariffUpdate(QString)));
|
||||
connect(m_worker, SIGNAL(showISMASChecks(QString)),this,SLOT(onShowISMASChecks(QString)));
|
||||
connect(m_worker, SIGNAL(setDcDownloadProgress(int)),this,SLOT(onSetDcDownloadProgress(int)));
|
||||
connect(m_worker, SIGNAL(enableExit()),this,SLOT(onEnableExit()));
|
||||
connect(m_worker, SIGNAL(stopStartTimer()),this,SLOT(onStopStartTimer()));
|
||||
@@ -105,6 +108,7 @@ void MainWindow::onShowSummary(QString text) {
|
||||
ui->updateLabel->setText(s);
|
||||
ui->updateLabel->hide();
|
||||
ui->stepLabel->hide();
|
||||
ui->updateProgress->hide();
|
||||
|
||||
s += text;
|
||||
ui->updateStatus->setText(s);
|
||||
@@ -114,10 +118,80 @@ void MainWindow::onSetDcDownloadProgress(int v) {
|
||||
ui->updateProgress->setValue(v);
|
||||
}
|
||||
|
||||
void MainWindow::onShowTariffUpdate(QString) {
|
||||
ui->exit->setEnabled(false);
|
||||
|
||||
QString s = ui->stepLabel->text();
|
||||
|
||||
QString tmp("Install tariff files ");
|
||||
int len = m_showLineLength - tmp.length();
|
||||
while (--len > 0) {
|
||||
tmp += " ";
|
||||
}
|
||||
|
||||
s += QString("%1 <font color='Green'>[OK ]</font><br />").arg(tmp);
|
||||
|
||||
ui->stepLabel->setText(s);
|
||||
}
|
||||
|
||||
void MainWindow::onShowISMASChecks(QString) {
|
||||
QString s = ui->stepLabel->text();
|
||||
|
||||
QString tmp("Check ISMAS connectivity ");
|
||||
int len = m_showLineLength - tmp.length();
|
||||
while (--len > 0) {
|
||||
tmp += " ";
|
||||
}
|
||||
|
||||
s += QString("%1 <font color='Green'>[OK ]</font><br />").arg(tmp);
|
||||
|
||||
tmp = "Check update activation ";
|
||||
len = m_showLineLength - tmp.length();
|
||||
|
||||
while (--len > 0) {
|
||||
tmp += " ";
|
||||
}
|
||||
|
||||
s += QString("%1 <font color='Green'>[OK ]</font><br />").arg(tmp);
|
||||
ui->stepLabel->setText(s);
|
||||
}
|
||||
|
||||
void MainWindow::onShowJsonDownload(QString) {
|
||||
ui->exit->setEnabled(false);
|
||||
|
||||
QString s = ui->stepLabel->text();
|
||||
|
||||
QString tmp("Send json files to dc-hardware ");
|
||||
int len = m_showLineLength - tmp.length();
|
||||
while (--len > 0) {
|
||||
tmp += " ";
|
||||
}
|
||||
|
||||
s += QString("%1 <font color='Green'>[OK ]</font><br />").arg(tmp);
|
||||
|
||||
ui->stepLabel->setText(s);
|
||||
}
|
||||
|
||||
void MainWindow::onShowDcDownload(QString version) {
|
||||
m_targetDcVersion = version;
|
||||
ui->exit->setEnabled(false);
|
||||
ui->stepLabel->setText(QString("Device controller update. Target version: %1").arg(version).leftJustified(m_width-3));
|
||||
|
||||
// test
|
||||
onShowISMASChecks("");
|
||||
onShowTariffUpdate("");
|
||||
onShowJsonDownload("");
|
||||
|
||||
QString s = ui->stepLabel->text();
|
||||
|
||||
QString tmp("Send dc-firmware to dc-hardware ");
|
||||
int len = m_showLineLength - tmp.length();
|
||||
while (--len > 0) {
|
||||
tmp += " ";
|
||||
}
|
||||
|
||||
s += QString("%1 <font color='#33FF50'>[OK ]</font> (%2)").arg(tmp).arg(version);
|
||||
|
||||
ui->stepLabel->setText(s);
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow() {
|
||||
|
Reference in New Issue
Block a user