MessageDialog.h 685 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef MESSAGEDIALOG_H
  2. #define MESSAGEDIALOG_H
  3. #include "MaskDialogBase.h"
  4. #include <QLabel>
  5. #include <QPushButton>
  6. class MessageDialog : public MaskDialogBase
  7. {
  8. Q_OBJECT
  9. public:
  10. explicit MessageDialog(const QString &title, const QString &content, QWidget *parent = nullptr);
  11. private:
  12. void initWidget();
  13. void initLayout();
  14. void setQss();
  15. private slots:
  16. void onCancelButtonClicked();
  17. void onYesButtonClicked();
  18. signals:
  19. void yesSignal();
  20. void cancelSignal();
  21. private:
  22. QString m_content;
  23. QLabel *m_titleLabel;
  24. QLabel *m_contentLabel;
  25. QPushButton *m_yesButton;
  26. QPushButton *m_cancelButton;
  27. };
  28. #endif // MESSAGEDIALOG_H