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
@@ -11,18 +11,21 @@
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
+#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>
#include <qpe/resource.h>
#include <qpe/config.h>
/* QT */
#include <qclipboard.h>
@@ -32,29 +35,27 @@
#include <qfile.h>
#include <qtextstream.h>
#include <qfiledialog.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qpainter.h>
#include <qpushbutton.h>
#include <qtimer.h>
+#include <qwhatsthis.h>
/* STD */
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#if defined (__GNUC__) && (__GNUC__ < 3)
extern double round(double);
#endif
-
-#include "benchmarkinfo.h"
-
extern "C"
{
void BenchFFT( void );
double dhry_main( int );
}
#define DHRYSTONE_RUNS 20000000
#define TEST_DURATION 3
@@ -90,73 +91,77 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags )
{
setMinimumSize( 200, 150 );
QVBoxLayout* vb = new QVBoxLayout( this );
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" );
+ test_fpu->setText( 1, "n/a" );
test_txt->setText( 1, "n/a" );
test_gfx->setText( 1, "n/a" );
test_ram->setText( 1, "n/a" );
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" );
test_gfx->setText( 2, "n/a" );
test_ram->setText( 2, "n/a" );
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" );
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();
qDebug( "sysinfo: parsing benchmark results for '%s'", (const char*) machline );
QString resline = ts.readLine();
machines.insert( machline, new QStringList( QStringList::split( ",", resline ) ) );
machineCombo->insertItem( machline );
}
-
+
QHBoxLayout* hb = new QHBoxLayout( vb );
hb->addWidget( new QLabel( tr( "Compare To:" ), this ) );
hb->addWidget( machineCombo, 2 );
connect( machineCombo, SIGNAL( activated(int) ), this, SLOT( machineActivated(int) ) );
}
-
+
vb->addWidget( startButton, 2 );
}
BenchmarkInfo::~BenchmarkInfo()
{}
@@ -327,17 +332,17 @@ int BenchmarkInfo::gfxRendering( int seconds )
bpw.p.drawPixmap( rand()%w, rand()%h, p );
++loops;
}
return loops;
}
-void BenchmarkInfo::performFileTest( const QString& fname, QCheckListItem* item )
+void BenchmarkInfo::performFileTest( const QString& fname, OCheckListItem* item )
{
QTime time;
time.start();
if ( writeFile( fname ) &&
readFile( fname ) )
{
QFile::remove( fname );
item->setText( 1, QString( "%1 kb/sec" ).arg( QString::number( 1024.0 / ( time.elapsed() / 1000.0 ) ) ) );
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
@@ -18,52 +18,52 @@
#include <qwidget.h>
#include <qdialog.h>
#include <qdict.h>
#include <qstringlist.h>
class QClipboard;
class QComboBox;
-class QCheckListItem;
+class OCheckListItem;
class QPushButton;
-class QListView;
+class OListView;
class BenchmarkInfo : public QWidget
{
Q_OBJECT
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;
bool sd_rd;
bool sd_wt;
bool cf_rd;
bool cf_wt;
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& );
bool readFile( const QString& );
void run();
void machineActivated( int );
};
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
@@ -16,19 +16,17 @@
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#include "detail.h"
-#include <sys/types.h>
-#include <stdio.h>
-
+#include <qtextview.h>
#include <qlayout.h>
Detail::Detail( QWidget* parent, const char* name, WFlags )
: QWidget( parent, name, WStyle_ContextHelp )
{
QVBoxLayout *layout = new QVBoxLayout( this );
detailView = new QTextView( this );
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
@@ -18,20 +18,18 @@
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#ifndef DETAIL_H
#define DETAIL_H
#include <qwidget.h>
-#include <qcombo.h>
-#include <qtextview.h>
-#include <qpushbutton.h>
-#include <qlistview.h>
+
+class QTextView;
class Detail : public QWidget
{
Q_OBJECT
public:
Detail( QWidget * = 0x0, const char * = 0x0, WFlags = 0 );
~Detail();
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
@@ -18,49 +18,53 @@
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#include "modulesinfo.h"
#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>
ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
QGridLayout *layout = new QGridLayout( this );
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 );
colnum = ModulesView->addColumn( tr( "Use#" ) );
ModulesView->setColumnAlignment( colnum, Qt::AlignRight );
colnum = ModulesView->addColumn( tr( "Used by" ) );
ModulesView->setAllColumnsShowFocus( TRUE );
layout->addMultiCellWidget( ModulesView, 0, 0, 0, 1 );
QWhatsThis::add( ModulesView, tr( "This is a list of all the kernel modules currently loaded on this handheld device.\n\nClick and hold on a module to see additional information about the module, or to unload it." ) );
// Test if we have /sbin/modinfo, and if so, allow module detail window
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 );
CommandCB->insertItem( "modprobe -r" );
CommandCB->insertItem( "rmmod" );
// I can't think of other useful commands yet. Anyone?
layout->addWidget( CommandCB, 1, 0 );
QWhatsThis::add( CommandCB, tr( "Select a command here and then click the Send button to the right to send the command to module selected above." ) );
@@ -88,45 +92,45 @@ ModulesInfo::~ModulesInfo()
void ModulesInfo::updateData()
{
char modname[64];
char usage[200];
int modsize, usecount;
QString selectedmod;
- QListViewItem *curritem = ModulesView->currentItem();
+ OListViewItem *curritem = static_cast<OListViewItem*>( ModulesView->currentItem() );
if ( curritem )
{
selectedmod = curritem->text( 0 );
}
ModulesView->clear();
FILE *procfile = fopen( ( QString ) ( "/proc/modules"), "r");
if ( procfile )
{
- QListViewItem *newitem;
- QListViewItem *selecteditem = 0x0;
+ OListViewItem *newitem;
+ OListViewItem *selecteditem = 0x0;
while ( true )
{
modname[0] = '\0';
usage[0] = '\0';
int success = fscanf( procfile, "%s%d%d%[^\n]", modname, &modsize, &usecount, usage );
if ( success == EOF )
break;
QString qmodname = QString( modname );
QString qmodsize = QString::number( modsize ).rightJustify( 6, ' ' );
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;
}
}
ModulesView->setCurrentItem( selecteditem );
fclose( procfile );
@@ -135,17 +139,17 @@ void ModulesInfo::updateData()
void ModulesInfo::slotSendClicked()
{
if ( !ModulesView->currentItem() )
{
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 );
if ( QMessageBox::warning( this, modname, capstr,
QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes )
{
QString command = "/sbin/";
command.append( CommandCB->currentText() );
@@ -154,17 +158,17 @@ void ModulesInfo::slotSendClicked()
FILE* stream = popen( command, "r" );
if ( stream )
pclose( stream );
}
}
-void ModulesInfo::viewModules( QListViewItem *modules )
+void ModulesInfo::viewModules( OListViewItem *modules )
{
QString modname = modules->text( 0 );
QString capstr = "Module: ";
capstr.append( modname );
ModulesDtl->setCaption( capstr );
QString command = "/sbin/modinfo ";
command.append( modname );
FILE* modinfo = popen( command, "r" );
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
@@ -21,31 +21,31 @@
#ifndef MODULESINFO_H
#define MODULESINFO_H
#include <qwidget.h>
class Detail;
class QComboBox;
-class QListView;
-class QListViewItem;
+class OListView;
+class OListViewItem;
class ModulesInfo : public QWidget
{
Q_OBJECT
public:
ModulesInfo( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
~ModulesInfo();
private:
- QListView* ModulesView;
+ OListView* ModulesView;
QComboBox* CommandCB;
Detail* ModulesDtl;
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
@@ -16,48 +16,52 @@
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#include "processinfo.h"
#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>
/* STD */
#include <sys/types.h>
#include <signal.h>
ProcessInfo::ProcessInfo( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
QGridLayout *layout = new QGridLayout( this );
layout->setSpacing( 4 );
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 );
colnum = ProcessView->addColumn( tr( "Status" ) );
colnum = ProcessView->addColumn( tr( "Time" ) );
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." ) );
SignalCB = new QComboBox( FALSE, this, "SignalCB" );
SignalCB->insertItem( " 1: SIGHUP" );
SignalCB->insertItem( " 2: SIGINT" );
SignalCB->insertItem( " 3: SIGQUIT" );
SignalCB->insertItem( " 5: SIGTRAP" );
@@ -96,26 +100,26 @@ void ProcessInfo::updateData()
int pid, ppid, pgrp, session, tty, tpgid, utime, stime, cutime, cstime, counter, priority, starttime,
signal, blocked, sigignore, sigcatch;
uint flags, minflt, cminflt, majflt, cmajflt, timeout, itrealvalue, vsize, rss, rlim, startcode,
endcode, startstack, kstkesp, kstkeip, wchan;
char state;
char comm[64];
QString selectedpid;
- QListViewItem *curritem = ProcessView->currentItem();
+ OListViewItem *curritem = static_cast<OListViewItem*>( ProcessView->currentItem() );
if ( curritem )
{
selectedpid = curritem->text( 0 );
}
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 )
{
QFileInfoListIterator it(*proclist);
QFileInfo *f;
while ( ( f = it.current() ) != 0 )
{
@@ -135,58 +139,58 @@ void ProcessInfo::updateData()
&kstkesp, &kstkeip, &signal, &blocked, &sigignore, &sigcatch, &wchan );
processnum = processnum.rightJustify( 5, ' ' );
QString processcmd = QString( comm ).replace( QRegExp( "[()]" ), "" );
QString processstatus = QChar(state);
QString processtime = QString::number( ( utime + stime ) / 100 );
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;
}
}
}
}
ProcessView->setCurrentItem( selecteditem );
}
delete proclist;
delete procdir;
}
void ProcessInfo::slotSendClicked()
{
- QListViewItem *currprocess = ProcessView->currentItem();
+ OListViewItem *currprocess = static_cast<OListViewItem*>( ProcessView->currentItem() );
if ( !currprocess )
{
return;
}
QString capstr = tr( "Really want to send %1\nto this process?" ).arg( SignalCB->currentText() );
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();
sigstr.truncate(2);
int sigid = sigstr.toUInt();
kill( currprocess->text( 0 ).stripWhiteSpace().toUInt(), sigid );
}
}
}
-void ProcessInfo::viewProcess( QListViewItem *process )
+void ProcessInfo::viewProcess( OListViewItem *process )
{
QString pid= process->text( 0 ).stripWhiteSpace();
QString command = process->text( 1 );
ProcessDtl->setCaption( pid + " - " + command );
FILE *statfile = fopen( ( QString ) ( "/proc/" + pid + "/status"), "r");
if ( statfile )
{
char line[81];
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
@@ -16,36 +16,35 @@
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#ifndef PROCESSINFO_H
#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
{
Q_OBJECT
public:
ProcessInfo( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
~ProcessInfo();
private:
- QListView* ProcessView;
+ OListView* ProcessView;
QComboBox* SignalCB;
QPushButton* SendButton;
-
+
Detail *ProcessDtl;
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
@@ -13,30 +13,31 @@
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
+#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>
#include <qscrollview.h>
#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 )
: QWidget( parent, name, f )
{
setMinimumSize( 200, 150 );
QVBoxLayout *tmpvb = new QVBoxLayout( this );