]> cloud.milkyroute.net Git - dolphin.git/blob - src/statusbar/spaceinfoobserver.h
Remove unused includes
[dolphin.git] / src / statusbar / spaceinfoobserver.h
1 /*
2 * SPDX-FileCopyrightText: 2014 Frank Reininghaus <frank78ac@googlemail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7 #ifndef SPACEINFOOBSERVER_H
8 #define SPACEINFOOBSERVER_H
9
10 #include <QObject>
11
12 class QUrl;
13 class MountPointObserver;
14
15 class SpaceInfoObserver : public QObject
16 {
17 Q_OBJECT
18
19 public:
20 explicit SpaceInfoObserver(const QUrl& url, QObject* parent = nullptr);
21 ~SpaceInfoObserver() override;
22
23 quint64 size() const;
24 quint64 available() const;
25
26 void setUrl(const QUrl& url);
27
28 public Q_SLOTS:
29 void update();
30
31 Q_SIGNALS:
32 /**
33 * This signal is emitted when the size or available space changes.
34 */
35 void valuesChanged();
36
37 private Q_SLOTS:
38 void spaceInfoChanged(quint64 size, quint64 available);
39
40 private:
41 MountPointObserver* m_mountPointObserver;
42
43 bool m_hasData;
44 quint64 m_dataSize;
45 quint64 m_dataAvailable;
46 };
47
48 #endif