author | drw <drw> | 2002-03-09 21:58:30 (UTC) |
---|---|---|
committer | drw <drw> | 2002-03-09 21:58:30 (UTC) |
commit | a07cd819c6ce288e6b4426ce1668e57bb629c868 (patch) (side-by-side diff) | |
tree | a4b7418180eb56f22529e0471bfce9cae6cbe833 /noncore/settings/sysinfo/processdetail.cpp | |
parent | 80be7dabb1e1390e4d412c785d9f44e2293b2d5d (diff) | |
download | opie-a07cd819c6ce288e6b4426ce1668e57bb629c868.zip opie-a07cd819c6ce288e6b4426ce1668e57bb629c868.tar.gz opie-a07cd819c6ce288e6b4426ce1668e57bb629c868.tar.bz2 |
drw: Code enhancements to reduce executable size.
Diffstat (limited to 'noncore/settings/sysinfo/processdetail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sysinfo/processdetail.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/noncore/settings/sysinfo/processdetail.cpp b/noncore/settings/sysinfo/processdetail.cpp index 06e5c0d..ef612e6 100644 --- a/noncore/settings/sysinfo/processdetail.cpp +++ b/noncore/settings/sysinfo/processdetail.cpp @@ -26,39 +26,34 @@ #include <qpushbutton.h> #include <qtextview.h> #include <qlayout.h> #include <qlistview.h> #include <qmessagebox.h> -ProcessDetail::ProcessDetail( QWidget* parent, const char* name, bool modal, WFlags fl ) - : QDialog( parent, name, modal, fl ) +ProcessDetail::ProcessDetail( QWidget* parent, const char* name, WFlags fl ) + : QWidget( parent, name, fl ) { pid = 0; QGridLayout *layout = new QGridLayout( this ); - layout->setSpacing( 6 ); - layout->setMargin( 11 ); + layout->setSpacing( 4 ); + layout->setMargin( 4 ); SignalCB = new QComboBox( FALSE, this, "SignalCB" ); - SignalCB->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)7, SignalCB->sizePolicy().hasHeightForWidth() ) ); - SignalCB->setMinimumSize( QSize( 50, 24 ) ); - SignalCB->setMaximumSize( QSize( 600, 24 ) ); SignalCB->insertItem( " 1: SIGHUP" ); SignalCB->insertItem( " 2: SIGINT" ); SignalCB->insertItem( " 9: SIGKILL" ); SignalCB->insertItem( "15: SIGTERM" ); SignalCB->insertItem( "18: SIGCONT" ); SignalCB->insertItem( "19: SIGSTOP" ); layout->addWidget( SignalCB, 1, 0 ); ProcessView = new QTextView( this, "ProcessView" ); - ProcessView->setFrameShadow( QTextView::Plain ); layout->addMultiCellWidget( ProcessView, 0, 0, 0, 1 ); SendButton = new QPushButton( this, "SendButton" ); - SendButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, SendButton->sizePolicy().hasHeightForWidth() ) ); SendButton->setMinimumSize( QSize( 50, 24 ) ); SendButton->setMaximumSize( QSize( 50, 24 ) ); SendButton->setText( tr( "Send" ) ); connect( SendButton, SIGNAL( clicked() ), this, SLOT( slotSendClicked() ) ); layout->addWidget( SendButton, 1, 1 ); } @@ -70,19 +65,20 @@ ProcessDetail::~ProcessDetail() void ProcessDetail::slotSendClicked() { QString sigstr = SignalCB->currentText(); sigstr.truncate(2); int sigid = sigstr.toUInt(); - if ( !QMessageBox::information( this, caption(), - ( tr( "You really want to send\n" + SignalCB->currentText() + "\nto this process?") ), - ( tr( "Yes" ) ), ( tr( "No" ) ), 0 ) ) + if ( QMessageBox::warning( this, caption(), + tr( "You really want to send\n" + SignalCB->currentText() + "\nto this process?"), + QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) + == QMessageBox::Yes ) { if ( kill( pid, sigid ) == 0 ) { - accept(); + hide(); } } } |