summaryrefslogtreecommitdiff
path: root/noncore/settings/sysinfo/storage.h
authordrw <drw>2003-03-27 01:52:50 (UTC)
committer drw <drw>2003-03-27 01:52:50 (UTC)
commit0fc0190f424cf7e05f82a5c506db74c1e7f98e3b (patch) (unidiff)
treeb74eaef3196d6a29163e81ddbf7e7ed60486cc14 /noncore/settings/sysinfo/storage.h
parent2196cc8e860a470796fdff12a1690818644d5a43 (diff)
downloadopie-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) (show whitespace changes)
-rw-r--r--noncore/settings/sysinfo/storage.h42
1 files changed, 16 insertions, 26 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;
30class MountInfo; 30class MountInfo;
31class QVBoxLayout; 31class QVBoxLayout;
32class QWidget; 32class QWidget;
33class StorageInfo;
33 34
34 35
35class StorageInfo : public QWidget 36class FileSysInfo : public QWidget
36{ 37{
37 Q_OBJECT 38 Q_OBJECT
38public: 39public:
39 StorageInfo( QWidget *parent=0, const char *name=0 ); 40 FileSysInfo( QWidget *parent=0, const char *name=0 );
40 41
41protected: 42protected:
42 void timerEvent(QTimerEvent*); 43 void timerEvent(QTimerEvent*);
43 44
44private: 45private:
45 void updateMounts(); 46 void updateMounts();
47
48 QWidget *container;
49 QVBoxLayout *vb;
50
51 StorageInfo *storage;
46 QDict<MountInfo> disks; 52 QDict<MountInfo> disks;
47 QList<QFrame> lines; 53 QList<QFrame> lines;
48 QVBoxLayout *vb; 54
49 QWidget *container; 55 bool rebuildDisks;
56
57private slots:
58 void disksChanged();
50}; 59};
51 60
52class MountInfo : public QWidget 61class MountInfo : public QWidget
53{ 62{
54 Q_OBJECT 63 Q_OBJECT
55public: 64public:
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();
60 69
70 FileSystem *fs;
71
61private: 72private:
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
70class FileSystem
71{
72public:
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
82private:
83 QString fspath;
84 long blkSize;
85 long totalBlks;
86 long availBlks;
87};
88
89