author | mickeyl <mickeyl> | 2004-11-04 14:13:05 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-11-04 14:13:05 (UTC) |
commit | 18684ddb43d4d79304dee6b20ab62513ee50b883 (patch) (side-by-side diff) | |
tree | 20c765170a62da7e10eb57a47dd5f68db41b7cc2 | |
parent | 34abbfc57a28dc2d08f71e8e29562659aa3942ac (diff) | |
download | opie-18684ddb43d4d79304dee6b20ab62513ee50b883.zip opie-18684ddb43d4d79304dee6b20ab62513ee50b883.tar.gz opie-18684ddb43d4d79304dee6b20ab62513ee50b883.tar.bz2 |
tiny layout tweak
-rw-r--r-- | noncore/settings/sysinfo/benchmarkinfo.cpp | 2 | ||||
-rw-r--r-- | share/sysinfo/results | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/noncore/settings/sysinfo/benchmarkinfo.cpp b/noncore/settings/sysinfo/benchmarkinfo.cpp index 060185a..2a269b8 100644 --- a/noncore/settings/sysinfo/benchmarkinfo.cpp +++ b/noncore/settings/sysinfo/benchmarkinfo.cpp @@ -64,194 +64,192 @@ extern "C" #define TEST_DURATION 3 //=========================================================================== class BenchmarkPaintWidget : public QWidget { public: BenchmarkPaintWidget() : QWidget( 0, "Benchmark Paint Widget", WStyle_Customize|WStyle_StaysOnTop|WPaintUnclipped|WPaintClever ) { resize( QApplication::desktop()->size() ); show(); p.begin( this ); }; ~BenchmarkPaintWidget() { p.end(); hide(); }; QPainter p; }; //=========================================================================== BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags ) : QWidget( parent, name, wFlags ) { setMinimumSize( 200, 150 ); QVBoxLayout* vb = new QVBoxLayout( this ); vb->setSpacing( 4 ); vb->setMargin( 4 ); 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 ); tests->addColumn( tr( "Tests" ) ); tests->addColumn( tr( "Results" ) ); tests->addColumn( tr( "Comparison" ) ); tests->setShowSortIndicator( true ); 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 ); #ifndef QT_QWS_RAMSES test_sd = new OCheckListItem( tests, tr( "6. SD Card Performance " ), OCheckListItem::CheckBox ); test_cf = new OCheckListItem( tests, tr( "7. CF Card Performance " ), OCheckListItem::CheckBox ); #endif test_alu->setText( 1, "n/a" ); test_fpu->setText( 1, "n/a" ); test_txt->setText( 1, "n/a" ); test_gfx->setText( 1, "n/a" ); test_ram->setText( 1, "n/a" ); #ifndef QT_QWS_RAMSES test_sd->setText( 1, "n/a" ); test_cf->setText( 1, "n/a" ); #endif test_alu->setText( 2, "n/a" ); test_fpu->setText( 2, "n/a" ); test_txt->setText( 2, "n/a" ); test_gfx->setText( 2, "n/a" ); test_ram->setText( 2, "n/a" ); #ifndef QT_QWS_RAMSES test_sd->setText( 2, "n/a" ); test_cf->setText( 2, "n/a" ); #endif 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 ); QHBoxLayout* hb = new QHBoxLayout( vb ); hb->addWidget( startButton, 2 ); QFile f( QPEApplication::qpeDir() + "share/sysinfo/results" ); if ( f.open( IO_ReadOnly ) ) { machineCombo = new QComboBox( this ); QWhatsThis::add( machineCombo, tr( "Choose a model to compare your results with." ) ); QTextStream ts( &f ); while( !ts.eof() ) { QString machline = ts.readLine(); odebug << "sysinfo: parsing benchmark results for '" << machline << "'" << oendl; QString resline = ts.readLine(); machines.insert( machline, new QStringList( QStringList::split( ",", resline ) ) ); machineCombo->insertItem( machline ); } - - hb->addWidget( new QLabel( tr( "Compare:" ), this ) ); hb->addWidget( machineCombo, 2 ); connect( machineCombo, SIGNAL( activated(int) ), this, SLOT( machineActivated(int) ) ); } } BenchmarkInfo::~BenchmarkInfo() {} void BenchmarkInfo::machineActivated( int index ) { QStringList* results = machines[ machineCombo->text( index ) ]; if ( !results ) { odebug << "sysinfo: no results available." << oendl; return; } QStringList::Iterator it = results->begin(); test_alu->setText( 2, *(it++) ); test_fpu->setText( 2, *(it++) ); test_txt->setText( 2, *(it++) ); test_gfx->setText( 2, *(it++) ); test_ram->setText( 2, *(it++) ); #ifndef QT_QWS_RAMSES test_sd->setText( 2, *(it++) ); test_cf->setText( 2, *(it++) ); #endif } void BenchmarkInfo::run() { startButton->setText( "> Don't touch! <" ); qApp->processEvents(); QTime t; if ( test_alu->isOn() ) { int d = round( dhry_main( DHRYSTONE_RUNS ) ); test_alu->setText( 1, QString().sprintf( "%d dhrys", d ) ); test_alu->setOn( false ); } if ( test_fpu->isOn() ) { t.start(); BenchFFT(); test_fpu->setText( 1, QString().sprintf( "%.2f secs", t.elapsed() / 1000.0 ) );; test_fpu->setOn( false ); } if ( test_txt->isOn() ) { int value = textRendering( TEST_DURATION ); test_txt->setText( 1, QString().sprintf( "%d chars/sec", value / TEST_DURATION ) ); test_txt->setOn( false ); } if ( test_gfx->isOn() ) { int value = gfxRendering( TEST_DURATION ); test_gfx->setText( 1, QString().sprintf( "%.2f gops/sec", value / 4.0 / TEST_DURATION ) ); // 4 tests test_gfx->setOn( false ); } if ( test_ram->isOn() ) // /tmp is supposed to be in RAM on a PDA { performFileTest( "/tmp/benchmarkFile.dat", test_ram ); } #ifndef QT_QWS_RAMSES if ( test_cf->isOn() ) { OStorageInfo storage; performFileTest( storage.cfPath() + "/benchmarkFile.dat", test_cf ); } if ( test_sd->isOn() ) { OStorageInfo storage; performFileTest( storage.sdPath() + "/benchmarkFile.dat", test_sd ); } #endif startButton->setText( tr( "&Start Tests!" ) ); } int BenchmarkInfo::textRendering( int seconds ) { QTime t; t.start(); int stop = t.elapsed() + seconds * 1000; int rr[] = { 255, 255, 255, 0, 0, 0, 0, 128, 128 }; diff --git a/share/sysinfo/results b/share/sysinfo/results index d1fc6a8..7b7a587 100644 --- a/share/sysinfo/results +++ b/share/sysinfo/results @@ -1,32 +1,32 @@ -<Choose model> +<Compare to> n/a,n/a,n/a,n/a,n/a,n/a,n/a,n/a,n/a Sharp SL-5500 240010 dhrys,41.498 sec,88 char/sec,1786 gops/sec,50.123 kb/sec,41.7329 kb/sec,105.873 kb/sec Sharp SL-5600 not,yet,contributed,please,mail,to,opie@handhelds.org Sharp C-700 not,yet,contributed,please,mail,to,opie@handhelds.org Sharp C-750 490677 dhrys,2.452 sec,437 char/sec,1396 gops/sec,132.061 kb/sec,129.752 kb/sec,n/a Sharp C-760 not,yet,contributed,please,mail,to,opie@handhelds.org Sharp C-860 not,yet,contributed,please,mail,to,opie@handhelds.org HP iPAQ 36xx not,yet,contributed,please,mail,to,opie@handhelds.org HP iPAQ 37xx not,yet,contributed,please,mail,to,opie@handhelds.org HP iPAQ 38xx 234880 dhrys,42.37 sec,418 char/sec,1788 gops/sec,51.6911 kb/sec,31.1029 kb/sec,untested HP iPAQ 54xx not,yet,contributed,please,mail,to,opie@handhelds.org HP iPAQ 55xx not,yet,contributed,please,mail,to,opie@handhelds.org HP Jornada 5x0 not,yet,contributed,please,mail,to,opie@handhelds.org M&N MNCI 323677 dhrys,23.65 secs,183 char/sec,2142 gops/sec,50.40 MB/sec;19.24 MB/sec,n/a,n/a SIEMENS SIMpad not,yet,contributed,please,mail,to,opie@handhelds.org MASTERIA Beagle not,yet,contributed,please,mail,to,opie@handhelds.org |