| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
profile_dialog.h
Go to the documentation of this file.
1
9
10#ifndef PROFILE_DIALOG_H
11#define PROFILE_DIALOG_H
12
13#include "config.h"
14
15#include <ui/qt/geometry_state_dialog.h>
16#include <ui/qt/models/profile_model.h>
17#include <ui/qt/widgets/profile_tree_view.h>
18
19#include <QPushButton>
20#include <QTreeWidgetItem>
21#include <QLabel>
22
23 namespace Ui {
24 class ProfileDialog;
25}
26
30 class ProfileDialog : public GeometryStateDialog
31{
32 Q_OBJECT
33
34 public:
38 enum ProfileAction {
39 ShowProfiles,
40 NewProfile,
41 ImportZipProfile,
42 ImportDirProfile,
43 ExportSingleProfile,
44 ExportAllProfiles,
45 EditCurrentProfile,
46 DeleteCurrentProfile
47 };
48
53 explicit ProfileDialog(QWidget *parent = Q_NULLPTR);
54
58 virtual ~ProfileDialog();
59
65 int execAction(ProfileAction profile_action);
66
75 void selectProfile(QString profile = QString());
76
77 protected:
82 virtual void keyPressEvent(QKeyEvent *event) override;
83
88 QLabel* autoSwitchLimitLabel() const;
89
90 private:
91 Ui::ProfileDialog *pd_ui_;
92 QPushButton *ok_button_;
93 QPushButton *import_button_;
94#if defined(HAVE_MINIZIP) || defined(HAVE_MINIZIPNG)
95 QPushButton *export_button_;
96 QAction *export_selected_entry_;
97#endif
98 ProfileModel *model_;
99 ProfileSortModel *sort_model_;
100
107 void finishImport(QFileInfo fi, int skipped, const QStringList& importedProfiles);
108
112 void clearFilter();
113
114 private slots:
115#if defined(HAVE_MINIZIP) || defined(HAVE_MINIZIPNG)
120 void exportProfiles(bool exportAllPersonalProfiles = false);
121
125 void importFromZip();
126#endif
130 void importFromDirectory();
131
135 void newToolButtonClicked();
136
140 void deleteToolButtonClicked();
141
145 void copyToolButtonClicked();
146
150 void buttonBoxAccepted();
151
155 void buttonBoxHelpRequested();
156
160 void dataChanged(const QModelIndex &);
161
166 void filterChanged(const QString &text);
167
171 void selectionChanged();
172
177 QModelIndexList selectedProfiles();
178
179 // QWidget interface
180
181};
182
183#endif // PROFILE_DIALOG_H
GeometryStateDialog::GeometryStateDialog
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
ProfileDialog::selectProfile
void selectProfile(QString profile=QString())
Select the profile with the given name.
Definition profile_dialog.cpp:147
ProfileDialog::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event) override
Handles key press events within the dialog.
Definition profile_dialog.cpp:140
ProfileDialog::autoSwitchLimitLabel
QLabel * autoSwitchLimitLabel() const
Gets the auto switch limit label UI element.
Definition profile_dialog.cpp:135
ProfileDialog::ProfileDialog
ProfileDialog(QWidget *parent=Q_NULLPTR)
Constructs a ProfileDialog.
Definition profile_dialog.cpp:48
ProfileDialog::ProfileAction
ProfileAction
Actions that can be performed on profiles.
Definition profile_dialog.h:38
ProfileDialog::ShowProfiles
@ ShowProfiles
Definition profile_dialog.h:39
ProfileDialog::ImportDirProfile
@ ImportDirProfile
Definition profile_dialog.h:42
ProfileDialog::ImportZipProfile
@ ImportZipProfile
Definition profile_dialog.h:41
ProfileDialog::ExportAllProfiles
@ ExportAllProfiles
Definition profile_dialog.h:44
ProfileDialog::EditCurrentProfile
@ EditCurrentProfile
Definition profile_dialog.h:45
ProfileDialog::DeleteCurrentProfile
@ DeleteCurrentProfile
Definition profile_dialog.h:46
ProfileDialog::ExportSingleProfile
@ ExportSingleProfile
Definition profile_dialog.h:43
ProfileDialog::NewProfile
@ NewProfile
Definition profile_dialog.h:40
ProfileDialog::execAction
int execAction(ProfileAction profile_action)
Executes a specific profile action.
Definition profile_dialog.cpp:157
ProfileDialog::~ProfileDialog
virtual ~ProfileDialog()
Destroys the ProfileDialog.
Definition profile_dialog.cpp:130
ProfileModel
Table model that manages the full set of configuration profiles, supporting creation,...
Definition profile_model.h:244
ProfileSortModel
Sort/filter proxy model for ProfileModel, supporting filtering by profile visibility (all,...
Definition profile_model.h:178
geometry_state_dialog.h
profile_model.h
profile_tree_view.h
profile
Definition packet-epl.h:22