-rw-r--r-- | noncore/settings/sysinfo/benchmarkinfo.cpp | 21 | ||||
-rw-r--r-- | noncore/settings/sysinfo/benchmarkinfo.h | 22 | ||||
-rw-r--r-- | noncore/settings/sysinfo/main.cpp | 1 | ||||
-rw-r--r-- | noncore/settings/sysinfo/modulesinfo.cpp | 10 | ||||
-rw-r--r-- | noncore/settings/sysinfo/modulesinfo.h | 10 | ||||
-rw-r--r-- | noncore/settings/sysinfo/processinfo.cpp | 11 | ||||
-rw-r--r-- | noncore/settings/sysinfo/processinfo.h | 10 | ||||
-rw-r--r-- | noncore/settings/sysinfo/sysinfo.cpp | 1 | ||||
-rw-r--r-- | noncore/settings/sysinfo/versioninfo.cpp | 2 |
9 files changed, 55 insertions, 33 deletions
diff --git a/noncore/settings/sysinfo/benchmarkinfo.cpp b/noncore/settings/sysinfo/benchmarkinfo.cpp index 3c2c15f..2a52b00 100644 --- a/noncore/settings/sysinfo/benchmarkinfo.cpp +++ b/noncore/settings/sysinfo/benchmarkinfo.cpp | |||
@@ -38,33 +38,36 @@ | |||
38 | #include <qlabel.h> | 38 | #include <qlabel.h> |
39 | #include <qlayout.h> | 39 | #include <qlayout.h> |
40 | #include <qpainter.h> | 40 | #include <qpainter.h> |
41 | #include <qpushbutton.h> | 41 | #include <qpushbutton.h> |
42 | #include <qtimer.h> | 42 | #include <qtimer.h> |
43 | #include <qwhatsthis.h> | 43 | #include <qwhatsthis.h> |
44 | 44 | ||
45 | /* STD */ | 45 | /* STD */ |
46 | #include <time.h> | 46 | #include <time.h> |
47 | #include <stdio.h> | 47 | #include <stdio.h> |
48 | #include <stdlib.h> | 48 | #include <stdlib.h> |
49 | #include <math.h> | 49 | #include <math.h> |
50 | #if defined (__GNUC__) && (__GNUC__ < 3) | 50 | #if defined (__GNUC__) && (__GNUC__ < 3) |
51 | extern double round(double); | 51 | extern double round(double); |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | using namespace Opie::Ui; | ||
55 | using namespace Opie::Core; | ||
54 | extern "C" | 56 | extern "C" |
57 | |||
55 | { | 58 | { |
56 | void BenchFFT( void ); | 59 | void BenchFFT( void ); |
57 | double dhry_main( int ); | 60 | double dhry_main( int ); |
58 | } | 61 | } |
59 | 62 | ||
60 | #define DHRYSTONE_RUNS 20000000 | 63 | #define DHRYSTONE_RUNS 20000000 |
61 | #define TEST_DURATION 3 | 64 | #define TEST_DURATION 3 |
62 | 65 | ||
63 | #define BUFF_SIZE 8192 | 66 | #define BUFF_SIZE 8192 |
64 | #define FILE_SIZE 1024 * 1024 // 1Mb | 67 | #define FILE_SIZE 1024 * 1024 // 1Mb |
65 | 68 | ||
66 | //=========================================================================== | 69 | //=========================================================================== |
67 | 70 | ||
68 | class BenchmarkPaintWidget : public QWidget | 71 | class BenchmarkPaintWidget : public QWidget |
69 | { | 72 | { |
70 | public: | 73 | public: |
@@ -162,38 +165,38 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags ) | |||
162 | 165 | ||
163 | 166 | ||
164 | BenchmarkInfo::~BenchmarkInfo() | 167 | BenchmarkInfo::~BenchmarkInfo() |
165 | {} | 168 | {} |
166 | 169 | ||
167 | 170 | ||
168 | void BenchmarkInfo::machineActivated( int index ) | 171 | void BenchmarkInfo::machineActivated( int index ) |
169 | { | 172 | { |
170 | QStringList* results = machines[ machineCombo->text( index ) ]; | 173 | QStringList* results = machines[ machineCombo->text( index ) ]; |
171 | if ( !results ) | 174 | if ( !results ) |
172 | { | 175 | { |
173 | qDebug( "sysinfo: no results available." ); | 176 | qDebug( "sysinfo: no results available." ); |
174 | return; | 177 | return; |
175 | } | 178 | } |
176 | QStringList::Iterator it = results->begin(); | 179 | QStringList::Iterator it = results->begin(); |
177 | test_alu->setText( 2, *(it++) ); | 180 | test_alu->setText( 2, *(it++) ); |
178 | test_fpu->setText( 2, *(it++) ); | 181 | test_fpu->setText( 2, *(it++) ); |
179 | test_txt->setText( 2, *(it++) ); | 182 | test_txt->setText( 2, *(it++) ); |
180 | test_gfx->setText( 2, *(it++) ); | 183 | test_gfx->setText( 2, *(it++) ); |
181 | test_ram->setText( 2, *(it++) ); | 184 | test_ram->setText( 2, *(it++) ); |
182 | test_sd->setText( 2, *(it++) ); | 185 | test_sd->setText( 2, *(it++) ); |
183 | test_cf->setText( 2, *(it++) ); | 186 | test_cf->setText( 2, *(it++) ); |
184 | } | 187 | } |
185 | 188 | ||
186 | 189 | ||
187 | void BenchmarkInfo::run() | 190 | void BenchmarkInfo::run() |
188 | { | 191 | { |
189 | startButton->setText( "> Don't touch! Running Tests! Don't touch! <" ); | 192 | startButton->setText( "> Don't touch! Running Tests! Don't touch! <" ); |
190 | qApp->processEvents(); | 193 | qApp->processEvents(); |
191 | QTime t; | 194 | QTime t; |
192 | 195 | ||
193 | if ( test_alu->isOn() ) | 196 | if ( test_alu->isOn() ) |
194 | { | 197 | { |
195 | int d = round( dhry_main( DHRYSTONE_RUNS ) ); | 198 | int d = round( dhry_main( DHRYSTONE_RUNS ) ); |
196 | test_alu->setText( 1, QString( "%1 dhrys" ).arg( QString::number( d ) ) ); | 199 | test_alu->setText( 1, QString( "%1 dhrys" ).arg( QString::number( d ) ) ); |
197 | test_alu->setOn( false ); | 200 | test_alu->setOn( false ); |
198 | } | 201 | } |
199 | 202 | ||
@@ -246,108 +249,108 @@ int BenchmarkInfo::textRendering( int seconds ) | |||
246 | t.start(); | 249 | t.start(); |
247 | int stop = t.elapsed() + seconds * 1000; | 250 | int stop = t.elapsed() + seconds * 1000; |
248 | 251 | ||
249 | int rr[] = { 255, 255, 255, 0, 0, 0, 0, 128, 128 }; | 252 | int rr[] = { 255, 255, 255, 0, 0, 0, 0, 128, 128 }; |
250 | int gg[] = { 0, 255, 0, 0, 255, 255, 0, 128, 128 }; | 253 | int gg[] = { 0, 255, 0, 0, 255, 255, 0, 128, 128 }; |
251 | int bb[] = { 0, 0, 255, 0, 0, 255, 255, 128, 0 }; | 254 | int bb[] = { 0, 0, 255, 0, 0, 255, 255, 128, 0 }; |
252 | const QString text( "Opie Benchmark Test" ); | 255 | const QString text( "Opie Benchmark Test" ); |
253 | 256 | ||
254 | int w = QApplication::desktop()->width(); | 257 | int w = QApplication::desktop()->width(); |
255 | int h = QApplication::desktop()->height(); | 258 | int h = QApplication::desktop()->height(); |
256 | 259 | ||
257 | srand( time( NULL ) ); | 260 | srand( time( NULL ) ); |
258 | 261 | ||
259 | BenchmarkPaintWidget bpw; | 262 | BenchmarkPaintWidget bpw; |
260 | 263 | ||
261 | int loops = 0; | 264 | int loops = 0; |
262 | 265 | ||
263 | while ( t.elapsed() < stop ) | 266 | while ( t.elapsed() < stop ) |
264 | { | 267 | { |
265 | int k = rand() % 9; | 268 | int k = rand() % 9; |
266 | int s = rand() % 100; | 269 | int s = rand() % 100; |
267 | bpw.p.setPen( QColor( rr[ k ], gg[ k ], bb[ k ] ) ); | 270 | bpw.p.setPen( QColor( rr[ k ], gg[ k ], bb[ k ] ) ); |
268 | bpw.p.setFont( QFont( "Vera", s ) ); | 271 | bpw.p.setFont( QFont( "Vera", s ) ); |
269 | bpw.p.drawText( rand() % w, rand() % h, text, text.length() ); | 272 | bpw.p.drawText( rand() % w, rand() % h, text, text.length() ); |
270 | ++loops; | 273 | ++loops; |
271 | } | 274 | } |
272 | 275 | ||
273 | return loops * text.length(); | 276 | return loops * text.length(); |
274 | } | 277 | } |
275 | 278 | ||
276 | int BenchmarkInfo::gfxRendering( int seconds ) | 279 | int BenchmarkInfo::gfxRendering( int seconds ) |
277 | { | 280 | { |
278 | int rr[] = { 255, 255, 255, 0, 0, 0, 0, 128, 128 }; | 281 | int rr[] = { 255, 255, 255, 0, 0, 0, 0, 128, 128 }; |
279 | int gg[] = { 0, 255, 0, 0, 255, 255, 0, 128, 128 }; | 282 | int gg[] = { 0, 255, 0, 0, 255, 255, 0, 128, 128 }; |
280 | int bb[] = { 0, 0, 255, 0, 0, 255, 255, 128, 0 }; | 283 | int bb[] = { 0, 0, 255, 0, 0, 255, 255, 128, 0 }; |
281 | 284 | ||
282 | int w = QApplication::desktop()->width(); | 285 | int w = QApplication::desktop()->width(); |
283 | int h = QApplication::desktop()->height(); | 286 | int h = QApplication::desktop()->height(); |
284 | 287 | ||
285 | srand( time( NULL ) ); | 288 | srand( time( NULL ) ); |
286 | 289 | ||
287 | BenchmarkPaintWidget bpw; | 290 | BenchmarkPaintWidget bpw; |
288 | 291 | ||
289 | QTime t; | 292 | QTime t; |
290 | t.start(); | 293 | t.start(); |
291 | int stop = t.elapsed() + seconds*1000; | 294 | int stop = t.elapsed() + seconds*1000; |
292 | int loops = 0; | 295 | int loops = 0; |
293 | 296 | ||
294 | while ( t.elapsed() < stop ) | 297 | while ( t.elapsed() < stop ) |
295 | { | 298 | { |
296 | int k = rand() % 9; | 299 | int k = rand() % 9; |
297 | bpw.p.setPen( QColor( rr[ k ], gg[ k ], bb[ k ] ) ); | 300 | bpw.p.setPen( QColor( rr[ k ], gg[ k ], bb[ k ] ) ); |
298 | bpw.p.drawLine( rand()%w, rand()%h, rand()%w, rand()%h ); | 301 | bpw.p.drawLine( rand()%w, rand()%h, rand()%w, rand()%h ); |
299 | ++loops; | 302 | ++loops; |
300 | } | 303 | } |
301 | 304 | ||
302 | t.restart(); | 305 | t.restart(); |
303 | stop = t.elapsed() + seconds*1000; | 306 | stop = t.elapsed() + seconds*1000; |
304 | 307 | ||
305 | while ( t.elapsed() < stop ) | 308 | while ( t.elapsed() < stop ) |
306 | { | 309 | { |
307 | int k = rand() % 9; | 310 | int k = rand() % 9; |
308 | bpw.p.setPen( QColor( rr[ k ], gg[ k ], bb[ k ] ) ); | 311 | bpw.p.setPen( QColor( rr[ k ], gg[ k ], bb[ k ] ) ); |
309 | bpw.p.drawArc( rand()%w, rand()%h, rand()%w, rand()%h, 360 * 16, 360 * 16 ); | 312 | bpw.p.drawArc( rand()%w, rand()%h, rand()%w, rand()%h, 360 * 16, 360 * 16 ); |
310 | ++loops; | 313 | ++loops; |
311 | } | 314 | } |
312 | 315 | ||
313 | QBrush br1; | 316 | QBrush br1; |
314 | br1.setStyle( SolidPattern ); | 317 | br1.setStyle( SolidPattern ); |
315 | t.restart(); | 318 | t.restart(); |
316 | stop = t.elapsed() + seconds*1000; | 319 | stop = t.elapsed() + seconds*1000; |
317 | 320 | ||
318 | while ( t.elapsed() < stop ) | 321 | while ( t.elapsed() < stop ) |
319 | { | 322 | { |
320 | int k = rand() % 9; | 323 | int k = rand() % 9; |
321 | br1.setColor( QColor( rr[ k ], gg[ k ], bb[ k ] ) ); | 324 | br1.setColor( QColor( rr[ k ], gg[ k ], bb[ k ] ) ); |
322 | bpw.p.fillRect( rand()%w, rand()%h, rand()%w, rand()%h, br1 ); | 325 | bpw.p.fillRect( rand()%w, rand()%h, rand()%w, rand()%h, br1 ); |
323 | ++loops; | 326 | ++loops; |
324 | } | 327 | } |
325 | 328 | ||
326 | QPixmap p = Resource::loadPixmap( "sysinfo/pattern" ); | 329 | QPixmap p = Resource::loadPixmap( "sysinfo/pattern" ); |
327 | t.restart(); | 330 | t.restart(); |
328 | stop = t.elapsed() + seconds*1000; | 331 | stop = t.elapsed() + seconds*1000; |
329 | 332 | ||
330 | while ( t.elapsed() < stop ) | 333 | while ( t.elapsed() < stop ) |
331 | { | 334 | { |
332 | bpw.p.drawPixmap( rand()%w, rand()%h, p ); | 335 | bpw.p.drawPixmap( rand()%w, rand()%h, p ); |
333 | ++loops; | 336 | ++loops; |
334 | } | 337 | } |
335 | 338 | ||
336 | return loops; | 339 | return loops; |
337 | 340 | ||
338 | } | 341 | } |
339 | 342 | ||
340 | void BenchmarkInfo::performFileTest( const QString& fname, OCheckListItem* item ) | 343 | void BenchmarkInfo::performFileTest( const QString& fname, OCheckListItem* item ) |
341 | { | 344 | { |
342 | QTime time; | 345 | QTime time; |
343 | time.start(); | 346 | time.start(); |
344 | if ( writeFile( fname ) && | 347 | if ( writeFile( fname ) && |
345 | readFile( fname ) ) | 348 | readFile( fname ) ) |
346 | { | 349 | { |
347 | QFile::remove( fname ); | 350 | QFile::remove( fname ); |
348 | item->setText( 1, QString( "%1 kb/sec" ).arg( QString::number( 1024.0 / ( time.elapsed() / 1000.0 ) ) ) ); | 351 | item->setText( 1, QString( "%1 kb/sec" ).arg( QString::number( 1024.0 / ( time.elapsed() / 1000.0 ) ) ) ); |
349 | item->setOn( false ); | 352 | item->setOn( false ); |
350 | } | 353 | } |
351 | else | 354 | else |
352 | { | 355 | { |
353 | item->setText( 1, tr( "error" ) ); | 356 | item->setText( 1, tr( "error" ) ); |
diff --git a/noncore/settings/sysinfo/benchmarkinfo.h b/noncore/settings/sysinfo/benchmarkinfo.h index c3d44ec..0a61134 100644 --- a/noncore/settings/sysinfo/benchmarkinfo.h +++ b/noncore/settings/sysinfo/benchmarkinfo.h | |||
@@ -10,60 +10,60 @@ | |||
10 | ** GNU General Public License version 2 as published by the Free Software | 10 | ** GNU General Public License version 2 as published by the Free Software |
11 | ** Foundation and appearing in the file LICENSE.GPL included in the | 11 | ** Foundation and appearing in the file LICENSE.GPL included in the |
12 | ** packaging of this file. | 12 | ** packaging of this file. |
13 | ** | 13 | ** |
14 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 14 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
15 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 15 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
16 | ** | 16 | ** |
17 | **********************************************************************/ | 17 | **********************************************************************/ |
18 | 18 | ||
19 | #include <qwidget.h> | 19 | #include <qwidget.h> |
20 | #include <qdialog.h> | 20 | #include <qdialog.h> |
21 | #include <qdict.h> | 21 | #include <qdict.h> |
22 | #include <qstringlist.h> | 22 | #include <qstringlist.h> |
23 | 23 | ||
24 | class QClipboard; | 24 | class QClipboard; |
25 | class QComboBox; | 25 | class QComboBox; |
26 | class OCheckListItem; | 26 | namespace Opie {namespace Ui {class OCheckListItem;}} |
27 | class QPushButton; | 27 | class QPushButton; |
28 | class OListView; | 28 | namespace Opie {namespace Ui {class OListView;}} |
29 | 29 | ||
30 | class BenchmarkInfo : public QWidget | 30 | class BenchmarkInfo : public QWidget |
31 | { | 31 | { |
32 | Q_OBJECT | 32 | Q_OBJECT |
33 | 33 | ||
34 | public: | 34 | public: |
35 | BenchmarkInfo( QWidget *parent = 0, const char *name = 0, int wFlags = 0 ); | 35 | BenchmarkInfo( QWidget *parent = 0, const char *name = 0, int wFlags = 0 ); |
36 | ~BenchmarkInfo(); | 36 | ~BenchmarkInfo(); |
37 | 37 | ||
38 | OCheckListItem* test_alu; | 38 | Opie::Ui::OCheckListItem* test_alu; |
39 | OCheckListItem* test_fpu; | 39 | Opie::Ui::OCheckListItem* test_fpu; |
40 | OCheckListItem* test_txt; | 40 | Opie::Ui::OCheckListItem* test_txt; |
41 | OCheckListItem* test_gfx; | 41 | Opie::Ui::OCheckListItem* test_gfx; |
42 | OCheckListItem* test_ram; | 42 | Opie::Ui::OCheckListItem* test_ram; |
43 | OCheckListItem* test_sd; | 43 | Opie::Ui::OCheckListItem* test_sd; |
44 | OCheckListItem* test_cf; | 44 | Opie::Ui::OCheckListItem* test_cf; |
45 | 45 | ||
46 | bool main_rd; | 46 | bool main_rd; |
47 | bool main_wt; | 47 | bool main_wt; |
48 | bool sd_rd; | 48 | bool sd_rd; |
49 | bool sd_wt; | 49 | bool sd_wt; |
50 | bool cf_rd; | 50 | bool cf_rd; |
51 | bool cf_wt; | 51 | bool cf_wt; |
52 | 52 | ||
53 | QClipboard* clb; | 53 | QClipboard* clb; |
54 | QComboBox* machineCombo; | 54 | QComboBox* machineCombo; |
55 | OListView* tests; | 55 | Opie::Ui::OListView* tests; |
56 | QPushButton* startButton; | 56 | QPushButton* startButton; |
57 | QDict <QStringList> machines; | 57 | QDict <QStringList> machines; |
58 | 58 | ||
59 | int textRendering( int ); | 59 | int textRendering( int ); |
60 | int gfxRendering( int ); | 60 | int gfxRendering( int ); |
61 | void performFileTest( const QString& fname, OCheckListItem* item ); | 61 | void performFileTest( const QString& fname, Opie::Ui::OCheckListItem* item ); |
62 | 62 | ||
63 | private slots: | 63 | private slots: |
64 | bool writeFile( const QString& ); | 64 | bool writeFile( const QString& ); |
65 | bool readFile( const QString& ); | 65 | bool readFile( const QString& ); |
66 | void run(); | 66 | void run(); |
67 | void machineActivated( int ); | 67 | void machineActivated( int ); |
68 | }; | 68 | }; |
69 | 69 | ||
diff --git a/noncore/settings/sysinfo/main.cpp b/noncore/settings/sysinfo/main.cpp index 3a7b1b1..8ebac20 100644 --- a/noncore/settings/sysinfo/main.cpp +++ b/noncore/settings/sysinfo/main.cpp | |||
@@ -10,17 +10,18 @@ | |||
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "sysinfo.h" | 21 | #include "sysinfo.h" |
22 | 22 | ||
23 | #include <opie2/oapplicationfactory.h> | 23 | #include <opie2/oapplicationfactory.h> |
24 | 24 | ||
25 | 25 | ||
26 | using namespace Opie::Core; | ||
26 | OPIE_EXPORT_APP( OApplicationFactory<SystemInfo> ) | 27 | OPIE_EXPORT_APP( OApplicationFactory<SystemInfo> ) |
diff --git a/noncore/settings/sysinfo/modulesinfo.cpp b/noncore/settings/sysinfo/modulesinfo.cpp index dfe48e1..71cefcb 100644 --- a/noncore/settings/sysinfo/modulesinfo.cpp +++ b/noncore/settings/sysinfo/modulesinfo.cpp | |||
@@ -23,56 +23,57 @@ | |||
23 | #include "detail.h" | 23 | #include "detail.h" |
24 | 24 | ||
25 | /* OPIE */ | 25 | /* OPIE */ |
26 | #include <opie2/olistview.h> | 26 | #include <opie2/olistview.h> |
27 | #include <qpe/qpeapplication.h> | 27 | #include <qpe/qpeapplication.h> |
28 | 28 | ||
29 | /* QT */ | 29 | /* QT */ |
30 | #include <qcombobox.h> | 30 | #include <qcombobox.h> |
31 | #include <qfile.h> | 31 | #include <qfile.h> |
32 | #include <qlayout.h> | 32 | #include <qlayout.h> |
33 | #include <qmessagebox.h> | 33 | #include <qmessagebox.h> |
34 | #include <qpushbutton.h> | 34 | #include <qpushbutton.h> |
35 | #include <qtextview.h> | 35 | #include <qtextview.h> |
36 | #include <qtimer.h> | 36 | #include <qtimer.h> |
37 | #include <qwhatsthis.h> | 37 | #include <qwhatsthis.h> |
38 | 38 | ||
39 | using namespace Opie::Ui; | ||
39 | ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl ) | 40 | ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl ) |
40 | : QWidget( parent, name, fl ) | 41 | : QWidget( parent, name, fl ) |
41 | { | 42 | { |
42 | QGridLayout *layout = new QGridLayout( this ); | 43 | QGridLayout *layout = new QGridLayout( this ); |
43 | layout->setSpacing( 4 ); | 44 | layout->setSpacing( 4 ); |
44 | layout->setMargin( 4 ); | 45 | layout->setMargin( 4 ); |
45 | 46 | ||
46 | ModulesView = new OListView( this ); | 47 | ModulesView = new OListView( this ); |
47 | int colnum = ModulesView->addColumn( tr( "Module" ) ); | 48 | int colnum = ModulesView->addColumn( tr( "Module" ) ); |
48 | colnum = ModulesView->addColumn( tr( "Size" ) ); | 49 | colnum = ModulesView->addColumn( tr( "Size" ) ); |
49 | ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); | 50 | ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); |
50 | colnum = ModulesView->addColumn( tr( "Use#" ) ); | 51 | colnum = ModulesView->addColumn( tr( "Use#" ) ); |
51 | ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); | 52 | ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); |
52 | colnum = ModulesView->addColumn( tr( "Used by" ) ); | 53 | colnum = ModulesView->addColumn( tr( "Used by" ) ); |
53 | ModulesView->setAllColumnsShowFocus( TRUE ); | 54 | ModulesView->setAllColumnsShowFocus( TRUE ); |
54 | layout->addMultiCellWidget( ModulesView, 0, 0, 0, 1 ); | 55 | layout->addMultiCellWidget( ModulesView, 0, 0, 0, 1 ); |
55 | QWhatsThis::add( ModulesView, tr( "This is a list of all the kernel modules currently loaded on this handheld device.\n\nClick and hold on a module to see additional information about the module, or to unload it." ) ); | 56 | QWhatsThis::add( ModulesView, tr( "This is a list of all the kernel modules currently loaded on this handheld device.\n\nClick and hold on a module to see additional information about the module, or to unload it." ) ); |
56 | 57 | ||
57 | // Test if we have /sbin/modinfo, and if so, allow module detail window | 58 | // Test if we have /sbin/modinfo, and if so, allow module detail window |
58 | if ( QFile::exists( "/sbin/modinfo" ) ) | 59 | if ( QFile::exists( "/sbin/modinfo" ) ) |
59 | { | 60 | { |
60 | QPEApplication::setStylusOperation( ModulesView->viewport(), QPEApplication::RightOnHold ); | 61 | QPEApplication::setStylusOperation( ModulesView->viewport(), QPEApplication::RightOnHold ); |
61 | connect( ModulesView, SIGNAL( rightButtonPressed(OListViewItem*,const QPoint&,int) ), | 62 | connect( ModulesView, SIGNAL( rightButtonPressed(QListViewItem*,const QPoint&,int) ), |
62 | this, SLOT( viewModules(OListViewItem*) ) ); | 63 | this, SLOT( viewModules(QListViewItem*) ) ); |
63 | } | 64 | } |
64 | 65 | ||
65 | CommandCB = new QComboBox( FALSE, this ); | 66 | CommandCB = new QComboBox( FALSE, this ); |
66 | CommandCB->insertItem( "modprobe -r" ); | 67 | CommandCB->insertItem( "modprobe -r" ); |
67 | CommandCB->insertItem( "rmmod" ); | 68 | CommandCB->insertItem( "rmmod" ); |
68 | // I can't think of other useful commands yet. Anyone? | 69 | // I can't think of other useful commands yet. Anyone? |
69 | layout->addWidget( CommandCB, 1, 0 ); | 70 | layout->addWidget( CommandCB, 1, 0 ); |
70 | QWhatsThis::add( CommandCB, tr( "Select a command here and then click the Send button to the right to send the command to module selected above." ) ); | 71 | QWhatsThis::add( CommandCB, tr( "Select a command here and then click the Send button to the right to send the command to module selected above." ) ); |
71 | 72 | ||
72 | QPushButton *btn = new QPushButton( this ); | 73 | QPushButton *btn = new QPushButton( this ); |
73 | btn->setMinimumSize( QSize( 50, 24 ) ); | 74 | btn->setMinimumSize( QSize( 50, 24 ) ); |
74 | btn->setMaximumSize( QSize( 50, 24 ) ); | 75 | btn->setMaximumSize( QSize( 50, 24 ) ); |
75 | btn->setText( tr( "Send" ) ); | 76 | btn->setText( tr( "Send" ) ); |
76 | connect( btn, SIGNAL( clicked() ), this, SLOT( slotSendClicked() ) ); | 77 | connect( btn, SIGNAL( clicked() ), this, SLOT( slotSendClicked() ) ); |
77 | layout->addWidget( btn, 1, 1 ); | 78 | layout->addWidget( btn, 1, 1 ); |
78 | QWhatsThis::add( btn, tr( "Click here to send the selected command to the module selected above." ) ); | 79 | QWhatsThis::add( btn, tr( "Click here to send the selected command to the module selected above." ) ); |
@@ -150,32 +151,37 @@ void ModulesInfo::slotSendClicked() | |||
150 | 151 | ||
151 | if ( QMessageBox::warning( this, modname, capstr, | 152 | if ( QMessageBox::warning( this, modname, capstr, |
152 | QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes ) | 153 | QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes ) |
153 | { | 154 | { |
154 | QString command = "/sbin/"; | 155 | QString command = "/sbin/"; |
155 | command.append( CommandCB->currentText() ); | 156 | command.append( CommandCB->currentText() ); |
156 | command.append( " " ); | 157 | command.append( " " ); |
157 | command.append( modname ); | 158 | command.append( modname ); |
158 | 159 | ||
159 | FILE* stream = popen( command, "r" ); | 160 | FILE* stream = popen( command, "r" ); |
160 | if ( stream ) | 161 | if ( stream ) |
161 | pclose( stream ); | 162 | pclose( stream ); |
162 | } | 163 | } |
163 | 164 | ||
164 | } | 165 | } |
165 | 166 | ||
167 | void ModulesInfo::viewModules( QListViewItem *module ) { | ||
168 | if ( !module ) | ||
169 | return; | ||
170 | viewModules( static_cast<OListViewItem*>( module ) ); | ||
171 | } | ||
166 | void ModulesInfo::viewModules( OListViewItem *modules ) | 172 | void ModulesInfo::viewModules( OListViewItem *modules ) |
167 | { | 173 | { |
168 | QString modname = modules->text( 0 ); | 174 | QString modname = modules->text( 0 ); |
169 | QString capstr = "Module: "; | 175 | QString capstr = "Module: "; |
170 | capstr.append( modname ); | 176 | capstr.append( modname ); |
171 | ModulesDtl->setCaption( capstr ); | 177 | ModulesDtl->setCaption( capstr ); |
172 | QString command = "/sbin/modinfo "; | 178 | QString command = "/sbin/modinfo "; |
173 | command.append( modname ); | 179 | command.append( modname ); |
174 | FILE* modinfo = popen( command, "r" ); | 180 | FILE* modinfo = popen( command, "r" ); |
175 | 181 | ||
176 | if ( modinfo ) | 182 | if ( modinfo ) |
177 | { | 183 | { |
178 | char line[200]; | 184 | char line[200]; |
179 | ModulesDtl->detailView->setText( " Details:\n------------\n" ); | 185 | ModulesDtl->detailView->setText( " Details:\n------------\n" ); |
180 | 186 | ||
181 | while( true ) | 187 | while( true ) |
diff --git a/noncore/settings/sysinfo/modulesinfo.h b/noncore/settings/sysinfo/modulesinfo.h index 78dce73..b816b41 100644 --- a/noncore/settings/sysinfo/modulesinfo.h +++ b/noncore/settings/sysinfo/modulesinfo.h | |||
@@ -13,39 +13,41 @@ | |||
13 | ** GNU General Public License version 2 as published by the Free Software | 13 | ** GNU General Public License version 2 as published by the Free Software |
14 | ** Foundation and appearing in the file LICENSE.GPL included in the | 14 | ** Foundation and appearing in the file LICENSE.GPL included in the |
15 | ** packaging of this file. | 15 | ** packaging of this file. |
16 | ** | 16 | ** |
17 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 17 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
18 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 18 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
19 | ** | 19 | ** |
20 | **********************************************************************/ | 20 | **********************************************************************/ |
21 | 21 | ||
22 | #ifndef MODULESINFO_H | 22 | #ifndef MODULESINFO_H |
23 | #define MODULESINFO_H | 23 | #define MODULESINFO_H |
24 | 24 | ||
25 | #include <qwidget.h> | 25 | #include <qwidget.h> |
26 | 26 | ||
27 | class Detail; | 27 | class Detail; |
28 | class QComboBox; | 28 | class QComboBox; |
29 | class OListView; | 29 | class QListViewItem; |
30 | class OListViewItem; | 30 | namespace Opie {namespace Ui {class OListView;}} |
31 | namespace Opie {namespace Ui {class OListViewItem;}} | ||
31 | 32 | ||
32 | class ModulesInfo : public QWidget | 33 | class ModulesInfo : public QWidget |
33 | { | 34 | { |
34 | Q_OBJECT | 35 | Q_OBJECT |
35 | public: | 36 | public: |
36 | ModulesInfo( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); | 37 | ModulesInfo( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); |
37 | ~ModulesInfo(); | 38 | ~ModulesInfo(); |
38 | 39 | ||
39 | private: | 40 | private: |
40 | OListView* ModulesView; | 41 | Opie::Ui::OListView* ModulesView; |
41 | QComboBox* CommandCB; | 42 | QComboBox* CommandCB; |
42 | 43 | ||
43 | Detail* ModulesDtl; | 44 | Detail* ModulesDtl; |
44 | 45 | ||
45 | private slots: | 46 | private slots: |
46 | void updateData(); | 47 | void updateData(); |
47 | void slotSendClicked(); | 48 | void slotSendClicked(); |
48 | void viewModules( OListViewItem * ); | 49 | void viewModules( QListViewItem* ); |
50 | void viewModules( Opie::Ui::OListViewItem * ); | ||
49 | }; | 51 | }; |
50 | 52 | ||
51 | #endif | 53 | #endif |
diff --git a/noncore/settings/sysinfo/processinfo.cpp b/noncore/settings/sysinfo/processinfo.cpp index dd9a05d..e887267 100644 --- a/noncore/settings/sysinfo/processinfo.cpp +++ b/noncore/settings/sysinfo/processinfo.cpp | |||
@@ -25,51 +25,52 @@ | |||
25 | #include <qpe/qpeapplication.h> | 25 | #include <qpe/qpeapplication.h> |
26 | 26 | ||
27 | /* QT */ | 27 | /* QT */ |
28 | #include <qcombobox.h> | 28 | #include <qcombobox.h> |
29 | #include <qdir.h> | 29 | #include <qdir.h> |
30 | #include <qlayout.h> | 30 | #include <qlayout.h> |
31 | #include <qmessagebox.h> | 31 | #include <qmessagebox.h> |
32 | #include <qpushbutton.h> | 32 | #include <qpushbutton.h> |
33 | #include <qtextview.h> | 33 | #include <qtextview.h> |
34 | #include <qtimer.h> | 34 | #include <qtimer.h> |
35 | #include <qwhatsthis.h> | 35 | #include <qwhatsthis.h> |
36 | 36 | ||
37 | /* STD */ | 37 | /* STD */ |
38 | #include <sys/types.h> | 38 | #include <sys/types.h> |
39 | #include <signal.h> | 39 | #include <signal.h> |
40 | 40 | ||
41 | using namespace Opie::Ui; | ||
41 | ProcessInfo::ProcessInfo( QWidget* parent, const char* name, WFlags fl ) | 42 | ProcessInfo::ProcessInfo( QWidget* parent, const char* name, WFlags fl ) |
42 | : QWidget( parent, name, fl ) | 43 | : QWidget( parent, name, fl ) |
43 | { | 44 | { |
44 | QGridLayout *layout = new QGridLayout( this ); | 45 | QGridLayout *layout = new QGridLayout( this ); |
45 | layout->setSpacing( 4 ); | 46 | layout->setSpacing( 4 ); |
46 | layout->setMargin( 4 ); | 47 | layout->setMargin( 4 ); |
47 | 48 | ||
48 | 49 | ||
49 | ProcessView = new OListView( this, "ProcessView" ); | 50 | ProcessView = new OListView( this, "ProcessView" ); |
50 | int colnum = ProcessView->addColumn( tr( "PID" ) ); | 51 | int colnum = ProcessView->addColumn( tr( "PID" ) ); |
51 | ProcessView->setColumnAlignment( colnum, Qt::AlignRight ); | 52 | ProcessView->setColumnAlignment( colnum, Qt::AlignRight ); |
52 | colnum = ProcessView->addColumn( tr( "Command" ),96 ); | 53 | colnum = ProcessView->addColumn( tr( "Command" ),96 ); |
53 | colnum = ProcessView->addColumn( tr( "Status" ) ); | 54 | colnum = ProcessView->addColumn( tr( "Status" ) ); |
54 | colnum = ProcessView->addColumn( tr( "Time" ) ); | 55 | colnum = ProcessView->addColumn( tr( "Time" ) ); |
55 | ProcessView->setColumnAlignment( colnum, Qt::AlignRight ); | 56 | ProcessView->setColumnAlignment( colnum, Qt::AlignRight ); |
56 | ProcessView->setAllColumnsShowFocus( TRUE ); | 57 | ProcessView->setAllColumnsShowFocus( TRUE ); |
57 | QPEApplication::setStylusOperation( ProcessView->viewport(), QPEApplication::RightOnHold ); | 58 | QPEApplication::setStylusOperation( ProcessView->viewport(), QPEApplication::RightOnHold ); |
58 | connect( ProcessView, SIGNAL( rightButtonPressed(OListViewItem*,const QPoint&,int) ), | 59 | connect( ProcessView, SIGNAL( rightButtonPressed(QListViewItem*,const QPoint&,int) ), |
59 | this, SLOT( viewProcess(OListViewItem*) ) ); | 60 | this, SLOT( viewProcess(QListViewItem*) ) ); |
60 | layout->addMultiCellWidget( ProcessView, 0, 0, 0, 1 ); | 61 | layout->addMultiCellWidget( ProcessView, 0, 0, 0, 1 ); |
61 | QWhatsThis::add( ProcessView, tr( "This is a list of all the processes on this handheld device.\n\nClick and hold on a process to see additional information about the process, or to send a signal to it." ) ); | 62 | QWhatsThis::add( ProcessView, tr( "This is a list of all the processes on this handheld device.\n\nClick and hold on a process to see additional information about the process, or to send a signal to it." ) ); |
62 | 63 | ||
63 | SignalCB = new QComboBox( FALSE, this, "SignalCB" ); | 64 | SignalCB = new QComboBox( FALSE, this, "SignalCB" ); |
64 | SignalCB->insertItem( " 1: SIGHUP" ); | 65 | SignalCB->insertItem( " 1: SIGHUP" ); |
65 | SignalCB->insertItem( " 2: SIGINT" ); | 66 | SignalCB->insertItem( " 2: SIGINT" ); |
66 | SignalCB->insertItem( " 3: SIGQUIT" ); | 67 | SignalCB->insertItem( " 3: SIGQUIT" ); |
67 | SignalCB->insertItem( " 5: SIGTRAP" ); | 68 | SignalCB->insertItem( " 5: SIGTRAP" ); |
68 | SignalCB->insertItem( " 6: SIGABRT" ); | 69 | SignalCB->insertItem( " 6: SIGABRT" ); |
69 | SignalCB->insertItem( " 9: SIGKILL" ); | 70 | SignalCB->insertItem( " 9: SIGKILL" ); |
70 | SignalCB->insertItem( "14: SIGALRM" ); | 71 | SignalCB->insertItem( "14: SIGALRM" ); |
71 | SignalCB->insertItem( "15: SIGTERM" ); | 72 | SignalCB->insertItem( "15: SIGTERM" ); |
72 | SignalCB->insertItem( "18: SIGCONT" ); | 73 | SignalCB->insertItem( "18: SIGCONT" ); |
73 | SignalCB->insertItem( "19: SIGSTOP" ); | 74 | SignalCB->insertItem( "19: SIGSTOP" ); |
74 | layout->addWidget( SignalCB, 1, 0 ); | 75 | layout->addWidget( SignalCB, 1, 0 ); |
75 | QWhatsThis::add( SignalCB, tr( "Select a signal here and then click the Send button to the right to send to this process." ) ); | 76 | QWhatsThis::add( SignalCB, tr( "Select a signal here and then click the Send button to the right to send to this process." ) ); |
@@ -172,32 +173,38 @@ void ProcessInfo::slotSendClicked() | |||
172 | 173 | ||
173 | if ( QMessageBox::warning( this, currprocess->text( 1 ), capstr, | 174 | if ( QMessageBox::warning( this, currprocess->text( 1 ), capstr, |
174 | QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes ) | 175 | QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes ) |
175 | { | 176 | { |
176 | currprocess = static_cast<OListViewItem*>( ProcessView->currentItem() ); | 177 | currprocess = static_cast<OListViewItem*>( ProcessView->currentItem() ); |
177 | if ( currprocess ) | 178 | if ( currprocess ) |
178 | { | 179 | { |
179 | QString sigstr = SignalCB->currentText(); | 180 | QString sigstr = SignalCB->currentText(); |
180 | sigstr.truncate(2); | 181 | sigstr.truncate(2); |
181 | int sigid = sigstr.toUInt(); | 182 | int sigid = sigstr.toUInt(); |
182 | kill( currprocess->text( 0 ).stripWhiteSpace().toUInt(), sigid ); | 183 | kill( currprocess->text( 0 ).stripWhiteSpace().toUInt(), sigid ); |
183 | } | 184 | } |
184 | } | 185 | } |
185 | 186 | ||
186 | } | 187 | } |
187 | 188 | ||
189 | void ProcessInfo::viewProcess( QListViewItem* process ) { | ||
190 | if ( !process ) | ||
191 | return; | ||
192 | viewProcess( static_cast<OListViewItem*>( process ) ); | ||
193 | } | ||
194 | |||
188 | void ProcessInfo::viewProcess( OListViewItem *process ) | 195 | void ProcessInfo::viewProcess( OListViewItem *process ) |
189 | { | 196 | { |
190 | QString pid= process->text( 0 ).stripWhiteSpace(); | 197 | QString pid= process->text( 0 ).stripWhiteSpace(); |
191 | QString command = process->text( 1 ); | 198 | QString command = process->text( 1 ); |
192 | ProcessDtl->setCaption( pid + " - " + command ); | 199 | ProcessDtl->setCaption( pid + " - " + command ); |
193 | FILE *statfile = fopen( ( QString ) ( "/proc/" + pid + "/status"), "r"); | 200 | FILE *statfile = fopen( ( QString ) ( "/proc/" + pid + "/status"), "r"); |
194 | if ( statfile ) | 201 | if ( statfile ) |
195 | { | 202 | { |
196 | char line[81]; | 203 | char line[81]; |
197 | fgets( line, 81, statfile ); | 204 | fgets( line, 81, statfile ); |
198 | ProcessDtl->detailView->setText( line ); | 205 | ProcessDtl->detailView->setText( line ); |
199 | while ( fgets( line, 81, statfile ) ) | 206 | while ( fgets( line, 81, statfile ) ) |
200 | { | 207 | { |
201 | ProcessDtl->detailView->append( line ); | 208 | ProcessDtl->detailView->append( line ); |
202 | } | 209 | } |
203 | fclose( statfile ); | 210 | fclose( statfile ); |
diff --git a/noncore/settings/sysinfo/processinfo.h b/noncore/settings/sysinfo/processinfo.h index 6e7acd5..0a1682b 100644 --- a/noncore/settings/sysinfo/processinfo.h +++ b/noncore/settings/sysinfo/processinfo.h | |||
@@ -11,40 +11,42 @@ | |||
11 | ** GNU General Public License version 2 as published by the Free Software | 11 | ** GNU General Public License version 2 as published by the Free Software |
12 | ** Foundation and appearing in the file LICENSE.GPL included in the | 12 | ** Foundation and appearing in the file LICENSE.GPL included in the |
13 | ** packaging of this file. | 13 | ** packaging of this file. |
14 | ** | 14 | ** |
15 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 15 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
16 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 16 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
17 | ** | 17 | ** |
18 | **********************************************************************/ | 18 | **********************************************************************/ |
19 | 19 | ||
20 | #ifndef PROCESSINFO_H | 20 | #ifndef PROCESSINFO_H |
21 | #define PROCESSINFO_H | 21 | #define PROCESSINFO_H |
22 | 22 | ||
23 | #include <qwidget.h> | 23 | #include <qwidget.h> |
24 | 24 | ||
25 | class Detail; | 25 | class Detail; |
26 | class QComboBox; | 26 | class QComboBox; |
27 | class OListView; | 27 | class QListViewItem; |
28 | class OListViewItem; | 28 | namespace Opie {namespace Ui {class OListView;}} |
29 | namespace Opie {namespace Ui {class OListViewItem;}} | ||
29 | 30 | ||
30 | class ProcessInfo : public QWidget | 31 | class ProcessInfo : public QWidget |
31 | { | 32 | { |
32 | Q_OBJECT | 33 | Q_OBJECT |
33 | public: | 34 | public: |
34 | ProcessInfo( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); | 35 | ProcessInfo( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); |
35 | ~ProcessInfo(); | 36 | ~ProcessInfo(); |
36 | 37 | ||
37 | private: | 38 | private: |
38 | OListView* ProcessView; | 39 | Opie::Ui::OListView* ProcessView; |
39 | QComboBox* SignalCB; | 40 | QComboBox* SignalCB; |
40 | QPushButton* SendButton; | 41 | QPushButton* SendButton; |
41 | 42 | ||
42 | Detail *ProcessDtl; | 43 | Detail *ProcessDtl; |
43 | 44 | ||
44 | private slots: | 45 | private slots: |
45 | void updateData(); | 46 | void updateData(); |
46 | void slotSendClicked(); | 47 | void slotSendClicked(); |
47 | void viewProcess( OListViewItem * ); | 48 | void viewProcess( QListViewItem* ); |
49 | void viewProcess( Opie::Ui::OListViewItem * ); | ||
48 | }; | 50 | }; |
49 | 51 | ||
50 | #endif | 52 | #endif |
diff --git a/noncore/settings/sysinfo/sysinfo.cpp b/noncore/settings/sysinfo/sysinfo.cpp index fda6352..4c58999 100644 --- a/noncore/settings/sysinfo/sysinfo.cpp +++ b/noncore/settings/sysinfo/sysinfo.cpp | |||
@@ -25,32 +25,33 @@ | |||
25 | #include "memory.h" | 25 | #include "memory.h" |
26 | #include "load.h" | 26 | #include "load.h" |
27 | #include "storage.h" | 27 | #include "storage.h" |
28 | #include "processinfo.h" | 28 | #include "processinfo.h" |
29 | #include "modulesinfo.h" | 29 | #include "modulesinfo.h" |
30 | #include "benchmarkinfo.h" | 30 | #include "benchmarkinfo.h" |
31 | #include "versioninfo.h" | 31 | #include "versioninfo.h" |
32 | #include "sysinfo.h" | 32 | #include "sysinfo.h" |
33 | 33 | ||
34 | #include <opie2/otabwidget.h> | 34 | #include <opie2/otabwidget.h> |
35 | 35 | ||
36 | #include <qpe/config.h> | 36 | #include <qpe/config.h> |
37 | #include <qpe/resource.h> | 37 | #include <qpe/resource.h> |
38 | 38 | ||
39 | #include <qlayout.h> | 39 | #include <qlayout.h> |
40 | 40 | ||
41 | using namespace Opie::Ui; | ||
41 | SystemInfo::SystemInfo( QWidget *parent, const char *name, WFlags ) | 42 | SystemInfo::SystemInfo( QWidget *parent, const char *name, WFlags ) |
42 | : QWidget( parent, name, WStyle_ContextHelp ) | 43 | : QWidget( parent, name, WStyle_ContextHelp ) |
43 | { | 44 | { |
44 | setIcon( Resource::loadPixmap( "system_icon" ) ); | 45 | setIcon( Resource::loadPixmap( "system_icon" ) ); |
45 | setCaption( tr("System Info") ); | 46 | setCaption( tr("System Info") ); |
46 | 47 | ||
47 | resize( 220, 180 ); | 48 | resize( 220, 180 ); |
48 | 49 | ||
49 | Config config( "qpe" ); | 50 | Config config( "qpe" ); |
50 | config.setGroup( "Appearance" ); | 51 | config.setGroup( "Appearance" ); |
51 | bool advanced = config.readBoolEntry( "Advanced", TRUE ); | 52 | bool advanced = config.readBoolEntry( "Advanced", TRUE ); |
52 | 53 | ||
53 | QVBoxLayout *lay = new QVBoxLayout( this ); | 54 | QVBoxLayout *lay = new QVBoxLayout( this ); |
54 | OTabWidget *tab = new OTabWidget( this, "tabwidget", OTabWidget::Global ); | 55 | OTabWidget *tab = new OTabWidget( this, "tabwidget", OTabWidget::Global ); |
55 | lay->addWidget( tab ); | 56 | lay->addWidget( tab ); |
56 | 57 | ||
diff --git a/noncore/settings/sysinfo/versioninfo.cpp b/noncore/settings/sysinfo/versioninfo.cpp index 4bebd06..6764aa6 100644 --- a/noncore/settings/sysinfo/versioninfo.cpp +++ b/noncore/settings/sysinfo/versioninfo.cpp | |||
@@ -20,33 +20,33 @@ | |||
20 | 20 | ||
21 | #include "versioninfo.h" | 21 | #include "versioninfo.h" |
22 | 22 | ||
23 | /* OPIE */ | 23 | /* OPIE */ |
24 | #include <opie2/odevice.h> | 24 | #include <opie2/odevice.h> |
25 | #include <qpe/resource.h> | 25 | #include <qpe/resource.h> |
26 | #include <qpe/version.h> | 26 | #include <qpe/version.h> |
27 | 27 | ||
28 | /* QT */ | 28 | /* QT */ |
29 | #include <qfile.h> | 29 | #include <qfile.h> |
30 | #include <qlabel.h> | 30 | #include <qlabel.h> |
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | #include <qscrollview.h> | 32 | #include <qscrollview.h> |
33 | #include <qtextstream.h> | 33 | #include <qtextstream.h> |
34 | #include <qwhatsthis.h> | 34 | #include <qwhatsthis.h> |
35 | 35 | ||
36 | using namespace Opie; | 36 | using namespace Opie::Core; |
37 | 37 | ||
38 | VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) | 38 | VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) |
39 | : QWidget( parent, name, f ) | 39 | : QWidget( parent, name, f ) |
40 | { | 40 | { |
41 | setMinimumSize( 200, 150 ); | 41 | setMinimumSize( 200, 150 ); |
42 | 42 | ||
43 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); | 43 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); |
44 | QScrollView *sv = new QScrollView( this ); | 44 | QScrollView *sv = new QScrollView( this ); |
45 | tmpvb->addWidget( sv, 0, 0 ); | 45 | tmpvb->addWidget( sv, 0, 0 ); |
46 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 46 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
47 | sv->setFrameStyle( QFrame::NoFrame ); | 47 | sv->setFrameStyle( QFrame::NoFrame ); |
48 | QWidget *container = new QWidget( sv->viewport() ); | 48 | QWidget *container = new QWidget( sv->viewport() ); |
49 | sv->addChild( container ); | 49 | sv->addChild( container ); |
50 | 50 | ||
51 | QVBoxLayout *vb = new QVBoxLayout( container, 3 ); | 51 | QVBoxLayout *vb = new QVBoxLayout( container, 3 ); |
52 | 52 | ||