Diffstat (limited to 'noncore/settings/sysinfo/processdetail.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/sysinfo/processdetail.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/noncore/settings/sysinfo/processdetail.cpp b/noncore/settings/sysinfo/processdetail.cpp index 5c0d335..661e32c 100644 --- a/noncore/settings/sysinfo/processdetail.cpp +++ b/noncore/settings/sysinfo/processdetail.cpp | |||
@@ -14,61 +14,65 @@ | |||
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> | ||
27 | #include <qtextview.h> | ||
28 | #include <qlayout.h> | 26 | #include <qlayout.h> |
29 | #include <qlistview.h> | 27 | #include <qlistview.h> |
30 | #include <qmessagebox.h> | 28 | #include <qmessagebox.h> |
29 | #include <qpushbutton.h> | ||
30 | #include <qtextview.h> | ||
31 | #include <qwhatsthis.h> | ||
31 | 32 | ||
32 | ProcessDetail::ProcessDetail( QWidget* parent, const char* name, WFlags fl ) | 33 | ProcessDetail::ProcessDetail( QWidget* parent, const char* name, WFlags fl ) |
33 | : QWidget( parent, name, fl ) | 34 | : QWidget( parent, name, WStyle_ContextHelp ) |
34 | { | 35 | { |
35 | pid = 0; | 36 | pid = 0; |
36 | 37 | ||
37 | QGridLayout *layout = new QGridLayout( this ); | 38 | QGridLayout *layout = new QGridLayout( this ); |
38 | layout->setSpacing( 4 ); | 39 | layout->setSpacing( 4 ); |
39 | layout->setMargin( 4 ); | 40 | layout->setMargin( 4 ); |
40 | 41 | ||
41 | SignalCB = new QComboBox( FALSE, this, "SignalCB" ); | 42 | SignalCB = new QComboBox( FALSE, this, "SignalCB" ); |
42 | SignalCB->insertItem( " 1: SIGHUP" ); | 43 | SignalCB->insertItem( " 1: SIGHUP" ); |
43 | SignalCB->insertItem( " 2: SIGINT" ); | 44 | SignalCB->insertItem( " 2: SIGINT" ); |
44 | SignalCB->insertItem( " 3: SIGQUIT" ); | 45 | SignalCB->insertItem( " 3: SIGQUIT" ); |
45 | SignalCB->insertItem( " 5: SIGTRAP" ); | 46 | SignalCB->insertItem( " 5: SIGTRAP" ); |
46 | SignalCB->insertItem( " 6: SIGABRT" ); | 47 | SignalCB->insertItem( " 6: SIGABRT" ); |
47 | SignalCB->insertItem( " 9: SIGKILL" ); | 48 | SignalCB->insertItem( " 9: SIGKILL" ); |
48 | SignalCB->insertItem( "14: SIGALRM" ); | 49 | SignalCB->insertItem( "14: SIGALRM" ); |
49 | SignalCB->insertItem( "15: SIGTERM" ); | 50 | SignalCB->insertItem( "15: SIGTERM" ); |
50 | SignalCB->insertItem( "18: SIGCONT" ); | 51 | SignalCB->insertItem( "18: SIGCONT" ); |
51 | SignalCB->insertItem( "19: SIGSTOP" ); | 52 | SignalCB->insertItem( "19: SIGSTOP" ); |
52 | layout->addWidget( SignalCB, 1, 0 ); | 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." ) ); | ||
53 | 55 | ||
54 | ProcessView = new QTextView( this, "ProcessView" ); | 56 | ProcessView = new QTextView( this, "ProcessView" ); |
55 | layout->addMultiCellWidget( ProcessView, 0, 0, 0, 1 ); | 57 | layout->addMultiCellWidget( ProcessView, 0, 0, 0, 1 ); |
58 | QWhatsThis::add( ProcessView, tr( "This area shows detailed information about this process." ) ); | ||
56 | 59 | ||
57 | SendButton = new QPushButton( this, "SendButton" ); | 60 | SendButton = new QPushButton( this, "SendButton" ); |
58 | SendButton->setMinimumSize( QSize( 50, 24 ) ); | 61 | SendButton->setMinimumSize( QSize( 50, 24 ) ); |
59 | SendButton->setMaximumSize( QSize( 50, 24 ) ); | 62 | SendButton->setMaximumSize( QSize( 50, 24 ) ); |
60 | SendButton->setText( tr( "Send" ) ); | 63 | SendButton->setText( tr( "Send" ) ); |
61 | connect( SendButton, SIGNAL( clicked() ), this, SLOT( slotSendClicked() ) ); | 64 | connect( SendButton, SIGNAL( clicked() ), this, SLOT( slotSendClicked() ) ); |
62 | layout->addWidget( SendButton, 1, 1 ); | 65 | layout->addWidget( SendButton, 1, 1 ); |
66 | QWhatsThis::add( SendButton, tr( "Click here to send the selected signal to this process." ) ); | ||
63 | } | 67 | } |
64 | 68 | ||
65 | ProcessDetail::~ProcessDetail() | 69 | ProcessDetail::~ProcessDetail() |
66 | { | 70 | { |
67 | } | 71 | } |
68 | 72 | ||
69 | void ProcessDetail::slotSendClicked() | 73 | void ProcessDetail::slotSendClicked() |
70 | { | 74 | { |
71 | QString sigstr = SignalCB->currentText(); | 75 | QString sigstr = SignalCB->currentText(); |
72 | sigstr.truncate(2); | 76 | sigstr.truncate(2); |
73 | int sigid = sigstr.toUInt(); | 77 | int sigid = sigstr.toUInt(); |
74 | 78 | ||