12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- #ifndef QUERYDIALOG_H
- #define QUERYDIALOG_H
- #include <QMessageBox>
- #include <QPixmap>
- class QueryDialog : public QObject
- {
- Q_OBJECT
- Q_CLASSINFO("Author", "Sebastiano Galazzo")
- Q_CLASSINFO("Email", "sebastiano.galazzo@gmail.com")
- Q_PROPERTY(QString message READ text WRITE setText)
- Q_PROPERTY(QString titleText READ titleText WRITE setTitleText)
- Q_PROPERTY(QString icon READ icon WRITE setIcon)
- Q_PROPERTY(QString acceptButtonText READ acceptButtonText WRITE setAcceptButtonText)
- Q_PROPERTY(QString rejectButtonText READ rejectButtonText WRITE setRejectButtonText)
- public:
- explicit QueryDialog(QObject *parent = 0);
-
- QString text();
- void setText(QString);
- QString titleText();
- void setTitleText(QString);
- QString icon();
- void setIcon(QString);
- QString acceptButtonText();
- void setAcceptButtonText(QString);
- QString rejectButtonText();
- void setRejectButtonText(QString);
- signals:
- void accepted();
- void rejected();
- public slots:
- void open();
- private:
- QString m_message;
- QString m_titleText;
- QString m_icon_path;
- QString m_acceptButtonText;
- QString m_rejectButtonText;
- QPixmap m_icon;
- QMessageBox mbox;
- };
- #endif // QUERYDIALOG_H
|