2 * Copyright Johannes Sixt
3 * This file is licensed under the GNU General Public License Version 2.
4 * See the file COPYING in the toplevel directory of the source directory.
7 #ifndef ProcAttach_included
8 #define ProcAttach_included
10 #include "procattachbase.h"
11 #include <qvaluevector.h>
14 #include <qlineedit.h>
15 #include <qpushbutton.h>
22 * This is the full-featured version of the dialog. It is used when the
23 * system features a suitable ps command.
26 class ProcAttachPS
: public ProcAttachBase
30 ProcAttachPS(QWidget
* parent
);
37 virtual void refresh();
38 virtual void filterEdited(const QString
& text
);
39 virtual void selectedChanged();
42 void slotTextReceived(KProcess
* proc
, char* buffer
, int buflen
);
47 bool setVisibility(QListViewItem
* i
, const QString
& text
);
51 int m_pidCol
; //!< The PID column in the ps output
52 int m_ppidCol
; //!< The parent-PID column in the ps output
54 QValueVector
<QString
> m_line
;
59 * This is an extremely stripped down version of the dialog. It is used
60 * when there is no suitable ps command.
63 class ProcAttach
: public QDialog
66 ProcAttach(QWidget
* parent
);
67 virtual ~ProcAttach();
69 void setText(const char* text
) { m_processId
.setText(text
); }
70 const char* text() const { return m_processId
.text(); }
74 QLineEdit m_processId
;
75 QPushButton m_buttonOK
;
76 QPushButton m_buttonCancel
;
78 QHBoxLayout m_buttons
;
81 #endif // ProcAttach_included