3 // Copyright by Johannes Sixt
4 // This file is under GPL, the GNU General Public Licence
6 #ifndef ProcAttach_included
7 #define ProcAttach_included
9 #include "procattachbase.h"
10 #include <qvaluevector.h>
13 #include <qlineedit.h>
14 #include <qpushbutton.h>
21 * This is the full-featured version of the dialog. It is used when the
22 * system features a suitable ps command.
25 class ProcAttachPS
: public ProcAttachBase
29 ProcAttachPS(QWidget
* parent
);
32 QString
text() const { return pidEdit
->text(); }
36 virtual void processSelected(QListViewItem
*);
37 virtual void refresh();
38 virtual void pidEdited(const QString
& text
);
41 void slotTextReceived(KProcess
* proc
, char* buffer
, int buflen
);
48 int m_pidCol
; //!< The PID column in the ps output
49 int m_ppidCol
; //!< The parent-PID column in the ps output
51 QValueVector
<QString
> m_line
;
56 * This is an extremely stripped down version of the dialog. It is used
57 * when there is no suitable ps command.
60 class ProcAttach
: public QDialog
63 ProcAttach(QWidget
* parent
);
64 virtual ~ProcAttach();
66 void setText(const char* text
) { m_processId
.setText(text
); }
67 const char* text() const { return m_processId
.text(); }
71 QLineEdit m_processId
;
72 QPushButton m_buttonOK
;
73 QPushButton m_buttonCancel
;
75 QHBoxLayout m_buttons
;
78 #endif // ProcAttach_included