| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 | 
							- #ifndef WARNING_H
 
- #define WARNING_H
 
- #include <QDialog>
 
- class OneShadow;
 
- namespace Ui {
 
- class Warning;
 
- }
 
- class Warning : public QDialog
 
- {
 
-     Q_OBJECT
 
- public:
 
-     explicit Warning(QWidget *parent = nullptr);
 
-     ~Warning();
 
-     void setText(const QString& text);
 
-     void setTextWithOneButton(const QString& text);     /* 只有一个确定按钮 */
 
-     bool isOk() const { return m_isOk; }
 
-     /* 设置QSS */
 
-     void setQSS(const QString& qssPath);
 
- signals:
 
-     void signal_ok();
 
- protected:
 
-     // void paintEvent(QPaintEvent *event) override;
 
-     /* 事件过滤器 */
 
-     bool eventFilter(QObject *watched, QEvent *event) override;
 
-     /* 鼠标点击事件 */
 
-     void mousePressEvent(QMouseEvent *event) override;
 
-     /* 鼠标移动事件 */
 
-     void mouseMoveEvent(QMouseEvent *event) override;
 
-     /* 鼠标释放事件 */
 
-     void mouseReleaseEvent(QMouseEvent *event) override;
 
- private slots:
 
-     void do_ok();
 
- private:
 
-     /* 重新设置显示文字的区域大小 */
 
-     void resetLabelSize();
 
-     /* 移动警告图标 */
 
-     void moveWarnICON();
 
- private:
 
-     Ui::Warning *ui;
 
-     // OneShadow* m_shadow = nullptr;
 
-     const int SHADOW_W = 16;                /* 阴影的大小 */
 
-     bool m_isOk = false;
 
-     QPoint m_lastPos;
 
- };
 
- #endif // WARNING_H
 
 
  |