1 /* preferences_dialog.h
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
33 #include <epan/prefs.h>
36 #include <QTreeWidgetItem>
39 extern pref_t
*prefFromPrefPtr(void *pref_ptr
);
42 class PreferencesDialog
;
45 class PreferencesDialog
: public QDialog
50 explicit PreferencesDialog(QWidget
*parent
= 0);
54 void showEvent(QShowEvent
*evt
);
55 void keyPressEvent(QKeyEvent
*evt
);
58 bool stashedPrefIsDefault(pref_t
*pref
);
59 void updateItem(QTreeWidgetItem
&item
);
61 Ui::PreferencesDialog
*pd_ui_
;
63 QLineEdit
*cur_line_edit_
;
64 QString saved_string_pref_
;
65 QComboBox
*cur_combo_box_
;
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