awMsgBox.h 604 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef AWMSGBOX_H
  2. #define AWMSGBOX_H
  3. #include <QDialog>
  4. #include <mutex>
  5. namespace Ui {
  6. class awMsgBox;
  7. }
  8. #include <QTimer>
  9. class awMsgBox : public QDialog
  10. {
  11. Q_OBJECT
  12. public:
  13. explicit awMsgBox(QWidget *parent = nullptr);
  14. ~awMsgBox();
  15. void initUI();
  16. void setMsg(QString sMsg);
  17. static std::list< std::shared_ptr<awMsgBox>> vMsgList;
  18. static std::mutex msgMutex;
  19. private slots:
  20. void on_btn_awmb_close_clicked();
  21. private:
  22. Ui::awMsgBox *ui;
  23. std::shared_ptr<QTimer> m_pTimer;
  24. };
  25. extern void ShowMsg(QString sMsg, QWidget *parent = nullptr);
  26. #endif // AWMSGBOX_H