feat:初始化wuhan_QT界面代码
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user