-rw-r--r-- | noncore/settings/sysinfo/benchmarkinfo.cpp | 31 | ||||
-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 | 9 | ||||
-rw-r--r-- | noncore/settings/sysinfo/versioninfo.cpp | 9 |
9 files changed, 72 insertions, 63 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 @@ ** **********************************************************************/ +#include "benchmarkinfo.h" + /* OPIE */ #include <opie2/ostorageinfo.h> +#include <opie2/olistview.h> #include <qpe/qpeapplication.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/qpedecoration_qws.h> @@ -37,6 +40,7 @@ #include <qpainter.h> #include <qpushbutton.h> #include <qtimer.h> +#include <qwhatsthis.h> /* STD */ #include <time.h> @@ -47,9 +51,6 @@ extern double round(double); #endif - -#include "benchmarkinfo.h" - extern "C" { void BenchFFT( void ); @@ -95,20 +96,23 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags ) vb->setSpacing( 4 ); vb->setMargin( 4 ); - 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 ); tests->addColumn( tr( "Tests" ) ); tests->addColumn( tr( "Results" ) ); tests->addColumn( tr( "Comparison" ) ); tests->setShowSortIndicator( true ); - 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" ); @@ -127,14 +131,15 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags ) 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" ); 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() ) @@ -332,7 +337,7 @@ int BenchmarkInfo::gfxRendering( int seconds ) } -void BenchmarkInfo::performFileTest( const QString& fname, QCheckListItem* item ) +void BenchmarkInfo::performFileTest( const QString& fname, OCheckListItem* item ) { QTime time; 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 @@ class QClipboard; class QComboBox; -class QCheckListItem; +class OCheckListItem; class QPushButton; -class QListView; +class OListView; class BenchmarkInfo : public QWidget { @@ -35,13 +35,13 @@ public: BenchmarkInfo( QWidget *parent = 0, const char *name = 0, int wFlags = 0 ); ~BenchmarkInfo(); - 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; bool main_rd; bool main_wt; @@ -52,13 +52,13 @@ public: QClipboard* clb; QComboBox* machineCombo; - QListView* tests; + OListView* tests; QPushButton* startButton; QDict <QStringList> machines; int textRendering( int ); int gfxRendering( int ); - void performFileTest( const QString& fname, QCheckListItem* item ); + void performFileTest( const QString& fname, OCheckListItem* item ); private slots: 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 @@ #include "detail.h" -#include <sys/types.h> -#include <stdio.h> - +#include <qtextview.h> #include <qlayout.h> 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 @@ #define DETAIL_H #include <qwidget.h> -#include <qcombo.h> -#include <qtextview.h> -#include <qpushbutton.h> -#include <qlistview.h> + +class QTextView; class Detail : public QWidget { 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 @@ #include "detail.h" /* OPIE */ +#include <opie2/olistview.h> #include <qpe/qpeapplication.h> /* QT */ +#include <qcombobox.h> #include <qfile.h> #include <qlayout.h> #include <qmessagebox.h> +#include <qpushbutton.h> +#include <qtextview.h> #include <qtimer.h> #include <qwhatsthis.h> @@ -39,7 +43,7 @@ ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl ) layout->setSpacing( 4 ); layout->setMargin( 4 ); - ModulesView = new QListView( this ); + ModulesView = new OListView( this ); int colnum = ModulesView->addColumn( tr( "Module" ) ); colnum = ModulesView->addColumn( tr( "Size" ) ); ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); @@ -54,8 +58,8 @@ ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl ) if ( QFile::exists( "/sbin/modinfo" ) ) { 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*) ) ); } CommandCB = new QComboBox( FALSE, this ); @@ -93,7 +97,7 @@ void ModulesInfo::updateData() int modsize, usecount; QString selectedmod; - QListViewItem *curritem = ModulesView->currentItem(); + OListViewItem *curritem = static_cast<OListViewItem*>( ModulesView->currentItem() ); if ( curritem ) { selectedmod = curritem->text( 0 ); @@ -105,8 +109,8 @@ void ModulesInfo::updateData() if ( procfile ) { - QListViewItem *newitem; - QListViewItem *selecteditem = 0x0; + OListViewItem *newitem; + OListViewItem *selecteditem = 0x0; while ( true ) { modname[0] = '\0'; @@ -121,7 +125,7 @@ void ModulesInfo::updateData() QString qusecount = QString::number( usecount ).rightJustify( 2, ' ' ); QString qusage = QString( usage ); - newitem = new QListViewItem( ModulesView, qmodname, qmodsize, qusecount, qusage ); + newitem = new OListViewItem( ModulesView, qmodname, qmodsize, qusecount, qusage ); if ( qmodname == selectedmod ) { selecteditem = newitem; @@ -140,7 +144,7 @@ void ModulesInfo::slotSendClicked() return; } - 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() ); QString modname = ModulesView->currentItem()->text( 0 ); @@ -159,7 +163,7 @@ void ModulesInfo::slotSendClicked() } -void ModulesInfo::viewModules( QListViewItem *modules ) +void ModulesInfo::viewModules( OListViewItem *modules ) { QString modname = modules->text( 0 ); 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 @@ class Detail; class QComboBox; -class QListView; -class QListViewItem; +class OListView; +class OListViewItem; class ModulesInfo : public QWidget { @@ -37,7 +37,7 @@ public: ~ModulesInfo(); private: - QListView* ModulesView; + OListView* ModulesView; QComboBox* CommandCB; Detail* ModulesDtl; @@ -45,7 +45,7 @@ private: private slots: void updateData(); void slotSendClicked(); - void viewModules( QListViewItem * ); + void viewModules( OListViewItem * ); }; #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 @@ #include "detail.h" /* OPIE */ +#include <opie2/olistview.h> #include <qpe/qpeapplication.h> /* QT */ +#include <qcombobox.h> #include <qdir.h> #include <qlayout.h> #include <qmessagebox.h> +#include <qpushbutton.h> +#include <qtextview.h> #include <qtimer.h> #include <qwhatsthis.h> @@ -42,7 +46,7 @@ ProcessInfo::ProcessInfo( QWidget* parent, const char* name, WFlags fl ) layout->setMargin( 4 ); - ProcessView = new QListView( this, "ProcessView" ); + ProcessView = new OListView( this, "ProcessView" ); int colnum = ProcessView->addColumn( tr( "PID" ) ); ProcessView->setColumnAlignment( colnum, Qt::AlignRight ); colnum = ProcessView->addColumn( tr( "Command" ),96 ); @@ -51,8 +55,8 @@ ProcessInfo::ProcessInfo( QWidget* parent, const char* name, WFlags fl ) ProcessView->setColumnAlignment( colnum, Qt::AlignRight ); ProcessView->setAllColumnsShowFocus( TRUE ); 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 ); 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." ) ); @@ -101,7 +105,7 @@ void ProcessInfo::updateData() char comm[64]; QString selectedpid; - QListViewItem *curritem = ProcessView->currentItem(); + OListViewItem *curritem = static_cast<OListViewItem*>( ProcessView->currentItem() ); if ( curritem ) { selectedpid = curritem->text( 0 ); @@ -109,8 +113,8 @@ void ProcessInfo::updateData() ProcessView->clear(); - QListViewItem *newitem; - QListViewItem *selecteditem = 0x0; + OListViewItem *newitem; + OListViewItem *selecteditem = 0x0; QDir *procdir = new QDir("/proc", 0, QDir::Name, QDir::Dirs); QFileInfoList *proclist = new QFileInfoList(*(procdir->entryInfoList())); if ( proclist ) @@ -140,7 +144,7 @@ void ProcessInfo::updateData() processtime = processtime.rightJustify( 9, ' ' ); fclose( procfile ); - newitem = new QListViewItem( ProcessView, processnum, processcmd, processstatus, processtime ); + newitem = new OListViewItem( ProcessView, processnum, processcmd, processstatus, processtime ); if ( processnum == selectedpid ) { selecteditem = newitem; @@ -157,7 +161,7 @@ void ProcessInfo::updateData() void ProcessInfo::slotSendClicked() { - QListViewItem *currprocess = ProcessView->currentItem(); + OListViewItem *currprocess = static_cast<OListViewItem*>( ProcessView->currentItem() ); if ( !currprocess ) { return; @@ -169,7 +173,7 @@ void ProcessInfo::slotSendClicked() if ( QMessageBox::warning( this, currprocess->text( 1 ), capstr, QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes ) { - currprocess = ProcessView->currentItem(); + currprocess = static_cast<OListViewItem*>( ProcessView->currentItem() ); if ( currprocess ) { QString sigstr = SignalCB->currentText(); @@ -181,7 +185,7 @@ void ProcessInfo::slotSendClicked() } -void ProcessInfo::viewProcess( QListViewItem *process ) +void ProcessInfo::viewProcess( OListViewItem *process ) { QString pid= process->text( 0 ).stripWhiteSpace(); 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 @@ #define PROCESSINFO_H #include <qwidget.h> -#include <qlistview.h> class Detail; class QComboBox; -class QListView; -class QListViewItem; +class OListView; +class OListViewItem; class ProcessInfo : public QWidget { @@ -36,7 +35,7 @@ public: ~ProcessInfo(); private: - QListView* ProcessView; + OListView* ProcessView; QComboBox* SignalCB; QPushButton* SendButton; @@ -45,7 +44,7 @@ private: private slots: void updateData(); void slotSendClicked(); - void viewProcess( QListViewItem * ); + void viewProcess( OListViewItem * ); }; #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 @@ ** **********************************************************************/ +#include "versioninfo.h" + +/* OPIE */ +#include <opie2/odevice.h> #include <qpe/resource.h> #include <qpe/version.h> +/* QT */ #include <qfile.h> #include <qlabel.h> #include <qlayout.h> @@ -28,10 +33,6 @@ #include <qtextstream.h> #include <qwhatsthis.h> -#include "versioninfo.h" - -#include <opie2/odevice.h> - using namespace Opie; VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) |