mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
37 lines
819 B
C++
37 lines
819 B
C++
// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd.
|
|
//
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
#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
|