author | drw <drw> | 2003-03-27 01:52:50 (UTC) |
---|---|---|
committer | drw <drw> | 2003-03-27 01:52:50 (UTC) |
commit | 0fc0190f424cf7e05f82a5c506db74c1e7f98e3b (patch) (unidiff) | |
tree | b74eaef3196d6a29163e81ddbf7e7ed60486cc14 /noncore/settings/sysinfo/storage.h | |
parent | 2196cc8e860a470796fdff12a1690818644d5a43 (diff) | |
download | opie-0fc0190f424cf7e05f82a5c506db74c1e7f98e3b.zip opie-0fc0190f424cf7e05f82a5c506db74c1e7f98e3b.tar.gz opie-0fc0190f424cf7e05f82a5c506db74c1e7f98e3b.tar.bz2 |
Use libqpe's StorageInfo class for storage tab. This 1. reduces executable size by ~10% and 2. should now recognize MMC cards on iPaq's (can't verify myself, let me know if it doesn't work). Also added QScrollView on version tab so all info is visible when screen is landscape or input method is visible.
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 | |||
@@ -30,60 +30,50 @@ 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 | |||