Diffstat (limited to 'noncore/settings/sysinfo/processinfo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sysinfo/processinfo.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/noncore/settings/sysinfo/processinfo.cpp b/noncore/settings/sysinfo/processinfo.cpp index 0512141..86133a9 100644 --- a/noncore/settings/sysinfo/processinfo.cpp +++ b/noncore/settings/sysinfo/processinfo.cpp | |||
@@ -10,51 +10,52 @@ | |||
10 | ** This file may be distributed and/or modified under the terms of the | 10 | ** This file may be distributed and/or modified under the terms of the |
11 | ** GNU General Public License version 2 as published by the Free Software | 11 | ** GNU General Public License version 2 as published by the Free Software |
12 | ** Foundation and appearing in the file LICENSE.GPL included in the | 12 | ** Foundation and appearing in the file LICENSE.GPL included in the |
13 | ** packaging of this file. | 13 | ** packaging of this file. |
14 | ** | 14 | ** |
15 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 15 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
16 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 16 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
17 | ** | 17 | ** |
18 | **********************************************************************/ | 18 | **********************************************************************/ |
19 | 19 | ||
20 | #include <qpe/qpeapplication.h> | 20 | #include <qpe/qpeapplication.h> |
21 | 21 | ||
22 | #include <qdir.h> | ||
23 | #include <qfile.h> | ||
22 | #include <qheader.h> | 24 | #include <qheader.h> |
23 | #include <qlistview.h> | ||
24 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | #include <qlistview.h> | ||
25 | #include <qtimer.h> | 27 | #include <qtimer.h> |
26 | #include <qfile.h> | 28 | #include <qwhatsthis.h> |
27 | #include <qdir.h> | ||
28 | 29 | ||
29 | #include "processinfo.h" | 30 | #include "processinfo.h" |
30 | 31 | ||
31 | ProcessInfo::ProcessInfo( QWidget* parent, const char* name, WFlags fl ) | 32 | ProcessInfo::ProcessInfo( QWidget* parent, const char* name, WFlags fl ) |
32 | : QWidget( parent, name, fl ) | 33 | : QWidget( parent, name, fl ) |
33 | { | 34 | { |
34 | QVBoxLayout *layout = new QVBoxLayout( this, 5 ); | 35 | QVBoxLayout *layout = new QVBoxLayout( this, 5 ); |
35 | 36 | ||
36 | ProcessView = new QListView( this, "ProcessView" ); | 37 | ProcessView = new QListView( this, "ProcessView" ); |
37 | int colnum = ProcessView->addColumn( tr( "PID" ) ); | 38 | int colnum = ProcessView->addColumn( tr( "PID" ) ); |
38 | ProcessView->setColumnAlignment( colnum, Qt::AlignRight ); | 39 | ProcessView->setColumnAlignment( colnum, Qt::AlignRight ); |
39 | colnum = ProcessView->addColumn( tr( "Command" ),96 ); | 40 | colnum = ProcessView->addColumn( tr( "Command" ),96 ); |
40 | colnum = ProcessView->addColumn( tr( "Status" ) ); | 41 | colnum = ProcessView->addColumn( tr( "Status" ) ); |
41 | colnum = ProcessView->addColumn( tr( "Time" ) ); | 42 | colnum = ProcessView->addColumn( tr( "Time" ) ); |
42 | ProcessView->setColumnAlignment( colnum, Qt::AlignRight ); | 43 | ProcessView->setColumnAlignment( colnum, Qt::AlignRight ); |
43 | ProcessView->setAllColumnsShowFocus( TRUE ); | 44 | ProcessView->setAllColumnsShowFocus( TRUE ); |
44 | QPEApplication::setStylusOperation( ProcessView->viewport(), QPEApplication::RightOnHold ); | 45 | QPEApplication::setStylusOperation( ProcessView->viewport(), QPEApplication::RightOnHold ); |
45 | connect( ProcessView, SIGNAL( rightButtonPressed( QListViewItem *, const QPoint &, int ) ), | 46 | connect( ProcessView, SIGNAL( rightButtonPressed( QListViewItem *, const QPoint &, int ) ), |
46 | this, SLOT( viewProcess( QListViewItem * ) ) ); | 47 | this, SLOT( viewProcess( QListViewItem * ) ) ); |
47 | |||
48 | layout->addWidget( ProcessView ); | 48 | layout->addWidget( ProcessView ); |
49 | 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." ) ); | ||
49 | 50 | ||
50 | QTimer *t = new QTimer( this ); | 51 | QTimer *t = new QTimer( this ); |
51 | connect( t, SIGNAL( timeout() ), this, SLOT( updateData() ) ); | 52 | connect( t, SIGNAL( timeout() ), this, SLOT( updateData() ) ); |
52 | t->start( 5000 ); | 53 | t->start( 5000 ); |
53 | 54 | ||
54 | updateData(); | 55 | updateData(); |
55 | 56 | ||
56 | ProcessDtl = new ProcessDetail( 0, 0, 0 ); | 57 | ProcessDtl = new ProcessDetail( 0, 0, 0 ); |
57 | ProcessDtl->ProcessView->setTextFormat( RichText ); | 58 | ProcessDtl->ProcessView->setTextFormat( RichText ); |
58 | } | 59 | } |
59 | 60 | ||
60 | ProcessInfo::~ProcessInfo() | 61 | ProcessInfo::~ProcessInfo() |