2023-07-31 16:55:36 +02:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
2023-08-02 15:29:10 +02:00
|
|
|
#include <QTimer>
|
2023-07-31 16:55:36 +02:00
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
namespace Ui { class MainWindow; }
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
2023-08-02 15:29:10 +02:00
|
|
|
#include "worker.h"
|
|
|
|
|
2023-07-31 16:55:36 +02:00
|
|
|
class MainWindow : public QMainWindow {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
MainWindow(Worker *worker, QWidget *parent = nullptr);
|
|
|
|
~MainWindow();
|
|
|
|
|
2023-08-02 15:29:10 +02:00
|
|
|
public slots:
|
|
|
|
void onAppendText(QString, QString);
|
|
|
|
void onShowErrorMessage(QString, QString);
|
|
|
|
void onSetProgress(quint8);
|
|
|
|
void onStopStartTimer();
|
|
|
|
void onRestartExitTimer();
|
2023-08-02 17:51:35 +02:00
|
|
|
void onEnableExit();
|
|
|
|
void onDisableExit();
|
2023-08-02 15:29:10 +02:00
|
|
|
|
2023-07-31 16:55:36 +02:00
|
|
|
private slots:
|
2023-08-02 15:29:10 +02:00
|
|
|
void onQuit();
|
2023-07-31 16:55:36 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::MainWindow *ui;
|
|
|
|
Worker *m_worker;
|
2023-08-02 15:29:10 +02:00
|
|
|
int m_width;
|
|
|
|
QTimer *m_startTimer;
|
|
|
|
QTimer *m_exitTimer;
|
2023-07-31 16:55:36 +02:00
|
|
|
};
|
|
|
|
#endif // MAINWINDOW_H
|