Diffstat (limited to 'noncore/settings/sysinfo/devicesinfo.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sysinfo/devicesinfo.h | 66 |
1 files changed, 56 insertions, 10 deletions
diff --git a/noncore/settings/sysinfo/devicesinfo.h b/noncore/settings/sysinfo/devicesinfo.h index b065f40..586d204 100644 --- a/noncore/settings/sysinfo/devicesinfo.h +++ b/noncore/settings/sysinfo/devicesinfo.h | |||
@@ -32,12 +32,13 @@ _;:, .> :=|. This program is free software; you can | |||
32 | /* OPIE */ | 32 | /* OPIE */ |
33 | #include <opie2/olistview.h> | 33 | #include <opie2/olistview.h> |
34 | #include <opie2/olayout.h> | 34 | #include <opie2/olayout.h> |
35 | 35 | ||
36 | /* QT */ | 36 | /* QT */ |
37 | #include <qwidget.h> | 37 | #include <qwidget.h> |
38 | #include <qwidgetstack.h> | ||
38 | 39 | ||
39 | //================================================================================================= | 40 | //================================================================================================= |
40 | class DevicesView : public Opie::Ui::OListView | 41 | class DevicesView : public Opie::Ui::OListView |
41 | { | 42 | { |
42 | Q_OBJECT | 43 | Q_OBJECT |
43 | public: | 44 | public: |
@@ -58,12 +59,13 @@ public: | |||
58 | void setDetailsWidget( QWidget* w = 0 ); | 59 | void setDetailsWidget( QWidget* w = 0 ); |
59 | 60 | ||
60 | private: | 61 | private: |
61 | Opie::Ui::OAutoBoxLayout* layout; | 62 | Opie::Ui::OAutoBoxLayout* layout; |
62 | Opie::Ui::OListView* view; | 63 | Opie::Ui::OListView* view; |
63 | QWidget* details; | 64 | QWidget* details; |
65 | QWidgetStack* stack; | ||
64 | private slots: | 66 | private slots: |
65 | }; | 67 | }; |
66 | 68 | ||
67 | //================================================================================================= | 69 | //================================================================================================= |
68 | class Category : public Opie::Ui::OListViewItem | 70 | class Category : public Opie::Ui::OListViewItem |
69 | { | 71 | { |
@@ -72,22 +74,12 @@ public: | |||
72 | virtual ~Category(); | 74 | virtual ~Category(); |
73 | 75 | ||
74 | virtual void populate() = 0; | 76 | virtual void populate() = 0; |
75 | }; | 77 | }; |
76 | 78 | ||
77 | //================================================================================================= | 79 | //================================================================================================= |
78 | class Device : public Opie::Ui::OListViewItem | ||
79 | { | ||
80 | public: | ||
81 | Device( Category* parent, const QString& name ); | ||
82 | ~Device(); | ||
83 | |||
84 | QWidget* detailsWidget(); | ||
85 | }; | ||
86 | |||
87 | //================================================================================================= | ||
88 | class CpuCategory : public Category | 80 | class CpuCategory : public Category |
89 | { | 81 | { |
90 | public: | 82 | public: |
91 | CpuCategory( DevicesView* parent ); | 83 | CpuCategory( DevicesView* parent ); |
92 | virtual ~CpuCategory(); | 84 | virtual ~CpuCategory(); |
93 | 85 | ||
@@ -121,8 +113,62 @@ public: | |||
121 | UsbCategory( DevicesView* parent ); | 113 | UsbCategory( DevicesView* parent ); |
122 | virtual ~UsbCategory(); | 114 | virtual ~UsbCategory(); |
123 | 115 | ||
124 | virtual void populate(); | 116 | virtual void populate(); |
125 | }; | 117 | }; |
126 | 118 | ||
119 | //================================================================================================= | ||
120 | class Device : public Opie::Ui::OListViewItem | ||
121 | { | ||
122 | public: | ||
123 | Device( Category* parent, const QString& name ); | ||
124 | ~Device(); | ||
125 | |||
126 | QWidget* devinfo; | ||
127 | QWidget* details; | ||
128 | |||
129 | virtual QWidget* detailsWidget(); | ||
130 | }; | ||
131 | |||
132 | //================================================================================================= | ||
133 | class CpuDevice : public Device | ||
134 | { | ||
135 | public: | ||
136 | CpuDevice( Category* parent, const QString& name ); | ||
137 | ~CpuDevice(); | ||
138 | |||
139 | void addInfo( const QString& line ); | ||
140 | |||
141 | // virtual QWidget* detailsWidget(); | ||
142 | }; | ||
143 | |||
144 | //================================================================================================= | ||
145 | class InputDevice : public Device | ||
146 | { | ||
147 | public: | ||
148 | InputDevice( Category* parent, const QString& name ); | ||
149 | ~InputDevice(); | ||
150 | |||
151 | // virtual QWidget* detailsWidget(); | ||
152 | }; | ||
153 | |||
154 | //================================================================================================= | ||
155 | class CardDevice : public Device | ||
156 | { | ||
157 | public: | ||
158 | CardDevice( Category* parent, const QString& name ); | ||
159 | ~CardDevice(); | ||
160 | |||
161 | // virtual QWidget* detailsWidget(); | ||
162 | }; | ||
163 | |||
164 | //================================================================================================= | ||
165 | class UsbDevice : public Device | ||
166 | { | ||
167 | public: | ||
168 | UsbDevice( Category* parent, const QString& name ); | ||
169 | ~UsbDevice(); | ||
170 | |||
171 | // virtual QWidget* detailsWidget(); | ||
172 | }; | ||
127 | 173 | ||
128 | #endif | 174 | #endif |