donghualin 73ad24a682 test: 测试插件适配新的任务栏插件接口
在homemonitor插件中新增插件新的接口,匹配新的任务栏插件

Log:
Influence: 无
Task: https://pms.uniontech.com/task-view-110309.html
Change-Id: Idd9907d55b839939d52121934bd5c28ea349392c
2022-05-25 10:59:16 +08:00

33 lines
690 B
C++

#ifndef INFORMATIONWIDGET_H
#define INFORMATIONWIDGET_H
#include <QWidget>
#include <QLabel>
#include <QTimer>
#include <QStorageInfo>
class InformationWidget : public QWidget
{
Q_OBJECT
public:
explicit InformationWidget(QWidget *parent = nullptr);
inline QStorageInfo * storageInfo() { return m_storageInfo; }
const QString textContent() const;
private slots:
// 用于更新数据的槽函数
void refreshInfo();
private:
// 真正的数据显示在这个 Label 上
QLabel *m_infoLabel;
// 处理时间间隔的计时器
QTimer *m_refreshTimer;
// 分区数据的来源
QStorageInfo *m_storageInfo;
};
#endif // INFORMATIONWIDGET_H