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"
15 #include <QPushButton>
16 #include <QVBoxLayout>
17 #include <QHBoxLayout>
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 QDialog
, private Ui::ProcAttachBase
33 ProcAttachPS(QWidget
* parent
);
36 void setFilterText(const QString
& text
) { filterEdit
->setText(text
); }
43 void on_buttonRefresh_clicked();
44 void on_filterEdit_textChanged(const QString
& text
);
45 void on_processList_currentItemChanged();
46 void slotTextReceived();
51 bool setVisibility(QTreeWidgetItem
* i
, const QString
& text
);
55 int m_pidCol
; //!< The PID column in the ps output
56 int m_ppidCol
; //!< The parent-PID column in the ps output
58 std::vector
<QString
> m_line
;
63 * This is an extremely stripped down version of the dialog. It is used
64 * when there is no suitable ps command.
67 class ProcAttach
: public QDialog
70 ProcAttach(QWidget
* parent
);
71 virtual ~ProcAttach();
73 void setText(const QString
& text
) { m_processId
.setText(text
); }
74 QString
text() const { return m_processId
.text(); }
78 QLineEdit m_processId
;
79 QPushButton m_buttonOK
;
80 QPushButton m_buttonCancel
;
82 QHBoxLayout m_buttons
;
85 #endif // ProcAttach_included