-rw-r--r-- | noncore/settings/sysinfo/benchmarkinfo.cpp | 53 | ||||
-rw-r--r-- | noncore/settings/sysinfo/benchmarkinfo.h | 22 | ||||
-rw-r--r-- | noncore/settings/sysinfo/detail.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/sysinfo/detail.h | 6 | ||||
-rw-r--r-- | noncore/settings/sysinfo/modulesinfo.cpp | 22 | ||||
-rw-r--r-- | noncore/settings/sysinfo/modulesinfo.h | 8 | ||||
-rw-r--r-- | noncore/settings/sysinfo/processinfo.cpp | 24 | ||||
-rw-r--r-- | noncore/settings/sysinfo/processinfo.h | 11 | ||||
-rw-r--r-- | noncore/settings/sysinfo/versioninfo.cpp | 9 |
9 files changed, 84 insertions, 75 deletions
diff --git a/noncore/settings/sysinfo/benchmarkinfo.cpp b/noncore/settings/sysinfo/benchmarkinfo.cpp index 2c68fd5..3c2c15f 100644 --- a/noncore/settings/sysinfo/benchmarkinfo.cpp +++ b/noncore/settings/sysinfo/benchmarkinfo.cpp | |||
@@ -16,8 +16,11 @@ | |||
16 | ** | 16 | ** |
17 | **********************************************************************/ | 17 | **********************************************************************/ |
18 | 18 | ||
19 | #include "benchmarkinfo.h" | ||
20 | |||
19 | /* OPIE */ | 21 | /* OPIE */ |
20 | #include <opie2/ostorageinfo.h> | 22 | #include <opie2/ostorageinfo.h> |
23 | #include <opie2/olistview.h> | ||
21 | #include <qpe/qpeapplication.h> | 24 | #include <qpe/qpeapplication.h> |
22 | #include <qpe/qcopenvelope_qws.h> | 25 | #include <qpe/qcopenvelope_qws.h> |
23 | #include <qpe/qpedecoration_qws.h> | 26 | #include <qpe/qpedecoration_qws.h> |
@@ -37,6 +40,7 @@ | |||
37 | #include <qpainter.h> | 40 | #include <qpainter.h> |
38 | #include <qpushbutton.h> | 41 | #include <qpushbutton.h> |
39 | #include <qtimer.h> | 42 | #include <qtimer.h> |
43 | #include <qwhatsthis.h> | ||
40 | 44 | ||
41 | /* STD */ | 45 | /* STD */ |
42 | #include <time.h> | 46 | #include <time.h> |
@@ -47,9 +51,6 @@ | |||
47 | extern double round(double); | 51 | extern double round(double); |
48 | #endif | 52 | #endif |
49 | 53 | ||
50 | |||
51 | #include "benchmarkinfo.h" | ||
52 | |||
53 | extern "C" | 54 | extern "C" |
54 | { | 55 | { |
55 | void BenchFFT( void ); | 56 | void BenchFFT( void ); |
@@ -95,47 +96,51 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags ) | |||
95 | vb->setSpacing( 4 ); | 96 | vb->setSpacing( 4 ); |
96 | vb->setMargin( 4 ); | 97 | vb->setMargin( 4 ); |
97 | 98 | ||
98 | tests = new QListView( this ); | 99 | tests = new OListView( this ); |
100 | QWhatsThis::add( tests->viewport(), tr( "This area shows the available tests, the results for which the tests " | ||
101 | "have been performed, and comparison values for one selected device. " | ||
102 | "Use the checkboxes to define which tests you want to perform." ) ); | ||
99 | tests->setMargin( 0 ); | 103 | tests->setMargin( 0 ); |
100 | tests->addColumn( tr( "Tests" ) ); | 104 | tests->addColumn( tr( "Tests" ) ); |
101 | tests->addColumn( tr( "Results" ) ); | 105 | tests->addColumn( tr( "Results" ) ); |
102 | tests->addColumn( tr( "Comparison" ) ); | 106 | tests->addColumn( tr( "Comparison" ) ); |
103 | tests->setShowSortIndicator( true ); | 107 | tests->setShowSortIndicator( true ); |
104 | 108 | ||
105 | test_alu = new QCheckListItem( tests, tr( "1. Integer Arithmetic " ), QCheckListItem::CheckBox ); | 109 | test_alu = new OCheckListItem( tests, tr( "1. Integer Arithmetic " ), OCheckListItem::CheckBox ); |
106 | test_fpu = new QCheckListItem( tests, tr( "2. Floating Point Unit " ), QCheckListItem::CheckBox ); | 110 | test_fpu = new OCheckListItem( tests, tr( "2. Floating Point Unit " ), OCheckListItem::CheckBox ); |
107 | test_txt = new QCheckListItem( tests, tr( "3. Text Rendering " ), QCheckListItem::CheckBox ); | 111 | test_txt = new OCheckListItem( tests, tr( "3. Text Rendering " ), OCheckListItem::CheckBox ); |
108 | test_gfx = new QCheckListItem( tests, tr( "4. Gfx Rendering " ), QCheckListItem::CheckBox ); | 112 | test_gfx = new OCheckListItem( tests, tr( "4. Gfx Rendering " ), OCheckListItem::CheckBox ); |
109 | test_ram = new QCheckListItem( tests, tr( "5. RAM Performance " ), QCheckListItem::CheckBox ); | 113 | test_ram = new OCheckListItem( tests, tr( "5. RAM Performance " ), OCheckListItem::CheckBox ); |
110 | test_sd = new QCheckListItem( tests, tr( "6. SD Card Performance " ), QCheckListItem::CheckBox ); | 114 | test_sd = new OCheckListItem( tests, tr( "6. SD Card Performance " ), OCheckListItem::CheckBox ); |
111 | test_cf = new QCheckListItem( tests, tr( "7. CF Card Performance " ), QCheckListItem::CheckBox ); | 115 | test_cf = new OCheckListItem( tests, tr( "7. CF Card Performance " ), OCheckListItem::CheckBox ); |
112 | 116 | ||
113 | test_alu->setText( 1, "n/a" ); | 117 | test_alu->setText( 1, "n/a" ); |
114 | test_fpu->setText( 1, "n/a" ); | 118 | test_fpu->setText( 1, "n/a" ); |
115 | test_txt->setText( 1, "n/a" ); | 119 | test_txt->setText( 1, "n/a" ); |
116 | test_gfx->setText( 1, "n/a" ); | 120 | test_gfx->setText( 1, "n/a" ); |
117 | test_ram->setText( 1, "n/a" ); | 121 | test_ram->setText( 1, "n/a" ); |
118 | test_sd->setText( 1, "n/a" ); | 122 | test_sd->setText( 1, "n/a" ); |
119 | test_cf->setText( 1, "n/a" ); | 123 | test_cf->setText( 1, "n/a" ); |
120 | 124 | ||
121 | test_alu->setText( 2, "n/a" ); | 125 | test_alu->setText( 2, "n/a" ); |
122 | test_fpu->setText( 2, "n/a" ); | 126 | test_fpu->setText( 2, "n/a" ); |
123 | test_txt->setText( 2, "n/a" ); | 127 | test_txt->setText( 2, "n/a" ); |
124 | test_gfx->setText( 2, "n/a" ); | 128 | test_gfx->setText( 2, "n/a" ); |
125 | test_ram->setText( 2, "n/a" ); | 129 | test_ram->setText( 2, "n/a" ); |
126 | test_sd->setText( 2, "n/a" ); | 130 | test_sd->setText( 2, "n/a" ); |
127 | test_cf->setText( 2, "n/a" ); | 131 | test_cf->setText( 2, "n/a" ); |
128 | 132 | ||
129 | startButton = new QPushButton( tr( "&Start Tests!" ), this ); | 133 | startButton = new QPushButton( tr( "&Start Tests!" ), this ); |
134 | QWhatsThis::add( startButton, tr( "Click here to perform the selected tests." ) ); | ||
130 | connect( startButton, SIGNAL( clicked() ), this, SLOT( run() ) ); | 135 | connect( startButton, SIGNAL( clicked() ), this, SLOT( run() ) ); |
131 | |||
132 | vb->addWidget( tests, 2 ); | 136 | vb->addWidget( tests, 2 ); |
133 | 137 | ||
134 | QFile f( QPEApplication::qpeDir() + "/share/sysinfo/results" ); | 138 | QFile f( QPEApplication::qpeDir() + "/share/sysinfo/results" ); |
135 | if ( f.open( IO_ReadOnly ) ) | 139 | if ( f.open( IO_ReadOnly ) ) |
136 | { | 140 | { |
137 | machineCombo = new QComboBox( this ); | 141 | machineCombo = new QComboBox( this ); |
138 | 142 | QWhatsThis::add( machineCombo, tr( "Choose a model to compare your results with." ) ); | |
143 | |||
139 | QTextStream ts( &f ); | 144 | QTextStream ts( &f ); |
140 | while( !ts.eof() ) | 145 | while( !ts.eof() ) |
141 | { | 146 | { |
@@ -145,13 +150,13 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags ) | |||
145 | machines.insert( machline, new QStringList( QStringList::split( ",", resline ) ) ); | 150 | machines.insert( machline, new QStringList( QStringList::split( ",", resline ) ) ); |
146 | machineCombo->insertItem( machline ); | 151 | machineCombo->insertItem( machline ); |
147 | } | 152 | } |
148 | 153 | ||
149 | QHBoxLayout* hb = new QHBoxLayout( vb ); | 154 | QHBoxLayout* hb = new QHBoxLayout( vb ); |
150 | hb->addWidget( new QLabel( tr( "Compare To:" ), this ) ); | 155 | hb->addWidget( new QLabel( tr( "Compare To:" ), this ) ); |
151 | hb->addWidget( machineCombo, 2 ); | 156 | hb->addWidget( machineCombo, 2 ); |
152 | connect( machineCombo, SIGNAL( activated(int) ), this, SLOT( machineActivated(int) ) ); | 157 | connect( machineCombo, SIGNAL( activated(int) ), this, SLOT( machineActivated(int) ) ); |
153 | } | 158 | } |
154 | 159 | ||
155 | vb->addWidget( startButton, 2 ); | 160 | vb->addWidget( startButton, 2 ); |
156 | } | 161 | } |
157 | 162 | ||
@@ -332,7 +337,7 @@ int BenchmarkInfo::gfxRendering( int seconds ) | |||
332 | 337 | ||
333 | } | 338 | } |
334 | 339 | ||
335 | void BenchmarkInfo::performFileTest( const QString& fname, QCheckListItem* item ) | 340 | void BenchmarkInfo::performFileTest( const QString& fname, OCheckListItem* item ) |
336 | { | 341 | { |
337 | QTime time; | 342 | QTime time; |
338 | time.start(); | 343 | time.start(); |
diff --git a/noncore/settings/sysinfo/benchmarkinfo.h b/noncore/settings/sysinfo/benchmarkinfo.h index d143602..c3d44ec 100644 --- a/noncore/settings/sysinfo/benchmarkinfo.h +++ b/noncore/settings/sysinfo/benchmarkinfo.h | |||
@@ -23,9 +23,9 @@ | |||
23 | 23 | ||
24 | class QClipboard; | 24 | class QClipboard; |
25 | class QComboBox; | 25 | class QComboBox; |
26 | class QCheckListItem; | 26 | class OCheckListItem; |
27 | class QPushButton; | 27 | class QPushButton; |
28 | class QListView; | 28 | class OListView; |
29 | 29 | ||
30 | class BenchmarkInfo : public QWidget | 30 | class 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 | QCheckListItem* test_alu; | 38 | OCheckListItem* test_alu; |
39 | QCheckListItem* test_fpu; | 39 | OCheckListItem* test_fpu; |
40 | QCheckListItem* test_txt; | 40 | OCheckListItem* test_txt; |
41 | QCheckListItem* test_gfx; | 41 | OCheckListItem* test_gfx; |
42 | QCheckListItem* test_ram; | 42 | OCheckListItem* test_ram; |
43 | QCheckListItem* test_sd; | 43 | OCheckListItem* test_sd; |
44 | QCheckListItem* test_cf; | 44 | 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 | QListView* tests; | 55 | 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, QCheckListItem* item ); | 61 | void performFileTest( const QString& fname, OCheckListItem* item ); |
62 | 62 | ||
63 | private slots: | 63 | private slots: |
64 | bool writeFile( const QString& ); | 64 | bool writeFile( const QString& ); |
diff --git a/noncore/settings/sysinfo/detail.cpp b/noncore/settings/sysinfo/detail.cpp index 79daa2b..6645fdd 100644 --- a/noncore/settings/sysinfo/detail.cpp +++ b/noncore/settings/sysinfo/detail.cpp | |||
@@ -21,9 +21,7 @@ | |||
21 | 21 | ||
22 | #include "detail.h" | 22 | #include "detail.h" |
23 | 23 | ||
24 | #include <sys/types.h> | 24 | #include <qtextview.h> |
25 | #include <stdio.h> | ||
26 | |||
27 | #include <qlayout.h> | 25 | #include <qlayout.h> |
28 | 26 | ||
29 | Detail::Detail( QWidget* parent, const char* name, WFlags ) | 27 | Detail::Detail( QWidget* parent, const char* name, WFlags ) |
diff --git a/noncore/settings/sysinfo/detail.h b/noncore/settings/sysinfo/detail.h index 7ca9d45..71d3e3a 100644 --- a/noncore/settings/sysinfo/detail.h +++ b/noncore/settings/sysinfo/detail.h | |||
@@ -23,10 +23,8 @@ | |||
23 | #define DETAIL_H | 23 | #define DETAIL_H |
24 | 24 | ||
25 | #include <qwidget.h> | 25 | #include <qwidget.h> |
26 | #include <qcombo.h> | 26 | |
27 | #include <qtextview.h> | 27 | class QTextView; |
28 | #include <qpushbutton.h> | ||
29 | #include <qlistview.h> | ||
30 | 28 | ||
31 | class Detail : public QWidget | 29 | class Detail : public QWidget |
32 | { | 30 | { |
diff --git a/noncore/settings/sysinfo/modulesinfo.cpp b/noncore/settings/sysinfo/modulesinfo.cpp index e688a29..dfe48e1 100644 --- a/noncore/settings/sysinfo/modulesinfo.cpp +++ b/noncore/settings/sysinfo/modulesinfo.cpp | |||
@@ -23,12 +23,16 @@ | |||
23 | #include "detail.h" | 23 | #include "detail.h" |
24 | 24 | ||
25 | /* OPIE */ | 25 | /* OPIE */ |
26 | #include <opie2/olistview.h> | ||
26 | #include <qpe/qpeapplication.h> | 27 | #include <qpe/qpeapplication.h> |
27 | 28 | ||
28 | /* QT */ | 29 | /* QT */ |
30 | #include <qcombobox.h> | ||
29 | #include <qfile.h> | 31 | #include <qfile.h> |
30 | #include <qlayout.h> | 32 | #include <qlayout.h> |
31 | #include <qmessagebox.h> | 33 | #include <qmessagebox.h> |
34 | #include <qpushbutton.h> | ||
35 | #include <qtextview.h> | ||
32 | #include <qtimer.h> | 36 | #include <qtimer.h> |
33 | #include <qwhatsthis.h> | 37 | #include <qwhatsthis.h> |
34 | 38 | ||
@@ -39,7 +43,7 @@ ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl ) | |||
39 | layout->setSpacing( 4 ); | 43 | layout->setSpacing( 4 ); |
40 | layout->setMargin( 4 ); | 44 | layout->setMargin( 4 ); |
41 | 45 | ||
42 | ModulesView = new QListView( this ); | 46 | ModulesView = new OListView( this ); |
43 | int colnum = ModulesView->addColumn( tr( "Module" ) ); | 47 | int colnum = ModulesView->addColumn( tr( "Module" ) ); |
44 | colnum = ModulesView->addColumn( tr( "Size" ) ); | 48 | colnum = ModulesView->addColumn( tr( "Size" ) ); |
45 | ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); | 49 | ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); |
@@ -54,8 +58,8 @@ ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl ) | |||
54 | if ( QFile::exists( "/sbin/modinfo" ) ) | 58 | if ( QFile::exists( "/sbin/modinfo" ) ) |
55 | { | 59 | { |
56 | QPEApplication::setStylusOperation( ModulesView->viewport(), QPEApplication::RightOnHold ); | 60 | QPEApplication::setStylusOperation( ModulesView->viewport(), QPEApplication::RightOnHold ); |
57 | connect( ModulesView, SIGNAL( rightButtonPressed(QListViewItem*,const QPoint&,int) ), | 61 | connect( ModulesView, SIGNAL( rightButtonPressed(OListViewItem*,const QPoint&,int) ), |
58 | this, SLOT( viewModules(QListViewItem*) ) ); | 62 | this, SLOT( viewModules(OListViewItem*) ) ); |
59 | } | 63 | } |
60 | 64 | ||
61 | CommandCB = new QComboBox( FALSE, this ); | 65 | CommandCB = new QComboBox( FALSE, this ); |
@@ -93,7 +97,7 @@ void ModulesInfo::updateData() | |||
93 | int modsize, usecount; | 97 | int modsize, usecount; |
94 | 98 | ||
95 | QString selectedmod; | 99 | QString selectedmod; |
96 | QListViewItem *curritem = ModulesView->currentItem(); | 100 | OListViewItem *curritem = static_cast<OListViewItem*>( ModulesView->currentItem() ); |
97 | if ( curritem ) | 101 | if ( curritem ) |
98 | { | 102 | { |
99 | selectedmod = curritem->text( 0 ); | 103 | selectedmod = curritem->text( 0 ); |
@@ -105,8 +109,8 @@ void ModulesInfo::updateData() | |||
105 | 109 | ||
106 | if ( procfile ) | 110 | if ( procfile ) |
107 | { | 111 | { |
108 | QListViewItem *newitem; | 112 | OListViewItem *newitem; |
109 | QListViewItem *selecteditem = 0x0; | 113 | OListViewItem *selecteditem = 0x0; |
110 | while ( true ) | 114 | while ( true ) |
111 | { | 115 | { |
112 | modname[0] = '\0'; | 116 | modname[0] = '\0'; |
@@ -121,7 +125,7 @@ void ModulesInfo::updateData() | |||
121 | QString qusecount = QString::number( usecount ).rightJustify( 2, ' ' ); | 125 | QString qusecount = QString::number( usecount ).rightJustify( 2, ' ' ); |
122 | QString qusage = QString( usage ); | 126 | QString qusage = QString( usage ); |
123 | 127 | ||
124 | newitem = new QListViewItem( ModulesView, qmodname, qmodsize, qusecount, qusage ); | 128 | newitem = new OListViewItem( ModulesView, qmodname, qmodsize, qusecount, qusage ); |
125 | if ( qmodname == selectedmod ) | 129 | if ( qmodname == selectedmod ) |
126 | { | 130 | { |
127 | selecteditem = newitem; | 131 | selecteditem = newitem; |
@@ -140,7 +144,7 @@ void ModulesInfo::slotSendClicked() | |||
140 | return; | 144 | return; |
141 | } | 145 | } |
142 | 146 | ||
143 | QString capstr = tr( "You really want to execute %1 for this module?" ).arg( CommandCB->currentText() ); | 147 | QString capstr = tr( "You really want to execute\n%1 for this module?" ).arg( CommandCB->currentText() ); |
144 | 148 | ||
145 | QString modname = ModulesView->currentItem()->text( 0 ); | 149 | QString modname = ModulesView->currentItem()->text( 0 ); |
146 | 150 | ||
@@ -159,7 +163,7 @@ void ModulesInfo::slotSendClicked() | |||
159 | 163 | ||
160 | } | 164 | } |
161 | 165 | ||
162 | void ModulesInfo::viewModules( QListViewItem *modules ) | 166 | void ModulesInfo::viewModules( OListViewItem *modules ) |
163 | { | 167 | { |
164 | QString modname = modules->text( 0 ); | 168 | QString modname = modules->text( 0 ); |
165 | QString capstr = "Module: "; | 169 | QString capstr = "Module: "; |
diff --git a/noncore/settings/sysinfo/modulesinfo.h b/noncore/settings/sysinfo/modulesinfo.h index e974610..78dce73 100644 --- a/noncore/settings/sysinfo/modulesinfo.h +++ b/noncore/settings/sysinfo/modulesinfo.h | |||
@@ -26,8 +26,8 @@ | |||
26 | 26 | ||
27 | class Detail; | 27 | class Detail; |
28 | class QComboBox; | 28 | class QComboBox; |
29 | class QListView; | 29 | class OListView; |
30 | class QListViewItem; | 30 | class OListViewItem; |
31 | 31 | ||
32 | class ModulesInfo : public QWidget | 32 | class ModulesInfo : public QWidget |
33 | { | 33 | { |
@@ -37,7 +37,7 @@ public: | |||
37 | ~ModulesInfo(); | 37 | ~ModulesInfo(); |
38 | 38 | ||
39 | private: | 39 | private: |
40 | QListView* ModulesView; | 40 | OListView* ModulesView; |
41 | QComboBox* CommandCB; | 41 | QComboBox* CommandCB; |
42 | 42 | ||
43 | Detail* ModulesDtl; | 43 | Detail* ModulesDtl; |
@@ -45,7 +45,7 @@ private: | |||
45 | private slots: | 45 | private slots: |
46 | void updateData(); | 46 | void updateData(); |
47 | void slotSendClicked(); | 47 | void slotSendClicked(); |
48 | void viewModules( QListViewItem * ); | 48 | void viewModules( OListViewItem * ); |
49 | }; | 49 | }; |
50 | 50 | ||
51 | #endif | 51 | #endif |
diff --git a/noncore/settings/sysinfo/processinfo.cpp b/noncore/settings/sysinfo/processinfo.cpp index 69b4ab5..dd9a05d 100644 --- a/noncore/settings/sysinfo/processinfo.cpp +++ b/noncore/settings/sysinfo/processinfo.cpp | |||
@@ -21,12 +21,16 @@ | |||
21 | #include "detail.h" | 21 | #include "detail.h" |
22 | 22 | ||
23 | /* OPIE */ | 23 | /* OPIE */ |
24 | #include <opie2/olistview.h> | ||
24 | #include <qpe/qpeapplication.h> | 25 | #include <qpe/qpeapplication.h> |
25 | 26 | ||
26 | /* QT */ | 27 | /* QT */ |
28 | #include <qcombobox.h> | ||
27 | #include <qdir.h> | 29 | #include <qdir.h> |
28 | #include <qlayout.h> | 30 | #include <qlayout.h> |
29 | #include <qmessagebox.h> | 31 | #include <qmessagebox.h> |
32 | #include <qpushbutton.h> | ||
33 | #include <qtextview.h> | ||
30 | #include <qtimer.h> | 34 | #include <qtimer.h> |
31 | #include <qwhatsthis.h> | 35 | #include <qwhatsthis.h> |
32 | 36 | ||
@@ -42,7 +46,7 @@ ProcessInfo::ProcessInfo( QWidget* parent, const char* name, WFlags fl ) | |||
42 | layout->setMargin( 4 ); | 46 | layout->setMargin( 4 ); |
43 | 47 | ||
44 | 48 | ||
45 | ProcessView = new QListView( this, "ProcessView" ); | 49 | ProcessView = new OListView( this, "ProcessView" ); |
46 | int colnum = ProcessView->addColumn( tr( "PID" ) ); | 50 | int colnum = ProcessView->addColumn( tr( "PID" ) ); |
47 | ProcessView->setColumnAlignment( colnum, Qt::AlignRight ); | 51 | ProcessView->setColumnAlignment( colnum, Qt::AlignRight ); |
48 | colnum = ProcessView->addColumn( tr( "Command" ),96 ); | 52 | colnum = ProcessView->addColumn( tr( "Command" ),96 ); |
@@ -51,8 +55,8 @@ ProcessInfo::ProcessInfo( QWidget* parent, const char* name, WFlags fl ) | |||
51 | ProcessView->setColumnAlignment( colnum, Qt::AlignRight ); | 55 | ProcessView->setColumnAlignment( colnum, Qt::AlignRight ); |
52 | ProcessView->setAllColumnsShowFocus( TRUE ); | 56 | ProcessView->setAllColumnsShowFocus( TRUE ); |
53 | QPEApplication::setStylusOperation( ProcessView->viewport(), QPEApplication::RightOnHold ); | 57 | QPEApplication::setStylusOperation( ProcessView->viewport(), QPEApplication::RightOnHold ); |
54 | connect( ProcessView, SIGNAL( rightButtonPressed(QListViewItem*,const QPoint&,int) ), | 58 | connect( ProcessView, SIGNAL( rightButtonPressed(OListViewItem*,const QPoint&,int) ), |
55 | this, SLOT( viewProcess(QListViewItem*) ) ); | 59 | this, SLOT( viewProcess(OListViewItem*) ) ); |
56 | layout->addMultiCellWidget( ProcessView, 0, 0, 0, 1 ); | 60 | layout->addMultiCellWidget( ProcessView, 0, 0, 0, 1 ); |
57 | 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." ) ); | 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." ) ); |
58 | 62 | ||
@@ -101,7 +105,7 @@ void ProcessInfo::updateData() | |||
101 | char comm[64]; | 105 | char comm[64]; |
102 | 106 | ||
103 | QString selectedpid; | 107 | QString selectedpid; |
104 | QListViewItem *curritem = ProcessView->currentItem(); | 108 | OListViewItem *curritem = static_cast<OListViewItem*>( ProcessView->currentItem() ); |
105 | if ( curritem ) | 109 | if ( curritem ) |
106 | { | 110 | { |
107 | selectedpid = curritem->text( 0 ); | 111 | selectedpid = curritem->text( 0 ); |
@@ -109,8 +113,8 @@ void ProcessInfo::updateData() | |||
109 | 113 | ||
110 | ProcessView->clear(); | 114 | ProcessView->clear(); |
111 | 115 | ||
112 | QListViewItem *newitem; | 116 | OListViewItem *newitem; |
113 | QListViewItem *selecteditem = 0x0; | 117 | OListViewItem *selecteditem = 0x0; |
114 | QDir *procdir = new QDir("/proc", 0, QDir::Name, QDir::Dirs); | 118 | QDir *procdir = new QDir("/proc", 0, QDir::Name, QDir::Dirs); |
115 | QFileInfoList *proclist = new QFileInfoList(*(procdir->entryInfoList())); | 119 | QFileInfoList *proclist = new QFileInfoList(*(procdir->entryInfoList())); |
116 | if ( proclist ) | 120 | if ( proclist ) |
@@ -140,7 +144,7 @@ void ProcessInfo::updateData() | |||
140 | processtime = processtime.rightJustify( 9, ' ' ); | 144 | processtime = processtime.rightJustify( 9, ' ' ); |
141 | fclose( procfile ); | 145 | fclose( procfile ); |
142 | 146 | ||
143 | newitem = new QListViewItem( ProcessView, processnum, processcmd, processstatus, processtime ); | 147 | newitem = new OListViewItem( ProcessView, processnum, processcmd, processstatus, processtime ); |
144 | if ( processnum == selectedpid ) | 148 | if ( processnum == selectedpid ) |
145 | { | 149 | { |
146 | selecteditem = newitem; | 150 | selecteditem = newitem; |
@@ -157,7 +161,7 @@ void ProcessInfo::updateData() | |||
157 | 161 | ||
158 | void ProcessInfo::slotSendClicked() | 162 | void ProcessInfo::slotSendClicked() |
159 | { | 163 | { |
160 | QListViewItem *currprocess = ProcessView->currentItem(); | 164 | OListViewItem *currprocess = static_cast<OListViewItem*>( ProcessView->currentItem() ); |
161 | if ( !currprocess ) | 165 | if ( !currprocess ) |
162 | { | 166 | { |
163 | return; | 167 | return; |
@@ -169,7 +173,7 @@ void ProcessInfo::slotSendClicked() | |||
169 | if ( QMessageBox::warning( this, currprocess->text( 1 ), capstr, | 173 | if ( QMessageBox::warning( this, currprocess->text( 1 ), capstr, |
170 | QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes ) | 174 | QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes ) |
171 | { | 175 | { |
172 | currprocess = ProcessView->currentItem(); | 176 | currprocess = static_cast<OListViewItem*>( ProcessView->currentItem() ); |
173 | if ( currprocess ) | 177 | if ( currprocess ) |
174 | { | 178 | { |
175 | QString sigstr = SignalCB->currentText(); | 179 | QString sigstr = SignalCB->currentText(); |
@@ -181,7 +185,7 @@ void ProcessInfo::slotSendClicked() | |||
181 | 185 | ||
182 | } | 186 | } |
183 | 187 | ||
184 | void ProcessInfo::viewProcess( QListViewItem *process ) | 188 | void ProcessInfo::viewProcess( OListViewItem *process ) |
185 | { | 189 | { |
186 | QString pid= process->text( 0 ).stripWhiteSpace(); | 190 | QString pid= process->text( 0 ).stripWhiteSpace(); |
187 | QString command = process->text( 1 ); | 191 | QString command = process->text( 1 ); |
diff --git a/noncore/settings/sysinfo/processinfo.h b/noncore/settings/sysinfo/processinfo.h index 687e080..6e7acd5 100644 --- a/noncore/settings/sysinfo/processinfo.h +++ b/noncore/settings/sysinfo/processinfo.h | |||
@@ -21,12 +21,11 @@ | |||
21 | #define PROCESSINFO_H | 21 | #define PROCESSINFO_H |
22 | 22 | ||
23 | #include <qwidget.h> | 23 | #include <qwidget.h> |
24 | #include <qlistview.h> | ||
25 | 24 | ||
26 | class Detail; | 25 | class Detail; |
27 | class QComboBox; | 26 | class QComboBox; |
28 | class QListView; | 27 | class OListView; |
29 | class QListViewItem; | 28 | class OListViewItem; |
30 | 29 | ||
31 | class ProcessInfo : public QWidget | 30 | class ProcessInfo : public QWidget |
32 | { | 31 | { |
@@ -36,16 +35,16 @@ public: | |||
36 | ~ProcessInfo(); | 35 | ~ProcessInfo(); |
37 | 36 | ||
38 | private: | 37 | private: |
39 | QListView* ProcessView; | 38 | OListView* ProcessView; |
40 | QComboBox* SignalCB; | 39 | QComboBox* SignalCB; |
41 | QPushButton* SendButton; | 40 | QPushButton* SendButton; |
42 | 41 | ||
43 | Detail *ProcessDtl; | 42 | Detail *ProcessDtl; |
44 | 43 | ||
45 | private slots: | 44 | private slots: |
46 | void updateData(); | 45 | void updateData(); |
47 | void slotSendClicked(); | 46 | void slotSendClicked(); |
48 | void viewProcess( QListViewItem * ); | 47 | void viewProcess( OListViewItem * ); |
49 | }; | 48 | }; |
50 | 49 | ||
51 | #endif | 50 | #endif |
diff --git a/noncore/settings/sysinfo/versioninfo.cpp b/noncore/settings/sysinfo/versioninfo.cpp index 0ebcebe..4bebd06 100644 --- a/noncore/settings/sysinfo/versioninfo.cpp +++ b/noncore/settings/sysinfo/versioninfo.cpp | |||
@@ -18,9 +18,14 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "versioninfo.h" | ||
22 | |||
23 | /* OPIE */ | ||
24 | #include <opie2/odevice.h> | ||
21 | #include <qpe/resource.h> | 25 | #include <qpe/resource.h> |
22 | #include <qpe/version.h> | 26 | #include <qpe/version.h> |
23 | 27 | ||
28 | /* QT */ | ||
24 | #include <qfile.h> | 29 | #include <qfile.h> |
25 | #include <qlabel.h> | 30 | #include <qlabel.h> |
26 | #include <qlayout.h> | 31 | #include <qlayout.h> |
@@ -28,10 +33,6 @@ | |||
28 | #include <qtextstream.h> | 33 | #include <qtextstream.h> |
29 | #include <qwhatsthis.h> | 34 | #include <qwhatsthis.h> |
30 | 35 | ||
31 | #include "versioninfo.h" | ||
32 | |||
33 | #include <opie2/odevice.h> | ||
34 | |||
35 | using namespace Opie; | 36 | using namespace Opie; |
36 | 37 | ||
37 | VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) | 38 | VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) |