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 "ui_procattachbase.h"
11 #include <q3valuevector.h>
14 #include <qlineedit.h>
15 #include <qpushbutton.h>
17 #include <Q3VBoxLayout>
19 #include <Q3HBoxLayout>
25 * This is the full-featured version of the dialog. It is used when the
26 * system features a suitable ps command.
29 class ProcAttachPS
: public ProcAttachBase
33 ProcAttachPS(QWidget
* parent
);
40 virtual void refresh();
41 virtual void filterEdited(const QString
& text
);
42 virtual void selectedChanged();
45 void slotTextReceived(K3Process
* proc
, char* buffer
, int buflen
);
50 bool setVisibility(Q3ListViewItem
* i
, const QString
& text
);
54 int m_pidCol
; //!< The PID column in the ps output
55 int m_ppidCol
; //!< The parent-PID column in the ps output
57 Q3ValueVector
<QString
> m_line
;
62 * This is an extremely stripped down version of the dialog. It is used
63 * when there is no suitable ps command.
66 class ProcAttach
: public QDialog
69 ProcAttach(QWidget
* parent
);
70 virtual ~ProcAttach();
72 void setText(const QString
& text
) { m_processId
.setText(text
); }
73 QString
text() const { return m_processId
.text(); }
77 QLineEdit m_processId
;
78 QPushButton m_buttonOK
;
79 QPushButton m_buttonCancel
;
80 Q3VBoxLayout m_layout
;
81 Q3HBoxLayout m_buttons
;
84 #endif // ProcAttach_included