Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
uat_dialog.h
1 /* uat_dialog.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9 
10 #ifndef UAT_DIALOG_H
11 #define UAT_DIALOG_H
12 
13 #include <config.h>
14 
15 #include <glib.h>
16 
17 #include "geometry_state_dialog.h"
18 #include <ui/qt/models/uat_model.h>
19 #include <ui/qt/models/uat_delegate.h>
20 
21 class QComboBox;
22 class QPushButton;
23 
24 struct epan_uat;
25 
26 namespace Ui {
27 class UatDialog;
28 }
29 
31 {
32  Q_OBJECT
33 
34 public:
35  explicit UatDialog(QWidget *parent = 0, struct epan_uat *uat = NULL);
36  ~UatDialog();
37 
38  void setUat(struct epan_uat *uat = NULL);
39 
40 private slots:
41  void modelDataChanged(const QModelIndex &topLeft);
42  void modelRowsRemoved();
43  void modelRowsReset();
44  void on_uatTreeView_currentItemChanged(const QModelIndex &current, const QModelIndex &previous);
45  void acceptChanges();
46  void rejectChanges();
47  void on_newToolButton_clicked();
48  void on_deleteToolButton_clicked();
49  void on_copyToolButton_clicked();
50  void on_moveUpToolButton_clicked();
51  void on_moveDownToolButton_clicked();
52  void on_clearToolButton_clicked();
53  void on_buttonBox_helpRequested();
54 
55 private:
56  Ui::UatDialog *ui;
57  UatModel *uat_model_;
58  UatDelegate *uat_delegate_;
59  QPushButton *ok_button_;
60  QPushButton *help_button_;
61  struct epan_uat *uat_;
62 
63  void checkForErrorHint(const QModelIndex &current, const QModelIndex &previous);
64  bool trySetErrorHintFromField(const QModelIndex &index);
65  void applyChanges();
66  void addRecord(bool copy_from_current = false);
67 };
68 
69 #endif // UAT_DIALOG_H
Definition: geometry_state_dialog.h:15
Definition: ui_about_dialog.h:291
Definition: uat_model.h:24
Definition: uat_delegate.h:23
Definition: uat_dialog.h:30
Definition: ui_uat_dialog.h:178
Definition: uat-int.h:39