Wireshark 5.1.0
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
18
19#include <QPushButton>
20#include <QTreeWidgetItem>
21#include <QLabel>
22
23namespace Ui {
24class ProfileDialog;
25}
26
31{
32 Q_OBJECT
33
34public:
49
54 explicit ProfileDialog(QWidget *parent = Q_NULLPTR);
55
59 virtual ~ProfileDialog();
60
66 int execAction(ProfileAction profile_action);
67
76 void selectProfile(QString profile = QString());
77
78protected:
83 virtual void keyPressEvent(QKeyEvent *event) override;
84
89 QLabel* autoSwitchLimitLabel() const;
90
91private:
92 Ui::ProfileDialog *pd_ui_;
93 QPushButton *ok_button_;
94 QPushButton *import_button_;
95#if defined(HAVE_MINIZIP) || defined(HAVE_MINIZIPNG)
96 QPushButton *export_button_;
97 QAction *export_selected_entry_;
98 QAction *export_children_entry_;
99
106 QModelIndexList exportItems(const QModelIndexList &items, bool withChildren) const;
107#endif
108 ProfileModel *model_;
109 ProfileSortModel *sort_model_;
110 QPersistentModelIndex moved_;
111
118 void finishImport(QFileInfo fi, int skipped, const QStringList& importedProfiles);
119
123 void clearFilter();
124
129 bool restoreSelected();
130
135 void addProfile(const QString &name);
136
137private slots:
138#if defined(HAVE_MINIZIP) || defined(HAVE_MINIZIPNG)
144 void exportProfiles(bool exportAllPersonalProfiles = false, bool withChildren = false);
145
149 void importFromZip(const QString &targetParent = QString());
150#endif
154 void importFromDirectory(const QString &targetParent = QString());
155
159 void newToolButtonClicked();
160
164 void deleteToolButtonClicked();
165
169 void copyToolButtonClicked();
170
174 void buttonBoxAccepted();
175
179 void buttonBoxHelpRequested();
180
184 void dataChanged(const QModelIndex &);
185
190 void filterChanged(const QString &text);
191
195 void selectionChanged();
196
201 void profileContextMenu(const QPoint &pos);
202
207 QModelIndexList selectedProfiles();
208
209 // QWidget interface
210
211};
212
213#endif // PROFILE_DIALOG_H
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
void selectProfile(QString profile=QString())
Select the profile with the given name.
Definition profile_dialog.cpp:164
virtual void keyPressEvent(QKeyEvent *event) override
Handles key press events within the dialog.
Definition profile_dialog.cpp:157
QLabel * autoSwitchLimitLabel() const
Gets the auto switch limit label UI element.
Definition profile_dialog.cpp:152
ProfileDialog(QWidget *parent=Q_NULLPTR)
Constructs a ProfileDialog.
Definition profile_dialog.cpp:48
ProfileAction
Actions that can be performed on profiles.
Definition profile_dialog.h:38
@ ShowProfiles
Definition profile_dialog.h:39
@ ImportDirProfile
Definition profile_dialog.h:42
@ ExportSingleProfileWithChildren
Definition profile_dialog.h:44
@ ImportZipProfile
Definition profile_dialog.h:41
@ ExportAllProfiles
Definition profile_dialog.h:45
@ EditCurrentProfile
Definition profile_dialog.h:46
@ DeleteCurrentProfile
Definition profile_dialog.h:47
@ ExportSingleProfile
Definition profile_dialog.h:43
@ NewProfile
Definition profile_dialog.h:40
int execAction(ProfileAction profile_action)
Executes a specific profile action.
Definition profile_dialog.cpp:173
virtual ~ProfileDialog()
Destroys the ProfileDialog.
Definition profile_dialog.cpp:147
Table model that manages the full set of configuration profiles, supporting creation,...
Definition profile_model.h:273
Sort/filter proxy model for ProfileModel, supporting filtering by profile visibility (all,...
Definition profile_model.h:207
Definition packet-epl.h:22