| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
profile_dialog.h
Go to the documentation of this file.
1
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
23namespace Ui {
24class ProfileDialog;
25}
26
27 class ProfileDialog : public GeometryStateDialog
28{
29 Q_OBJECT
30
31public:
32 enum ProfileAction {
33 ShowProfiles, NewProfile, ImportZipProfile, ImportDirProfile,
34 ExportSingleProfile, ExportAllProfiles, EditCurrentProfile, DeleteCurrentProfile
35 };
36
37 explicit ProfileDialog(QWidget *parent = Q_NULLPTR);
38 virtual ~ProfileDialog();
39 int execAction(ProfileAction profile_action);
40
49 void selectProfile(QString profile = QString());
50
51protected:
52 virtual void keyPressEvent(QKeyEvent *event);
53 // UI getters
54 QLabel* autoSwitchLimitLabel() const;
55
56private:
57 Ui::ProfileDialog *pd_ui_;
58 QPushButton *ok_button_;
59 QPushButton *import_button_;
60#if defined(HAVE_MINIZIP) || defined(HAVE_MINIZIPNG)
61 QPushButton *export_button_;
62 QAction *export_selected_entry_;
63#endif
64 ProfileModel *model_;
65 ProfileSortModel *sort_model_;
66
67 void updateWidgets();
68 void resetTreeView();
69
70 void finishImport(QFileInfo fi, int count, int skipped, QStringList import);
71
72private slots:
73 void currentItemChanged(const QModelIndex & c = QModelIndex(), const QModelIndex & p = QModelIndex());
74#if defined(HAVE_MINIZIP) || defined(HAVE_MINIZIPNG)
75 void exportProfiles(bool exportAllPersonalProfiles = false);
76 void importFromZip();
77#endif
78 void importFromDirectory();
79
80 void newToolButtonClicked();
81 void deleteToolButtonClicked();
82 void copyToolButtonClicked();
83 void buttonBoxAccepted();
84 void buttonBoxRejected();
85 void buttonBoxHelpRequested();
86 void dataChanged(const QModelIndex &);
87
88 void filterChanged(const QString &);
89
90 void selectionChanged();
91 QModelIndexList selectedProfiles();
92
93 // QWidget interface
94
95};
96
97#endif // PROFILE_DIALOG_H
GeometryStateDialog
Definition geometry_state_dialog.h:17
ProfileDialog
Definition profile_dialog.h:28
ProfileDialog::selectProfile
void selectProfile(QString profile=QString())
Select the profile with the given name.
Definition profile_dialog.cpp:147
ProfileModel
Definition profile_model.h:52
ProfileSortModel
Definition profile_model.h:25
geometry_state_dialog.h
profile_model.h
profile_tree_view.h
profile
Definition packet-epl.h:22