Latest updates from Keith for xsldbg 3.0.5.
[kdbg.git] / kdbg / procattach.cpp
blob9b1ac77697477560705492c3790e5cfe3b516810
1 // $Id$
3 // Copyright by Johannes Sixt
4 // This file is under GPL, the GNU General Public Licence
6 #include "procattach.h"
7 #include <kapp.h>
8 #include <klocale.h> /* i18n */
9 #include "mydebug.h"
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"),
17 m_layout(this, 8),
18 m_buttons(4)
20 QString title = kapp->caption();
21 title += i18n(": Attach to process");
22 setCaption(title);
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);
50 m_layout.activate();
52 m_processId.setFocus();
53 resize(350, 120);
56 ProcAttach::~ProcAttach()