UpdatePTUDevCtrl/mainwindow.h
Gerhard Hoffmann 1fd2269753 onAppendText() only appends text.
onReplaceLast() replaces the last line in the text edit window.
2023-08-06 14:14:47 +02:00

43 lines
829 B
C++

#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QTimer>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
#include "worker.h"
class MainWindow : public QMainWindow {
Q_OBJECT
protected:
void customEvent(QEvent *event) override;
public:
MainWindow(Worker *worker, QWidget *parent = nullptr);
~MainWindow();
public slots:
void onAppendText(QString, QString suffix = "");
void onReplaceLast(QString, QString);
void onShowErrorMessage(QString, QString);
void onStopStartTimer();
void onRestartExitTimer();
void onEnableExit();
void onDisableExit();
private slots:
void onQuit();
private:
Ui::MainWindow *ui;
Worker *m_worker;
int m_width;
QTimer *m_startTimer;
QTimer *m_exitTimer;
};
#endif // MAINWINDOW_H