summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-03-05 21:37:50 (UTC)
committer mickeyl <mickeyl>2004-03-05 21:37:50 (UTC)
commit8851dc992ab535bde6cb417cafc44658953f495d (patch) (side-by-side diff)
tree0a70bd4a768880e61c5af1ab142508c2bb81ecd0
parentb9d58b616102970872129b5bc2f55569910f5c03 (diff)
downloadopie-8851dc992ab535bde6cb417cafc44658953f495d.zip
opie-8851dc992ab535bde6cb417cafc44658953f495d.tar.gz
opie-8851dc992ab535bde6cb417cafc44658953f495d.tar.bz2
use listview stuff from libopie2
miscellaneous cleanups
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/benchmarkinfo.cpp53
-rw-r--r--noncore/settings/sysinfo/benchmarkinfo.h22
-rw-r--r--noncore/settings/sysinfo/detail.cpp4
-rw-r--r--noncore/settings/sysinfo/detail.h6
-rw-r--r--noncore/settings/sysinfo/modulesinfo.cpp22
-rw-r--r--noncore/settings/sysinfo/modulesinfo.h8
-rw-r--r--noncore/settings/sysinfo/processinfo.cpp24
-rw-r--r--noncore/settings/sysinfo/processinfo.h11
-rw-r--r--noncore/settings/sysinfo/versioninfo.cpp9
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
@@ -18,4 +18,7 @@
+#include "benchmarkinfo.h"
+
/* OPIE */
#include <opie2/ostorageinfo.h>
+#include <opie2/olistview.h>
#include <qpe/qpeapplication.h>
@@ -39,2 +42,3 @@
#include <qtimer.h>
+#include <qwhatsthis.h>
@@ -49,5 +53,2 @@ extern double round(double);
-
-#include "benchmarkinfo.h"
-
extern "C"
@@ -97,3 +98,6 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags )
- tests = new QListView( this );
+ tests = new OListView( this );
+ QWhatsThis::add( tests->viewport(), tr( "This area shows the available tests, the results for which the tests "
+ "have been performed, and comparison values for one selected device. "
+ "Use the checkboxes to define which tests you want to perform." ) );
tests->setMargin( 0 );
@@ -104,12 +108,12 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags )
- test_alu = new QCheckListItem( tests, tr( "1. Integer Arithmetic " ), QCheckListItem::CheckBox );
- test_fpu = new QCheckListItem( tests, tr( "2. Floating Point Unit " ), QCheckListItem::CheckBox );
- test_txt = new QCheckListItem( tests, tr( "3. Text Rendering " ), QCheckListItem::CheckBox );
- test_gfx = new QCheckListItem( tests, tr( "4. Gfx Rendering " ), QCheckListItem::CheckBox );
- test_ram = new QCheckListItem( tests, tr( "5. RAM Performance " ), QCheckListItem::CheckBox );
- test_sd = new QCheckListItem( tests, tr( "6. SD Card Performance " ), QCheckListItem::CheckBox );
- test_cf = new QCheckListItem( tests, tr( "7. CF Card Performance " ), QCheckListItem::CheckBox );
-
+ test_alu = new OCheckListItem( tests, tr( "1. Integer Arithmetic " ), OCheckListItem::CheckBox );
+ test_fpu = new OCheckListItem( tests, tr( "2. Floating Point Unit " ), OCheckListItem::CheckBox );
+ test_txt = new OCheckListItem( tests, tr( "3. Text Rendering " ), OCheckListItem::CheckBox );
+ test_gfx = new OCheckListItem( tests, tr( "4. Gfx Rendering " ), OCheckListItem::CheckBox );
+ test_ram = new OCheckListItem( tests, tr( "5. RAM Performance " ), OCheckListItem::CheckBox );
+ test_sd = new OCheckListItem( tests, tr( "6. SD Card Performance " ), OCheckListItem::CheckBox );
+ test_cf = new OCheckListItem( tests, tr( "7. CF Card Performance " ), OCheckListItem::CheckBox );
+
test_alu->setText( 1, "n/a" );
- test_fpu->setText( 1, "n/a" );
+ test_fpu->setText( 1, "n/a" );
test_txt->setText( 1, "n/a" );
@@ -118,6 +122,6 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags )
test_sd->setText( 1, "n/a" );
- test_cf->setText( 1, "n/a" );
-
+ test_cf->setText( 1, "n/a" );
+
test_alu->setText( 2, "n/a" );
- test_fpu->setText( 2, "n/a" );
+ test_fpu->setText( 2, "n/a" );
test_txt->setText( 2, "n/a" );
@@ -126,9 +130,9 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags )
test_sd->setText( 2, "n/a" );
- test_cf->setText( 2, "n/a" );
-
+ test_cf->setText( 2, "n/a" );
+
startButton = new QPushButton( tr( "&Start Tests!" ), this );
+ QWhatsThis::add( startButton, tr( "Click here to perform the selected tests." ) );
connect( startButton, SIGNAL( clicked() ), this, SLOT( run() ) );
-
vb->addWidget( tests, 2 );
-
+
QFile f( QPEApplication::qpeDir() + "/share/sysinfo/results" );
@@ -137,3 +141,4 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags )
machineCombo = new QComboBox( this );
-
+ QWhatsThis::add( machineCombo, tr( "Choose a model to compare your results with." ) );
+
QTextStream ts( &f );
@@ -147,3 +152,3 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags )
}
-
+
QHBoxLayout* hb = new QHBoxLayout( vb );
@@ -153,3 +158,3 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags )
}
-
+
vb->addWidget( startButton, 2 );
@@ -334,3 +339,3 @@ int BenchmarkInfo::gfxRendering( int seconds )
-void BenchmarkInfo::performFileTest( const QString& fname, QCheckListItem* item )
+void BenchmarkInfo::performFileTest( const QString& fname, OCheckListItem* item )
{
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
@@ -25,5 +25,5 @@ class QClipboard;
class QComboBox;
-class QCheckListItem;
+class OCheckListItem;
class QPushButton;
-class QListView;
+class OListView;
@@ -37,9 +37,9 @@ public:
- QCheckListItem* test_alu;
- QCheckListItem* test_fpu;
- QCheckListItem* test_txt;
- QCheckListItem* test_gfx;
- QCheckListItem* test_ram;
- QCheckListItem* test_sd;
- QCheckListItem* test_cf;
+ OCheckListItem* test_alu;
+ OCheckListItem* test_fpu;
+ OCheckListItem* test_txt;
+ OCheckListItem* test_gfx;
+ OCheckListItem* test_ram;
+ OCheckListItem* test_sd;
+ OCheckListItem* test_cf;
@@ -54,3 +54,3 @@ public:
QComboBox* machineCombo;
- QListView* tests;
+ OListView* tests;
QPushButton* startButton;
@@ -60,3 +60,3 @@ public:
int gfxRendering( int );
- void performFileTest( const QString& fname, QCheckListItem* item );
+ void performFileTest( const QString& fname, OCheckListItem* item );
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
@@ -23,5 +23,3 @@
-#include <sys/types.h>
-#include <stdio.h>
-
+#include <qtextview.h>
#include <qlayout.h>
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
@@ -25,6 +25,4 @@
#include <qwidget.h>
-#include <qcombo.h>
-#include <qtextview.h>
-#include <qpushbutton.h>
-#include <qlistview.h>
+
+class QTextView;
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
@@ -25,2 +25,3 @@
/* OPIE */
+#include <opie2/olistview.h>
#include <qpe/qpeapplication.h>
@@ -28,2 +29,3 @@
/* QT */
+#include <qcombobox.h>
#include <qfile.h>
@@ -31,2 +33,4 @@
#include <qmessagebox.h>
+#include <qpushbutton.h>
+#include <qtextview.h>
#include <qtimer.h>
@@ -41,3 +45,3 @@ ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl )
- ModulesView = new QListView( this );
+ ModulesView = new OListView( this );
int colnum = ModulesView->addColumn( tr( "Module" ) );
@@ -56,4 +60,4 @@ ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl )
QPEApplication::setStylusOperation( ModulesView->viewport(), QPEApplication::RightOnHold );
- connect( ModulesView, SIGNAL( rightButtonPressed(QListViewItem*,const QPoint&,int) ),
- this, SLOT( viewModules(QListViewItem*) ) );
+ connect( ModulesView, SIGNAL( rightButtonPressed(OListViewItem*,const QPoint&,int) ),
+ this, SLOT( viewModules(OListViewItem*) ) );
}
@@ -95,3 +99,3 @@ void ModulesInfo::updateData()
QString selectedmod;
- QListViewItem *curritem = ModulesView->currentItem();
+ OListViewItem *curritem = static_cast<OListViewItem*>( ModulesView->currentItem() );
if ( curritem )
@@ -107,4 +111,4 @@ void ModulesInfo::updateData()
{
- QListViewItem *newitem;
- QListViewItem *selecteditem = 0x0;
+ OListViewItem *newitem;
+ OListViewItem *selecteditem = 0x0;
while ( true )
@@ -123,3 +127,3 @@ void ModulesInfo::updateData()
- newitem = new QListViewItem( ModulesView, qmodname, qmodsize, qusecount, qusage );
+ newitem = new OListViewItem( ModulesView, qmodname, qmodsize, qusecount, qusage );
if ( qmodname == selectedmod )
@@ -142,3 +146,3 @@ void ModulesInfo::slotSendClicked()
- QString capstr = tr( "You really want to execute %1 for this module?" ).arg( CommandCB->currentText() );
+ QString capstr = tr( "You really want to execute\n%1 for this module?" ).arg( CommandCB->currentText() );
@@ -161,3 +165,3 @@ void ModulesInfo::slotSendClicked()
-void ModulesInfo::viewModules( QListViewItem *modules )
+void ModulesInfo::viewModules( OListViewItem *modules )
{
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
@@ -28,4 +28,4 @@ class Detail;
class QComboBox;
-class QListView;
-class QListViewItem;
+class OListView;
+class OListViewItem;
@@ -39,3 +39,3 @@ public:
private:
- QListView* ModulesView;
+ OListView* ModulesView;
QComboBox* CommandCB;
@@ -47,3 +47,3 @@ private slots:
void slotSendClicked();
- void viewModules( QListViewItem * );
+ void viewModules( OListViewItem * );
};
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
@@ -23,2 +23,3 @@
/* OPIE */
+#include <opie2/olistview.h>
#include <qpe/qpeapplication.h>
@@ -26,2 +27,3 @@
/* QT */
+#include <qcombobox.h>
#include <qdir.h>
@@ -29,2 +31,4 @@
#include <qmessagebox.h>
+#include <qpushbutton.h>
+#include <qtextview.h>
#include <qtimer.h>
@@ -44,3 +48,3 @@ ProcessInfo::ProcessInfo( QWidget* parent, const char* name, WFlags fl )
- ProcessView = new QListView( this, "ProcessView" );
+ ProcessView = new OListView( this, "ProcessView" );
int colnum = ProcessView->addColumn( tr( "PID" ) );
@@ -53,4 +57,4 @@ ProcessInfo::ProcessInfo( QWidget* parent, const char* name, WFlags fl )
QPEApplication::setStylusOperation( ProcessView->viewport(), QPEApplication::RightOnHold );
- connect( ProcessView, SIGNAL( rightButtonPressed(QListViewItem*,const QPoint&,int) ),
- this, SLOT( viewProcess(QListViewItem*) ) );
+ connect( ProcessView, SIGNAL( rightButtonPressed(OListViewItem*,const QPoint&,int) ),
+ this, SLOT( viewProcess(OListViewItem*) ) );
layout->addMultiCellWidget( ProcessView, 0, 0, 0, 1 );
@@ -103,3 +107,3 @@ void ProcessInfo::updateData()
QString selectedpid;
- QListViewItem *curritem = ProcessView->currentItem();
+ OListViewItem *curritem = static_cast<OListViewItem*>( ProcessView->currentItem() );
if ( curritem )
@@ -111,4 +115,4 @@ void ProcessInfo::updateData()
- QListViewItem *newitem;
- QListViewItem *selecteditem = 0x0;
+ OListViewItem *newitem;
+ OListViewItem *selecteditem = 0x0;
QDir *procdir = new QDir("/proc", 0, QDir::Name, QDir::Dirs);
@@ -142,3 +146,3 @@ void ProcessInfo::updateData()
- newitem = new QListViewItem( ProcessView, processnum, processcmd, processstatus, processtime );
+ newitem = new OListViewItem( ProcessView, processnum, processcmd, processstatus, processtime );
if ( processnum == selectedpid )
@@ -159,3 +163,3 @@ void ProcessInfo::slotSendClicked()
{
- QListViewItem *currprocess = ProcessView->currentItem();
+ OListViewItem *currprocess = static_cast<OListViewItem*>( ProcessView->currentItem() );
if ( !currprocess )
@@ -171,3 +175,3 @@ void ProcessInfo::slotSendClicked()
{
- currprocess = ProcessView->currentItem();
+ currprocess = static_cast<OListViewItem*>( ProcessView->currentItem() );
if ( currprocess )
@@ -183,3 +187,3 @@ void ProcessInfo::slotSendClicked()
-void ProcessInfo::viewProcess( QListViewItem *process )
+void ProcessInfo::viewProcess( OListViewItem *process )
{
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
@@ -23,3 +23,2 @@
#include <qwidget.h>
-#include <qlistview.h>
@@ -27,4 +26,4 @@ class Detail;
class QComboBox;
-class QListView;
-class QListViewItem;
+class OListView;
+class OListViewItem;
@@ -38,6 +37,6 @@ public:
private:
- QListView* ProcessView;
+ OListView* ProcessView;
QComboBox* SignalCB;
QPushButton* SendButton;
-
+
Detail *ProcessDtl;
@@ -47,3 +46,3 @@ private slots:
void slotSendClicked();
- void viewProcess( QListViewItem * );
+ void viewProcess( OListViewItem * );
};
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
@@ -20,2 +20,6 @@
+#include "versioninfo.h"
+
+/* OPIE */
+#include <opie2/odevice.h>
#include <qpe/resource.h>
@@ -23,2 +27,3 @@
+/* QT */
#include <qfile.h>
@@ -30,6 +35,2 @@
-#include "versioninfo.h"
-
-#include <opie2/odevice.h>
-
using namespace Opie;