MSWSP: add parse_CNatLanguageRestriction()
[wireshark-wip.git] / ui / qt / preferences_dialog.h
blob827ea893ebea43a1d482f6b346fc3a78f74725c5
1 /* preferences_dialog.h
3 * $Id$
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #ifndef PREFERENCES_DIALOG_H
25 #define PREFERENCES_DIALOG_H
27 #include "config.h"
29 #include <glib.h>
31 #include "color.h"
33 #include <epan/prefs.h>
35 #include <QDialog>
36 #include <QTreeWidgetItem>
37 #include <QComboBox>
39 extern pref_t *prefFromPrefPtr(void *pref_ptr);
41 namespace Ui {
42 class PreferencesDialog;
45 class PreferencesDialog : public QDialog
47 Q_OBJECT
49 public:
50 explicit PreferencesDialog(QWidget *parent = 0);
51 ~PreferencesDialog();
53 protected:
54 void showEvent(QShowEvent *evt);
55 void keyPressEvent(QKeyEvent *evt);
57 private:
58 bool stashedPrefIsDefault(pref_t *pref);
59 void updateItem(QTreeWidgetItem &item);
61 Ui::PreferencesDialog *pd_ui_;
62 int cur_pref_type_;
63 QLineEdit *cur_line_edit_;
64 QString saved_string_pref_;
65 QComboBox *cur_combo_box_;
66 int saved_combo_idx_;
68 private slots:
69 void on_prefsTree_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
70 void on_advancedSearchLineEdit_textEdited(const QString &search_str);
71 void lineEditPrefDestroyed();
72 void enumPrefDestroyed();
73 void uintPrefEditingFinished();
74 void enumPrefCurrentIndexChanged(int index);
75 void stringPrefEditingFinished();
76 void rangePrefTextChanged(const QString & text);
77 void rangePrefEditingFinished();
79 void on_advancedTree_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
80 void on_advancedTree_itemActivated(QTreeWidgetItem *item, int column);
82 void on_buttonBox_accepted();
83 void on_buttonBox_helpRequested();
86 #endif // PREFERENCES_DIALOG_H