summaryrefslogtreecommitdiff
path: root/noncore/settings/sysinfo/processinfo.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/sysinfo/processinfo.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/sysinfo/processinfo.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/noncore/settings/sysinfo/processinfo.cpp b/noncore/settings/sysinfo/processinfo.cpp
index af0fe26..2a90b0f 100644
--- a/noncore/settings/sysinfo/processinfo.cpp
+++ b/noncore/settings/sysinfo/processinfo.cpp
@@ -8,38 +8,41 @@
** http://draknor.net
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** 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 "processinfo.h"
+#include "detail.h"
+
+/* OPIE */
#include <qpe/qpeapplication.h>
+/* QT */
#include <qdir.h>
#include <qlayout.h>
#include <qmessagebox.h>
#include <qtimer.h>
#include <qwhatsthis.h>
+/* STD */
#include <sys/types.h>
#include <signal.h>
-#include "processinfo.h"
-#include "detail.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" );
int colnum = ProcessView->addColumn( tr( "PID" ) );
ProcessView->setColumnAlignment( colnum, Qt::AlignRight );
colnum = ProcessView->addColumn( tr( "Command" ),96 );
@@ -77,26 +80,25 @@ ProcessInfo::ProcessInfo( QWidget* parent, const char* name, WFlags fl )
QTimer *t = new QTimer( this );
connect( t, SIGNAL( timeout() ), this, SLOT( updateData() ) );
t->start( 5000 );
updateData();
ProcessDtl = new Detail();
QWhatsThis::add( ProcessDtl->detailView, tr( "This area shows detailed information about this process." ) );
}
ProcessInfo::~ProcessInfo()
-{
-}
+{}
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();
@@ -187,14 +189,14 @@ void ProcessInfo::viewProcess( QListViewItem *process )
FILE *statfile = fopen( ( QString ) ( "/proc/" + pid + "/status"), "r");
if ( statfile )
{
char line[81];
fgets( line, 81, statfile );
ProcessDtl->detailView->setText( line );
while ( fgets( line, 81, statfile ) )
{
ProcessDtl->detailView->append( line );
}
fclose( statfile );
}
- ProcessDtl->showMaximized();
+ QPEApplication::showWidget( ProcessDtl );
}