mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00

在homemonitor插件中新增插件新的接口,匹配新的任务栏插件 Log: Influence: 无 Task: https://pms.uniontech.com/task-view-110309.html Change-Id: Idd9907d55b839939d52121934bd5c28ea349392c
33 lines
690 B
C++
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
|