29 lines
634 B
C++
29 lines
634 B
C++
//
|
|
// Created by Krad on 2021/11/10.
|
|
//
|
|
|
|
#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;
|
|
};
|
|
|
|
|
|
#endif //GUI_GUIFORMBASEDIALOG_H
|