Wireshark 5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
preferences_dialog.h
Go to the documentation of this file.
1
9
10#ifndef PREFERENCES_DIALOG_H
11#define PREFERENCES_DIALOG_H
12
13#include <config.h>
14
15#include <epan/prefs.h>
16
19
21
22class QComboBox;
23class QAbstractButton;
24
25namespace Ui {
26class PreferencesDialog;
27}
28
33{
34 Q_OBJECT
35
36public:
41 explicit PreferencesDialog(QWidget *parent = 0);
42
47
53 void setPane(const QString module_name);
54
55protected:
60 void keyPressEvent(QKeyEvent *event) override;
61
66 void showEvent(QShowEvent *evt) override;
67
72 void resizeEvent(QResizeEvent *event) override;
73
81 bool eventFilter(QObject *obj, QEvent *event) override;
82
83private:
89 void apply(bool closing);
90
94 void resizeSplitter();
95
99 void updatePageMinimumSize();
100
104 void fitToScreen();
105
110 int sideBySideWidth() const;
111
116 void applyDefaultSize();
117
122 void updateNavigationMode();
123
128 void setCompactNavigation(bool compact);
129
133 void updateBreadcrumb();
134
138 void layoutDrawer();
139
140 Ui::PreferencesDialog *pd_ui_;
141
142 QHash<QString, QWidget*> prefs_pane_to_item_;
143
144 PrefsModel model_;
145 AdvancedPrefsModel advancedPrefsModel_;
146 AdvancedPrefDelegate advancedPrefsDelegate_;
147 ModulePrefsModel modulePrefsModel_;
148 int prefs_tree_width_ = 0;
149 int widest_page_width_ = 0;
150 bool compact_navigation_ = false;
151 bool geometry_fitted_ = false;
152 bool geometry_restored_ = false;
153 QWidget *nav_scrim_ = nullptr;
154
155 QTimer *searchLineEditTimer;
156 QString searchLineEditText;
157
158private slots:
163 void setDrawerOpen(bool open);
164
170 void applicationFocusChanged(QWidget *old, QWidget *now);
171
176 void selectPane(QString pane);
177
182 void handleCopyMenu(QPoint pos);
183
187 void copyActionTriggered();
188
192 void copyRowActionTriggered();
193
198 void on_advancedSearchLineEdit_textEdited(const QString &search_re);
199
204 void on_showChangedValuesCheckBox_toggled(bool checked);
205
209 void on_buttonBox_accepted();
210
214 void on_buttonBox_rejected();
215
219 void on_buttonBox_helpRequested();
220
225 void on_buttonBox_clicked(QAbstractButton *button);
226
233 void updateSearchLineEdit();
234};
235
236#endif // PREFERENCES_DIALOG_H
Item delegate providing in-place editors for the Advanced Preferences table.
Definition pref_delegate.h:26
Sort/filter proxy model for the Advanced Preferences pane.
Definition pref_models.h:238
GeometryStateDialog(QWidget *parent, Qt::WindowFlags f=Qt::Window)
Constructs a new GeometryStateDialog with the specified parent and window flags.
Definition geometry_state_dialog.h:91
Sort/filter proxy model for the module (left-hand) pane of the Preferences dialog.
Definition pref_models.h:365
~PreferencesDialog()
Destroys the PreferencesDialog.
Definition preferences_dialog.cpp:260
void showEvent(QShowEvent *evt) override
Handles the show event for the dialog.
Definition preferences_dialog.cpp:554
void keyPressEvent(QKeyEvent *event) override
Handles key press events within the dialog.
Definition preferences_dialog.cpp:275
bool eventFilter(QObject *obj, QEvent *event) override
Closes the page drawer on a click on the scrim or on Enter or Escape in the tree, and keeps the drawe...
Definition preferences_dialog.cpp:520
PreferencesDialog(QWidget *parent=0)
Constructs a PreferencesDialog.
Definition preferences_dialog.cpp:139
void setPane(const QString module_name)
Show the preference pane corresponding to the a preference module name.
Definition preferences_dialog.cpp:270
void resizeEvent(QResizeEvent *event) override
Switches the page navigation mode when the dialog is resized.
Definition preferences_dialog.cpp:406
Tree model backing the Preferences dialog.
Definition pref_models.h:28