3 // Copyright by Johannes Sixt
4 // This file is under GPL, the GNU General Public Licence
6 #include "procattach.h"
9 #include <klocale.h> /* i18n */
13 ProcAttach::ProcAttach(QWidget
* parent
) :
14 QDialog(parent
, "procattach", true),
15 m_label(this, "label"),
16 m_processId(this, "procid"),
17 m_buttonOK(this, "ok"),
18 m_buttonCancel(this, "cancel"),
22 QString title
= kapp
->getCaption();
23 title
+= i18n(": Attach to process");
26 m_label
.setMinimumSize(330, 24);
27 m_label
.setText(i18n("Specify the process number to attach to:"));
29 m_processId
.setMinimumSize(330, 24);
30 m_processId
.setMaxLength(100);
31 m_processId
.setFrame(true);
33 m_buttonOK
.setMinimumSize(100, 30);
34 connect(&m_buttonOK
, SIGNAL(clicked()), SLOT(accept()));
35 m_buttonOK
.setText(i18n("OK"));
36 m_buttonOK
.setDefault(true);
38 m_buttonCancel
.setMinimumSize(100, 30);
39 connect(&m_buttonCancel
, SIGNAL(clicked()), SLOT(reject()));
40 m_buttonCancel
.setText(i18n("Cancel"));
42 m_layout
.addWidget(&m_label
);
43 m_layout
.addWidget(&m_processId
);
44 m_layout
.addLayout(&m_buttons
);
45 m_layout
.addStretch(10);
46 m_buttons
.addStretch(10);
47 m_buttons
.addWidget(&m_buttonOK
);
48 m_buttons
.addSpacing(40);
49 m_buttons
.addWidget(&m_buttonCancel
);
50 m_buttons
.addStretch(10);
54 m_processId
.setFocus();
58 ProcAttach::~ProcAttach()