Kerberos: add kerberos_inject_longterm_key() helper function
[wireshark-sm.git] / ui / qt / preferences_dialog.h
blobb295aeaa41ebb62f6552bbe8043cedf6f9c410c6
1 /** @file
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
8 */
10 #ifndef PREFERENCES_DIALOG_H
11 #define PREFERENCES_DIALOG_H
13 #include <config.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"
22 class QComboBox;
23 class QAbstractButton;
25 namespace Ui {
26 class PreferencesDialog;
29 class PreferencesDialog : public GeometryStateDialog
31 Q_OBJECT
33 public:
34 explicit PreferencesDialog(QWidget *parent = 0);
35 ~PreferencesDialog();
37 /**
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);
44 protected:
45 void showEvent(QShowEvent *evt);
47 private:
48 void apply();
50 Ui::PreferencesDialog *pd_ui_;
52 QHash<QString, QWidget*> prefs_pane_to_item_;
54 PrefsModel model_;
55 AdvancedPrefsModel advancedPrefsModel_;
56 AdvancedPrefDelegate advancedPrefsDelegate_;
57 ModulePrefsModel modulePrefsModel_;
58 bool saved_capture_no_extcap_;
60 QTimer *searchLineEditTimer;
61 QString searchLineEditText;
63 private slots:
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);
73 /**
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