1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #ifndef POPMSGBOX_H
- #define POPMSGBOX_H
- #include <QDialog>
- #include <QTimer>
- namespace Ui {
- class popMsgBox;
- }
- enum class POP_MSG_BTN
- {
- pmb_yes = 1,
- pmb_yse_no
- };
- class popMsgBox : public QDialog
- {
- Q_OBJECT
- public:
- explicit popMsgBox(QWidget *parent = nullptr);
- ~popMsgBox();
- void setMsg(QString sMsg, QString sTitle);
- void initUI(POP_MSG_BTN btn);
-
- void setStayTime(int nStayTime);
- private slots:
- void on_btn_yes_clicked();
- void on_btn_no_clicked();
- private:
- Ui::popMsgBox *ui;
- std::shared_ptr<QTimer> m_timePtr;
- };
- extern int popMsg(QString sMsg, QString sTitle, QWidget *parent, POP_MSG_BTN btn = POP_MSG_BTN::pmb_yse_no, int nStayTime = 0);
- #endif // POPMSGBOX_H
|