Alert Dialog

This commit is contained in:
Krad
2021-12-08 17:49:51 +08:00
parent 35570a7cb4
commit b40939ec6e
4 changed files with 85 additions and 4 deletions

View File

@@ -4,19 +4,24 @@
#ifndef GUI_GUIFORMBASEDIALOG_H
#define GUI_GUIFORMBASEDIALOG_H
enum DialogButtonMode
{
None,OkOnly,OkAndCancel
};
#include <QDialog>
class GUIFormBaseDialog: public QDialog {
Q_OBJECT
public:
explicit GUIFormBaseDialog(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
~GUIFormBaseDialog();
void setButtonMode(DialogButtonMode mode);
protected:
virtual bool updateReferenceData(){
return false;
};
QWidget* formWidget = nullptr;
QPushButton* btnCancel = nullptr;
QPushButton* btnOk = nullptr;
};