summaryrefslogtreecommitdiff
authordrw <drw>2002-03-09 18:41:03 (UTC)
committer drw <drw>2002-03-09 18:41:03 (UTC)
commit3095bf47c523afcf5441057db23050767f69ebf9 (patch) (unidiff)
tree3e3da415057bc40b9d448233536fc9d33b4e066b
parente1d66f627634b95bdc9c63ce14eefa1707f9dad8 (diff)
downloadopie-3095bf47c523afcf5441057db23050767f69ebf9.zip
opie-3095bf47c523afcf5441057db23050767f69ebf9.tar.gz
opie-3095bf47c523afcf5441057db23050767f69ebf9.tar.bz2
drw: Added SIGINT, SIGCONT & SIGSTOP to signal list.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/processdetail.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/settings/sysinfo/processdetail.cpp b/noncore/settings/sysinfo/processdetail.cpp
index 1ca1e72..06e5c0d 100644
--- a/noncore/settings/sysinfo/processdetail.cpp
+++ b/noncore/settings/sysinfo/processdetail.cpp
@@ -1,85 +1,88 @@
1/********************************************************************** 1/**********************************************************************
2** ProcessDetail 2** ProcessDetail
3** 3**
4** Display process information 4** Display process information
5** 5**
6** Copyright (C) 2002, Dan Williams 6** Copyright (C) 2002, Dan Williams
7** williamsdr@acm.org 7** williamsdr@acm.org
8** http://draknor.net 8** http://draknor.net
9** 9**
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 "processdetail.h" 20#include "processdetail.h"
21 21
22#include <sys/types.h> 22#include <sys/types.h>
23#include <signal.h> 23#include <signal.h>
24 24
25#include <qcombobox.h> 25#include <qcombobox.h>
26#include <qpushbutton.h> 26#include <qpushbutton.h>
27#include <qtextview.h> 27#include <qtextview.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qlistview.h> 29#include <qlistview.h>
30#include <qmessagebox.h> 30#include <qmessagebox.h>
31 31
32ProcessDetail::ProcessDetail( QWidget* parent, const char* name, bool modal, WFlags fl ) 32ProcessDetail::ProcessDetail( QWidget* parent, const char* name, bool modal, WFlags fl )
33 : QDialog( parent, name, modal, fl ) 33 : QDialog( parent, name, modal, fl )
34{ 34{
35 pid = 0; 35 pid = 0;
36 36
37 QGridLayout *layout = new QGridLayout( this ); 37 QGridLayout *layout = new QGridLayout( this );
38 layout->setSpacing( 6 ); 38 layout->setSpacing( 6 );
39 layout->setMargin( 11 ); 39 layout->setMargin( 11 );
40 40
41 SignalCB = new QComboBox( FALSE, this, "SignalCB" ); 41 SignalCB = new QComboBox( FALSE, this, "SignalCB" );
42 SignalCB->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)7, SignalCB->sizePolicy().hasHeightForWidth() ) ); 42 SignalCB->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)7, SignalCB->sizePolicy().hasHeightForWidth() ) );
43 SignalCB->setMinimumSize( QSize( 50, 24 ) ); 43 SignalCB->setMinimumSize( QSize( 50, 24 ) );
44 SignalCB->setMaximumSize( QSize( 600, 24 ) ); 44 SignalCB->setMaximumSize( QSize( 600, 24 ) );
45 SignalCB->insertItem( " 1: SIGHUP" ); 45 SignalCB->insertItem( " 1: SIGHUP" );
46 SignalCB->insertItem( " 2: SIGINT" );
46 SignalCB->insertItem( " 9: SIGKILL" ); 47 SignalCB->insertItem( " 9: SIGKILL" );
47 SignalCB->insertItem( "15: SIGTERM" ); 48 SignalCB->insertItem( "15: SIGTERM" );
49 SignalCB->insertItem( "18: SIGCONT" );
50 SignalCB->insertItem( "19: SIGSTOP" );
48 layout->addWidget( SignalCB, 1, 0 ); 51 layout->addWidget( SignalCB, 1, 0 );
49 52
50 ProcessView = new QTextView( this, "ProcessView" ); 53 ProcessView = new QTextView( this, "ProcessView" );
51 ProcessView->setFrameShadow( QTextView::Plain ); 54 ProcessView->setFrameShadow( QTextView::Plain );
52 layout->addMultiCellWidget( ProcessView, 0, 0, 0, 1 ); 55 layout->addMultiCellWidget( ProcessView, 0, 0, 0, 1 );
53 56
54 SendButton = new QPushButton( this, "SendButton" ); 57 SendButton = new QPushButton( this, "SendButton" );
55 SendButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, SendButton->sizePolicy().hasHeightForWidth() ) ); 58 SendButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, SendButton->sizePolicy().hasHeightForWidth() ) );
56 SendButton->setMinimumSize( QSize( 50, 24 ) ); 59 SendButton->setMinimumSize( QSize( 50, 24 ) );
57 SendButton->setMaximumSize( QSize( 50, 24 ) ); 60 SendButton->setMaximumSize( QSize( 50, 24 ) );
58 SendButton->setText( tr( "Send" ) ); 61 SendButton->setText( tr( "Send" ) );
59 connect( SendButton, SIGNAL( clicked() ), this, SLOT( slotSendClicked() ) ); 62 connect( SendButton, SIGNAL( clicked() ), this, SLOT( slotSendClicked() ) );
60 layout->addWidget( SendButton, 1, 1 ); 63 layout->addWidget( SendButton, 1, 1 );
61} 64}
62 65
63ProcessDetail::~ProcessDetail() 66ProcessDetail::~ProcessDetail()
64{ 67{
65} 68}
66 69
67void ProcessDetail::slotSendClicked() 70void ProcessDetail::slotSendClicked()
68{ 71{
69 QString sigstr = SignalCB->currentText(); 72 QString sigstr = SignalCB->currentText();
70 sigstr.truncate(2); 73 sigstr.truncate(2);
71 int sigid = sigstr.toUInt(); 74 int sigid = sigstr.toUInt();
72 75
73 if ( !QMessageBox::information( this, caption(), 76 if ( !QMessageBox::information( this, caption(),
74 ( tr( "You really want to send\n" + SignalCB->currentText() + "\nto this process?") ), 77 ( tr( "You really want to send\n" + SignalCB->currentText() + "\nto this process?") ),
75 ( tr( "Yes" ) ), ( tr( "No" ) ), 0 ) ) 78 ( tr( "Yes" ) ), ( tr( "No" ) ), 0 ) )
76 { 79 {
77 if ( kill( pid, sigid ) == 0 ) 80 if ( kill( pid, sigid ) == 0 )
78 { 81 {
79 accept(); 82 accept();
80 } 83 }
81 } 84 }
82 85
83} 86}
84 87
85 88