summaryrefslogtreecommitdiff
path: root/noncore/settings/sysinfo
Unidiff
Diffstat (limited to 'noncore/settings/sysinfo') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/benchmarkinfo.cpp21
-rw-r--r--noncore/settings/sysinfo/benchmarkinfo.h22
-rw-r--r--noncore/settings/sysinfo/main.cpp1
-rw-r--r--noncore/settings/sysinfo/modulesinfo.cpp10
-rw-r--r--noncore/settings/sysinfo/modulesinfo.h10
-rw-r--r--noncore/settings/sysinfo/processinfo.cpp11
-rw-r--r--noncore/settings/sysinfo/processinfo.h10
-rw-r--r--noncore/settings/sysinfo/sysinfo.cpp1
-rw-r--r--noncore/settings/sysinfo/versioninfo.cpp2
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
@@ -51,7 +51,10 @@
51extern double round(double); 51extern double round(double);
52#endif 52#endif
53 53
54using namespace Opie::Ui;
55using namespace Opie::Core;
54extern "C" 56extern "C"
57
55{ 58{
56 void BenchFFT( void ); 59 void BenchFFT( void );
57 double dhry_main( int ); 60 double dhry_main( int );
@@ -175,12 +178,12 @@ void BenchmarkInfo::machineActivated( int index )
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
@@ -259,7 +262,7 @@ int BenchmarkInfo::textRendering( int seconds )
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;
@@ -269,7 +272,7 @@ int BenchmarkInfo::textRendering( int seconds )
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
@@ -290,7 +293,7 @@ int BenchmarkInfo::gfxRendering( int seconds )
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;
@@ -301,7 +304,7 @@ int BenchmarkInfo::gfxRendering( int seconds )
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;
@@ -314,7 +317,7 @@ int BenchmarkInfo::gfxRendering( int seconds )
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;
@@ -326,7 +329,7 @@ int BenchmarkInfo::gfxRendering( int seconds )
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 );
@@ -334,7 +337,7 @@ int BenchmarkInfo::gfxRendering( int seconds )
334 } 337 }
335 338
336 return loops; 339 return loops;
337 340
338} 341}
339 342
340void BenchmarkInfo::performFileTest( const QString& fname, OCheckListItem* item ) 343void BenchmarkInfo::performFileTest( const QString& fname, OCheckListItem* item )
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
@@ -23,9 +23,9 @@
23 23
24class QClipboard; 24class QClipboard;
25class QComboBox; 25class QComboBox;
26class OCheckListItem; 26namespace Opie {namespace Ui {class OCheckListItem;}}
27class QPushButton; 27class QPushButton;
28class OListView; 28namespace Opie {namespace Ui {class OListView;}}
29 29
30class BenchmarkInfo : public QWidget 30class BenchmarkInfo : public QWidget
31{ 31{
@@ -35,13 +35,13 @@ 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;
@@ -52,13 +52,13 @@ public:
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
63private slots: 63private slots:
64 bool writeFile( const QString& ); 64 bool writeFile( const QString& );
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
@@ -23,4 +23,5 @@
23#include <opie2/oapplicationfactory.h> 23#include <opie2/oapplicationfactory.h>
24 24
25 25
26using namespace Opie::Core;
26OPIE_EXPORT_APP( OApplicationFactory<SystemInfo> ) 27OPIE_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
@@ -36,6 +36,7 @@
36#include <qtimer.h> 36#include <qtimer.h>
37#include <qwhatsthis.h> 37#include <qwhatsthis.h>
38 38
39using namespace Opie::Ui;
39ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl ) 40ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl )
40 : QWidget( parent, name, fl ) 41 : QWidget( parent, name, fl )
41{ 42{
@@ -58,8 +59,8 @@ ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl )
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 );
@@ -163,6 +164,11 @@ void ModulesInfo::slotSendClicked()
163 164
164} 165}
165 166
167void ModulesInfo::viewModules( QListViewItem *module ) {
168 if ( !module )
169 return;
170 viewModules( static_cast<OListViewItem*>( module ) );
171}
166void ModulesInfo::viewModules( OListViewItem *modules ) 172void ModulesInfo::viewModules( OListViewItem *modules )
167{ 173{
168 QString modname = modules->text( 0 ); 174 QString modname = modules->text( 0 );
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
@@ -26,8 +26,9 @@
26 26
27class Detail; 27class Detail;
28class QComboBox; 28class QComboBox;
29class OListView; 29class QListViewItem;
30class OListViewItem; 30namespace Opie {namespace Ui {class OListView;}}
31namespace Opie {namespace Ui {class OListViewItem;}}
31 32
32class ModulesInfo : public QWidget 33class ModulesInfo : public QWidget
33{ 34{
@@ -37,7 +38,7 @@ public:
37 ~ModulesInfo(); 38 ~ModulesInfo();
38 39
39private: 40private:
40 OListView* ModulesView; 41 Opie::Ui::OListView* ModulesView;
41 QComboBox* CommandCB; 42 QComboBox* CommandCB;
42 43
43 Detail* ModulesDtl; 44 Detail* ModulesDtl;
@@ -45,7 +46,8 @@ private:
45private slots: 46private 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
@@ -38,6 +38,7 @@
38#include <sys/types.h> 38#include <sys/types.h>
39#include <signal.h> 39#include <signal.h>
40 40
41using namespace Opie::Ui;
41ProcessInfo::ProcessInfo( QWidget* parent, const char* name, WFlags fl ) 42ProcessInfo::ProcessInfo( QWidget* parent, const char* name, WFlags fl )
42 : QWidget( parent, name, fl ) 43 : QWidget( parent, name, fl )
43{ 44{
@@ -55,8 +56,8 @@ ProcessInfo::ProcessInfo( QWidget* parent, const char* name, WFlags fl )
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
@@ -185,6 +186,12 @@ void ProcessInfo::slotSendClicked()
185 186
186} 187}
187 188
189void ProcessInfo::viewProcess( QListViewItem* process ) {
190 if ( !process )
191 return;
192 viewProcess( static_cast<OListViewItem*>( process ) );
193}
194
188void ProcessInfo::viewProcess( OListViewItem *process ) 195void ProcessInfo::viewProcess( OListViewItem *process )
189{ 196{
190 QString pid= process->text( 0 ).stripWhiteSpace(); 197 QString pid= process->text( 0 ).stripWhiteSpace();
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
@@ -24,8 +24,9 @@
24 24
25class Detail; 25class Detail;
26class QComboBox; 26class QComboBox;
27class OListView; 27class QListViewItem;
28class OListViewItem; 28namespace Opie {namespace Ui {class OListView;}}
29namespace Opie {namespace Ui {class OListViewItem;}}
29 30
30class ProcessInfo : public QWidget 31class ProcessInfo : public QWidget
31{ 32{
@@ -35,7 +36,7 @@ public:
35 ~ProcessInfo(); 36 ~ProcessInfo();
36 37
37private: 38private:
38 OListView* ProcessView; 39 Opie::Ui::OListView* ProcessView;
39 QComboBox* SignalCB; 40 QComboBox* SignalCB;
40 QPushButton* SendButton; 41 QPushButton* SendButton;
41 42
@@ -44,7 +45,8 @@ private:
44private slots: 45private 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
@@ -38,6 +38,7 @@
38 38
39#include <qlayout.h> 39#include <qlayout.h>
40 40
41using namespace Opie::Ui;
41SystemInfo::SystemInfo( QWidget *parent, const char *name, WFlags ) 42SystemInfo::SystemInfo( QWidget *parent, const char *name, WFlags )
42 : QWidget( parent, name, WStyle_ContextHelp ) 43 : QWidget( parent, name, WStyle_ContextHelp )
43{ 44{
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
@@ -33,7 +33,7 @@
33#include <qtextstream.h> 33#include <qtextstream.h>
34#include <qwhatsthis.h> 34#include <qwhatsthis.h>
35 35
36using namespace Opie; 36using namespace Opie::Core;
37 37
38VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) 38VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f )
39 : QWidget( parent, name, f ) 39 : QWidget( parent, name, f )