34 lines
738 B
C++
34 lines
738 B
C++
#ifndef SCHEMEEDITOR_GENERIC_DIALOG_H
|
|
#define SCHEMEEDITOR_GENERIC_DIALOG_H
|
|
|
|
#include <QDialog>
|
|
#include <QWidget>
|
|
#include <QPushButton>
|
|
|
|
#include <optional>
|
|
|
|
namespace display {
|
|
|
|
class GenericDialog: public QDialog {
|
|
public:
|
|
|
|
explicit GenericDialog(std::string title,
|
|
std::optional<std::string> action = "msg_dialog_actions_update",
|
|
std::string cancel = "msg_dialog_actions_cancel");
|
|
|
|
protected:
|
|
void setOkButtonDisabled(bool disabled);
|
|
virtual bool onUpdate() = 0;
|
|
|
|
private:
|
|
QPushButton *okButton;
|
|
QPushButton *cancelButton;
|
|
|
|
protected:
|
|
QWidget *content;
|
|
};
|
|
|
|
}
|
|
|
|
#endif //SCHEMEEDITOR_GENERIC_DIALOG_H
|