Removed buttons reserved for future use.
Start application automatically, not via Start-Button.
This commit is contained in:
parent
5db7b4224e
commit
5f1376cf1e
@ -32,15 +32,9 @@ MainWindow::MainWindow(Worker *worker, QWidget *parent)
|
|||||||
ui->updateStatus->setText(lst.join('\n'));
|
ui->updateStatus->setText(lst.join('\n'));
|
||||||
ui->updateStatus->setEnabled(true);
|
ui->updateStatus->setEnabled(true);
|
||||||
|
|
||||||
ui->reserved_1->setVisible(false);
|
|
||||||
ui->reserved_2->setVisible(false);
|
|
||||||
ui->reserved_3->setVisible(false);
|
|
||||||
ui->reserved_4->setVisible(false);
|
|
||||||
ui->reserved_5->setVisible(false);
|
|
||||||
ui->reserved_6->setVisible(false);
|
|
||||||
|
|
||||||
m_startTimer = new QTimer(this);
|
m_startTimer = new QTimer(this);
|
||||||
connect(m_startTimer, SIGNAL(timeout()), ui->start, SLOT(click()));
|
// connect(m_startTimer, SIGNAL(timeout()), ui->start, SLOT(click()));
|
||||||
|
connect(m_startTimer, SIGNAL(timeout()), m_worker, SLOT(update()));
|
||||||
m_startTimer->setSingleShot(true);
|
m_startTimer->setSingleShot(true);
|
||||||
m_startTimer->start(5 * 1000);
|
m_startTimer->start(5 * 1000);
|
||||||
|
|
||||||
@ -49,9 +43,6 @@ MainWindow::MainWindow(Worker *worker, QWidget *parent)
|
|||||||
m_exitTimer->setSingleShot(true);
|
m_exitTimer->setSingleShot(true);
|
||||||
m_exitTimer->start(1800 * 1000);
|
m_exitTimer->start(1800 * 1000);
|
||||||
|
|
||||||
connect(m_startTimer, SIGNAL(timeout()), ui->start, SLOT(click()));
|
|
||||||
connect(m_exitTimer, SIGNAL(timeout()), ui->exit, SLOT(click()));
|
|
||||||
connect(ui->start, SIGNAL(clicked()), m_worker, SLOT(update()));
|
|
||||||
connect(ui->exit, SIGNAL(clicked()), this, SLOT(onQuit()));
|
connect(ui->exit, SIGNAL(clicked()), this, SLOT(onQuit()));
|
||||||
connect(m_worker, SIGNAL(disableExit()), this, SLOT(onDisableExit()));
|
connect(m_worker, SIGNAL(disableExit()), this, SLOT(onDisableExit()));
|
||||||
connect(m_worker, SIGNAL(enableExit()), this, SLOT(onEnableExit()));
|
connect(m_worker, SIGNAL(enableExit()), this, SLOT(onEnableExit()));
|
||||||
@ -97,7 +88,7 @@ void MainWindow::customEvent(QEvent *event) {
|
|||||||
m_progressValue = progress;
|
m_progressValue = progress;
|
||||||
ui->updateProgress->setValue(progress/10);
|
ui->updateProgress->setValue(progress/10);
|
||||||
QApplication::postEvent(this, new ProgressEvent(this, progress+10));
|
QApplication::postEvent(this, new ProgressEvent(this, progress+10));
|
||||||
QThread::msleep(150);
|
QThread::msleep(100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -136,7 +127,7 @@ void MainWindow::onEnableExit() {
|
|||||||
|
|
||||||
void MainWindow::onRestartExitTimer() {
|
void MainWindow::onRestartExitTimer() {
|
||||||
m_exitTimer->stop();
|
m_exitTimer->stop();
|
||||||
m_exitTimer->start(10 * 1000);
|
m_exitTimer->start(60 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onQuit() {
|
void MainWindow::onQuit() {
|
||||||
@ -158,7 +149,7 @@ void MainWindow::onAppendText(QString text, QString suffix) {
|
|||||||
editText += text.leftJustified(m_width-9);
|
editText += text.leftJustified(m_width-9);
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList lines = editText.split('\n');
|
QStringList const lines = editText.split('\n');
|
||||||
for (int i=0; i<lines.size(); ++i) {
|
for (int i=0; i<lines.size(); ++i) {
|
||||||
qInfo() << lines.at(i);
|
qInfo() << lines.at(i);
|
||||||
} qInfo() << ""; qInfo() << "";
|
} qInfo() << ""; qInfo() << "";
|
||||||
|
Loading…
Reference in New Issue
Block a user