Diffstat (limited to 'noncore/settings/sysinfo/storage.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sysinfo/storage.h | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/noncore/settings/sysinfo/storage.h b/noncore/settings/sysinfo/storage.h index 7e8b4e0..b8564af 100644 --- a/noncore/settings/sysinfo/storage.h +++ b/noncore/settings/sysinfo/storage.h | |||
@@ -21,69 +21,59 @@ | |||
21 | #include <qframe.h> | 21 | #include <qframe.h> |
22 | #include <qlist.h> | 22 | #include <qlist.h> |
23 | #include <qdict.h> | 23 | #include <qdict.h> |
24 | 24 | ||
25 | class QLabel; | 25 | class QLabel; |
26 | class GraphData; | 26 | class GraphData; |
27 | class Graph; | 27 | class Graph; |
28 | class GraphLegend; | 28 | class GraphLegend; |
29 | class FileSystem; | 29 | class FileSystem; |
30 | class MountInfo; | 30 | class MountInfo; |
31 | class QVBoxLayout; | 31 | class QVBoxLayout; |
32 | class QWidget; | 32 | class QWidget; |
33 | class StorageInfo; | ||
33 | 34 | ||
34 | 35 | ||
35 | class StorageInfo : public QWidget | 36 | class FileSysInfo : public QWidget |
36 | { | 37 | { |
37 | Q_OBJECT | 38 | Q_OBJECT |
38 | public: | 39 | public: |
39 | StorageInfo( QWidget *parent=0, const char *name=0 ); | 40 | FileSysInfo( QWidget *parent=0, const char *name=0 ); |
40 | 41 | ||
41 | protected: | 42 | protected: |
42 | void timerEvent(QTimerEvent*); | 43 | void timerEvent(QTimerEvent*); |
43 | 44 | ||
44 | private: | 45 | private: |
45 | void updateMounts(); | 46 | void updateMounts(); |
46 | QDict<MountInfo> disks; | 47 | |
47 | QList<QFrame> lines; | 48 | QWidget *container; |
48 | QVBoxLayout *vb; | 49 | QVBoxLayout *vb; |
49 | QWidget *container; | 50 | |
51 | StorageInfo *storage; | ||
52 | QDict<MountInfo> disks; | ||
53 | QList<QFrame> lines; | ||
54 | |||
55 | bool rebuildDisks; | ||
56 | |||
57 | private slots: | ||
58 | void disksChanged(); | ||
50 | }; | 59 | }; |
51 | 60 | ||
52 | class MountInfo : public QWidget | 61 | class MountInfo : public QWidget |
53 | { | 62 | { |
54 | Q_OBJECT | 63 | Q_OBJECT |
55 | public: | 64 | public: |
56 | MountInfo( const QString &path, const QString &ttl, QWidget *parent=0, const char *name=0 ); | 65 | MountInfo( FileSystem *filesys=0, QWidget *parent=0, const char *name=0 ); |
57 | ~MountInfo(); | 66 | ~MountInfo(); |
58 | 67 | ||
59 | void updateData(); | 68 | void updateData(); |
69 | |||
70 | FileSystem *fs; | ||
60 | 71 | ||
61 | private: | 72 | private: |
62 | QString title; | 73 | QString title; |
63 | FileSystem *fs; | ||
64 | QLabel *totalSize; | 74 | QLabel *totalSize; |
65 | GraphData *data; | 75 | GraphData *data; |
66 | Graph *graph; | 76 | Graph *graph; |
67 | GraphLegend *legend; | 77 | GraphLegend *legend; |
68 | }; | 78 | }; |
69 | 79 | ||
70 | class FileSystem | ||
71 | { | ||
72 | public: | ||
73 | FileSystem( const QString &p ); | ||
74 | |||
75 | void update(); | ||
76 | |||
77 | const QString &path() const { return fspath; } | ||
78 | long blockSize() const { return blkSize; } | ||
79 | long totalBlocks() const { return totalBlks; } | ||
80 | long availBlocks() const { return availBlks; } | ||
81 | |||
82 | private: | ||
83 | QString fspath; | ||
84 | long blkSize; | ||
85 | long totalBlks; | ||
86 | long availBlks; | ||
87 | }; | ||
88 | |||
89 | |||