author | mickeyl <mickeyl> | 2004-03-05 21:37:50 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-03-05 21:37:50 (UTC) |
commit | 8851dc992ab535bde6cb417cafc44658953f495d (patch) (side-by-side diff) | |
tree | 0a70bd4a768880e61c5af1ab142508c2bb81ecd0 /noncore/settings/sysinfo/benchmarkinfo.cpp | |
parent | b9d58b616102970872129b5bc2f55569910f5c03 (diff) | |
download | opie-8851dc992ab535bde6cb417cafc44658953f495d.zip opie-8851dc992ab535bde6cb417cafc44658953f495d.tar.gz opie-8851dc992ab535bde6cb417cafc44658953f495d.tar.bz2 |
use listview stuff from libopie2
miscellaneous cleanups
Diffstat (limited to 'noncore/settings/sysinfo/benchmarkinfo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sysinfo/benchmarkinfo.cpp | 53 |
1 files changed, 29 insertions, 24 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 ) { |