#ifndef ALARMBANNER_H #define ALARMBANNER_H #include class QLabel; // ===================== 告警横幅 ===================== // 整行红色文字,500ms 闪烁;showAlarm 显示,clear 隐藏 class AlarmBanner : public QWidget { Q_OBJECT public: explicit AlarmBanner(QWidget* parent = nullptr); void showAlarm(const QString& text); void clear(); private: QLabel* m_label = nullptr; }; #endif // ALARMBANNER_H