17#ifndef MESSAGEDIALOG_H
18#define MESSAGEDIALOG_H
22class MessageDialog :
public QObject
25 Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
26 Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
27 Q_PROPERTY(
int buttons READ buttons WRITE setButtons NOTIFY buttonsChanged)
30 enum StandardButtons {
32 Yes = QMessageBox::Yes,
34 Cancel = QMessageBox::Cancel
36 Q_ENUM(StandardButtons)
37 explicit MessageDialog(QObject *parent =
nullptr);
39 Q_INVOKABLE
void open();
42 void titleChanged(
const QString &title);
43 void textChanged(
const QString &text);
44 void buttonsChanged(
int buttons);
57 void setTitle(
const QString &title);
62 void setText(
const QString &text);
67 void setButtons(
int buttons);