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