Files
BeetRound/UIs/BeetRoundWidgets/dialogs/abstractdialog.h

34 lines
665 B
C++

#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