Initial commit based on GenericQtClient v0.3.0
This commit is contained in:
33
UIs/GenericWidgets/dialogs/abstractdialog.h
Normal file
33
UIs/GenericWidgets/dialogs/abstractdialog.h
Normal file
@ -0,0 +1,33 @@
|
||||
#ifndef ABSTRACTDIALOG_H
|
||||
#define ABSTRACTDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QDialogButtonBox>
|
||||
|
||||
class QGridLayout;
|
||||
class QVBoxLayout;
|
||||
|
||||
class AbstractDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
AbstractDialog(QDialogButtonBox::StandardButtons buttons, QWidget* parent = nullptr);
|
||||
virtual void createContent() = 0;
|
||||
|
||||
/// QDialog interface
|
||||
public slots:
|
||||
void show();
|
||||
void accept() override;
|
||||
void reject() override;
|
||||
|
||||
protected:
|
||||
void centerInParent();
|
||||
|
||||
protected:
|
||||
QWidget* m_contentContainer;
|
||||
QVBoxLayout* m_outerLayout;
|
||||
QDialogButtonBox* m_buttonBox = nullptr;
|
||||
|
||||
void closeEvent(QCloseEvent* event) override;
|
||||
};
|
||||
|
||||
#endif // ABSTRACTDIALOG_H
|
||||
Reference in New Issue
Block a user