3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
10 #ifndef PREFERENCES_DIALOG_H
11 #define PREFERENCES_DIALOG_H
15 #include <epan/prefs.h>
17 #include <ui/qt/models/pref_models.h>
18 #include <ui/qt/models/pref_delegate.h>
20 #include "geometry_state_dialog.h"
23 class QAbstractButton
;
26 class PreferencesDialog
;
29 class PreferencesDialog
: public GeometryStateDialog
34 explicit PreferencesDialog(QWidget
*parent
= 0);
38 * Show the preference pane corresponding to the a preference module name.
39 * @param module_name A preference module name, e.g. the "name" parameter passed
40 * to prefs_register_module or a protocol name.
42 void setPane(const QString module_name
);
45 void showEvent(QShowEvent
*evt
);
50 Ui::PreferencesDialog
*pd_ui_
;
52 QHash
<QString
, QWidget
*> prefs_pane_to_item_
;
55 AdvancedPrefsModel advancedPrefsModel_
;
56 AdvancedPrefDelegate advancedPrefsDelegate_
;
57 ModulePrefsModel modulePrefsModel_
;
58 bool saved_capture_no_extcap_
;
60 QTimer
*searchLineEditTimer
;
61 QString searchLineEditText
;
64 void selectPane(QString pane
);
65 void on_advancedSearchLineEdit_textEdited(const QString
&search_re
);
66 void on_showChangedValuesCheckBox_toggled(bool checked
);
68 void on_buttonBox_accepted();
69 void on_buttonBox_rejected();
70 void on_buttonBox_helpRequested();
71 void on_buttonBox_clicked(QAbstractButton
*button
);
74 * Update search results from the advancedSearchLineEdit field
76 * This is performed separately from on_advancedSearchLineEdit_textEdited
77 * to support debouncing.
79 void updateSearchLineEdit();
82 #endif // PREFERENCES_DIALOG_H