feat:初始化wuhan_QT界面代码

This commit is contained in:
xu
2026-09-09 17:00:37 +08:00
commit 40473ad10b
537 changed files with 23934 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
#ifndef TITLEBAR_H
#define TITLEBAR_H
#include <QWidget>
#include <QTimer>
class QLabel;
class QPushButton;
class AppContext;
class LedIndicator;
// ===================== 顶条组件(高 98px) =====================
// 左侧“通信状态:●正常/异常”,中央页面标题,右侧时间 + 软急停按钮
class TitleBar : public QWidget
{
Q_OBJECT
public:
explicit TitleBar(AppContext* ctx, QWidget* parent = nullptr);
void setTitle(const QString& title);
void setEstopVisible(bool visible);
private slots:
void updateEstop();
void updateTime();
private:
AppContext* m_ctx;
LedIndicator* m_comm;
QLabel* m_title = nullptr;
QLabel* m_time = nullptr;
QPushButton* m_estop = nullptr;
QTimer* m_clock = nullptr;
};
#endif // TITLEBAR_H