DAWorkbench 0.0.1
DAWorkbench API
载入中...
搜索中...
未找到
DAStatusBarWidget.h
1#ifndef DASTATUSBARWIDGET_H
2#define DASTATUSBARWIDGET_H
3#include "DAGuiAPI.h"
4#include <QWidget>
5#include <QLabel>
6#include <QProgressBar>
7#include <QTimer>
8#include <QHBoxLayout>
9#include <QPropertyAnimation>
10namespace DA
11{
12
16class DAGUI_API DAStatusBarWidget : public QWidget
17{
18 Q_OBJECT
19 DA_DECLARE_PRIVATE(DAStatusBarWidget)
20public:
21 explicit DAStatusBarWidget(QWidget* parent = nullptr);
23 // 消息窗口相关方法
24 void showMessage(const QString& message, int timeout = 15000);
25 void clearMessage();
26 // 进度窗口相关方法
27 void showProgressBar();
28 void hideProgressBar();
29 // 设置进度0-100
30 void setProgress(int value);
31 // 繁忙状态
32 void setBusy(bool busy);
33 bool isBusy() const;
34 // 重置进度条
35 void resetProgress();
36 // 进度文本相关方法
37 void setProgressText(const QString& text);
38 void clearProgressText();
39 QString progressText() const;
40 // 获取当前状态
41 bool isProgressBarVisible() const;
42 QString getCurrentMessage() const;
43 // switch button的显示隐藏
44 void setSwitchButtonVisible(DA::DAWorkbenchFeatureType type, bool visible);
45 bool isSwitchButtonVisible(DA::DAWorkbenchFeatureType type) const;
46Q_SIGNALS:
47 void requestSwitch(DA::DAWorkbenchFeatureType type);
48
49protected:
50 void changeEvent(QEvent* event) override;
51
52private Q_SLOTS:
53 void onMessageTimeout();
54 void fadeOutMessage();
55
56private:
57 void startMessageTimer(int timeout);
58 void updateWidgetStyle();
59 void initConnect();
60};
61} // end DA
62#endif // DASTATUSBARWIDGET_H
状态栏窗口
Definition DAStatusBarWidget.h:17
序列化类都是带异常的,使用中需要处理异常
Definition AppMainWindow.cpp:44
DAWorkbenchFeatureType
工作台区域类型
Definition DAGlobals.h:325