#pragma once #include #include #include #include #include #include #include class CDialog : public QObject { Q_OBJECT; QML_NAMED_ELEMENT(Dialog); QML_SINGLETON; Q_PROPERTY(QString dialogTitle MEMBER title CONSTANT); Q_PROPERTY(QString dialogText MEMBER text CONSTANT); Q_PROPERTY(QVector dialogButtons MEMBER buttons CONSTANT); public: explicit CDialog(QObject* parent = nullptr); QString title, text; QVector buttons; Q_INVOKABLE void onButtonPress(QString buttonName = ""); };