author | drw <drw> | 2002-12-20 01:36:55 (UTC) |
---|---|---|
committer | drw <drw> | 2002-12-20 01:36:55 (UTC) |
commit | 3e556ed5f8c8b1236b9c6155b609930103d17b21 (patch) (unidiff) | |
tree | 859cc1e4f3097276ab77cac4cff5b24fde26ba11 /noncore/settings/sysinfo/processdetail.cpp | |
parent | 876e1a4724a7bd75dc642e295de354241096e028 (diff) | |
download | opie-3e556ed5f8c8b1236b9c6155b609930103d17b21.zip opie-3e556ed5f8c8b1236b9c6155b609930103d17b21.tar.gz opie-3e556ed5f8c8b1236b9c6155b609930103d17b21.tar.bz2 |
1. Added check for /sbin/modinfo, and if exists will display module details again. 2. Combined process and module detail viewers into one common class. 3. Move process signal sending to main process tab.
Diffstat (limited to 'noncore/settings/sysinfo/processdetail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sysinfo/processdetail.cpp | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/noncore/settings/sysinfo/processdetail.cpp b/noncore/settings/sysinfo/processdetail.cpp deleted file mode 100644 index fcb871f..0000000 --- a/noncore/settings/sysinfo/processdetail.cpp +++ b/dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | /********************************************************************** | ||
2 | ** ProcessDetail | ||
3 | ** | ||
4 | ** Display process information | ||
5 | ** | ||
6 | ** Copyright (C) 2002, Dan Williams | ||
7 | ** williamsdr@acm.org | ||
8 | ** http://draknor.net | ||
9 | ** | ||
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 | ||
12 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
13 | ** packaging of this file. | ||
14 | ** | ||
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. | ||
17 | ** | ||
18 | **********************************************************************/ | ||
19 | |||
20 | #include "processdetail.h" | ||
21 | |||
22 | #include <sys/types.h> | ||
23 | #include <signal.h> | ||
24 | |||
25 | #include <qcombobox.h> | ||
26 | #include <qlayout.h> | ||
27 | #include <qlistview.h> | ||
28 | #include <qmessagebox.h> | ||
29 | #include <qpushbutton.h> | ||
30 | #include <qtextview.h> | ||
31 | #include <qwhatsthis.h> | ||
32 | |||
33 | ProcessDetail::ProcessDetail( QWidget* parent, const char* name, WFlags ) | ||
34 | : QWidget( parent, name, WStyle_ContextHelp ) | ||
35 | { | ||
36 | pid = 0; | ||
37 | |||
38 | QGridLayout *layout = new QGridLayout( this ); | ||
39 | layout->setSpacing( 4 ); | ||
40 | layout->setMargin( 4 ); | ||
41 | |||
42 | SignalCB = new QComboBox( FALSE, this, "SignalCB" ); | ||
43 | SignalCB->insertItem( " 1: SIGHUP" ); | ||
44 | SignalCB->insertItem( " 2: SIGINT" ); | ||
45 | SignalCB->insertItem( " 3: SIGQUIT" ); | ||
46 | SignalCB->insertItem( " 5: SIGTRAP" ); | ||
47 | SignalCB->insertItem( " 6: SIGABRT" ); | ||
48 | SignalCB->insertItem( " 9: SIGKILL" ); | ||
49 | SignalCB->insertItem( "14: SIGALRM" ); | ||
50 | SignalCB->insertItem( "15: SIGTERM" ); | ||
51 | SignalCB->insertItem( "18: SIGCONT" ); | ||
52 | SignalCB->insertItem( "19: SIGSTOP" ); | ||
53 | layout->addWidget( SignalCB, 1, 0 ); | ||
54 | QWhatsThis::add( SignalCB, tr( "Select a signal here and then click the Send button to the right to send to this process." ) ); | ||
55 | |||
56 | ProcessView = new QTextView( this, "ProcessView" ); | ||
57 | layout->addMultiCellWidget( ProcessView, 0, 0, 0, 1 ); | ||
58 | QWhatsThis::add( ProcessView, tr( "This area shows detailed information about this process." ) ); | ||
59 | |||
60 | SendButton = new QPushButton( this, "SendButton" ); | ||
61 | SendButton->setMinimumSize( QSize( 50, 24 ) ); | ||
62 | SendButton->setMaximumSize( QSize( 50, 24 ) ); | ||
63 | SendButton->setText( tr( "Send" ) ); | ||
64 | connect( SendButton, SIGNAL( clicked() ), this, SLOT( slotSendClicked() ) ); | ||
65 | layout->addWidget( SendButton, 1, 1 ); | ||
66 | QWhatsThis::add( SendButton, tr( "Click here to send the selected signal to this process." ) ); | ||
67 | } | ||
68 | |||
69 | ProcessDetail::~ProcessDetail() | ||
70 | { | ||
71 | } | ||
72 | |||
73 | void ProcessDetail::slotSendClicked() | ||
74 | { | ||
75 | QString sigstr = SignalCB->currentText(); | ||
76 | sigstr.truncate(2); | ||
77 | int sigid = sigstr.toUInt(); | ||
78 | |||
79 | if ( QMessageBox::warning( this, caption(), | ||
80 | tr( "You really want to send\n" + SignalCB->currentText() + "\nto this process?"), | ||
81 | QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) | ||
82 | == QMessageBox::Yes ) | ||
83 | { | ||
84 | if ( kill( pid, sigid ) == 0 ) | ||
85 | { | ||
86 | hide(); | ||
87 | } | ||
88 | } | ||
89 | |||
90 | } | ||
91 | |||
92 | |||