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
);
36 virtual void refresh();
37 virtual void filterEdited(const QString
& text
);
38 virtual void selectedChanged();
41 void slotTextReceived(KProcess
* proc
, char* buffer
, int buflen
);
46 bool setVisibility(QListViewItem
* i
, const QString
& text
);
50 int m_pidCol
; //!< The PID column in the ps output
51 int m_ppidCol
; //!< The parent-PID column in the ps output
53 QValueVector
<QString
> m_line
;
58 * This is an extremely stripped down version of the dialog. It is used
59 * when there is no suitable ps command.
62 class ProcAttach
: public QDialog
65 ProcAttach(QWidget
* parent
);
66 virtual ~ProcAttach();
68 void setText(const char* text
) { m_processId
.setText(text
); }
69 const char* text() const { return m_processId
.text(); }
73 QLineEdit m_processId
;
74 QPushButton m_buttonOK
;
75 QPushButton m_buttonCancel
;
77 QHBoxLayout m_buttons
;
80 #endif // ProcAttach_included