Add a GUIMessageDialog class.

This commit is contained in:
Krad
2021-10-13 17:39:37 +08:00
parent 72b6469670
commit 79a79bf932
3 changed files with 212 additions and 0 deletions

30
src/guimessagedialog.h Normal file
View File

@@ -0,0 +1,30 @@
#ifndef GUIMESSAGEDIALOG_H
#define GUIMESSAGEDIALOG_H
#include <QDialog>
#include <QList>
namespace Ui {
class GUIMessageDialog;
}
class GUIMessageDialog : public QDialog
{
Q_OBJECT
public:
explicit GUIMessageDialog(QWidget *parent = nullptr);
~GUIMessageDialog();
void showMessage(QString msg);
void showExitButton();
void startLoading();
void stopLoading();
protected:
void timerEvent(QTimerEvent* event) override ;
private:
Ui::GUIMessageDialog *ui;
QList<QString> frame;
int frameIndex=0;
int timerID = -1;
};
#endif // GUIMESSAGEDIALOG_H