1234567891011121314151617181920212223242526272829303132333435 |
- #ifndef CUSTOMMESSAGEDLG_H
- #define CUSTOMMESSAGEDLG_H
- #include <QDialog>
- #include <QMouseEvent>
- namespace Ui {
- class CustomMessageDlg;
- }
- class CustomMessageDlg : public QDialog
- {
- Q_OBJECT
- public:
- explicit CustomMessageDlg(QWidget *parent = nullptr);
- ~CustomMessageDlg();
- protected:
- void mousePressEvent(QMouseEvent* event) override;
- void mouseMoveEvent(QMouseEvent* event) override;
- public slots:
- void on_tCloseBut_clicked();
- void on_closeBut_clicked();
- private:
- Ui::CustomMessageDlg *ui;
- QPoint m_dragPosition={};
- bool m_isTitleBarClicked = false;
- };
- #endif // CUSTOMMESSAGEDLG_H
|