Don't crash on Del in the Watches window while no program is loaded.
[kdbg.git] / kdbg / prefmisc.h
blobfeccb24b522e041d82d53d781dea531f0c677c68
1 // $Id$
3 // Copyright by Johannes Sixt
4 // This file is under GPL, the GNU General Public Licence
6 #ifndef PREFMISC_H
7 #define PREFMISC_H
9 #include <qlayout.h>
10 #include <qcheckbox.h>
11 #include <qlabel.h>
12 #include <qlineedit.h>
14 class PrefMisc : public QWidget
16 public:
17 PrefMisc(QWidget* parent);
19 QGridLayout m_grid;
21 protected:
22 QCheckBox m_popForeground;
24 QLabel m_backTimeoutLabel;
25 QLineEdit m_backTimeout;
27 QLabel m_tabWidthLabel;
28 QLineEdit m_tabWidth;
30 QLabel m_sourceFilterLabel;
31 QLineEdit m_sourceFilter;
32 QLabel m_headerFilterLabel;
33 QLineEdit m_headerFilter;
35 void setupEditGroup(const QString& label, QLabel& labWidget, QLineEdit& edit, int row);
37 public:
38 bool popIntoForeground() const { return m_popForeground.isChecked(); }
39 void setPopIntoForeground(bool pop) { m_popForeground.setChecked(pop); }
40 int backTimeout() const;
41 void setBackTimeout(int to);
42 int tabWidth() const;
43 void setTabWidth(int tw);
44 QString sourceFilter() const { return m_sourceFilter.text(); }
45 void setSourceFilter(const QString& f) { m_sourceFilter.setText(f); }
46 QString headerFilter() const { return m_headerFilter.text(); }
47 void setHeaderFilter(const QString& f) { m_headerFilter.setText(f); }
50 #endif // PREFMISC_H