2021-11-30 13:01:36 +00:00
|
|
|
/** @file
|
2013-02-06 18:22:54 +00:00
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-04-30 07:47:58 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2013-02-06 18:22:54 +00:00
|
|
|
|
2017-07-09 19:52:27 +00:00
|
|
|
#ifndef UAT_FRAME_H
|
|
|
|
#define UAT_FRAME_H
|
2013-02-06 18:22:54 +00:00
|
|
|
|
|
|
|
#include <QFrame>
|
2015-02-08 20:24:19 +00:00
|
|
|
|
2017-06-22 15:34:48 +00:00
|
|
|
#include <ui/qt/geometry_state_dialog.h>
|
2017-07-25 14:47:16 +00:00
|
|
|
#include <ui/qt/models/uat_model.h>
|
|
|
|
#include <ui/qt/models/uat_delegate.h>
|
2013-02-06 18:22:54 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
2017-07-09 19:52:27 +00:00
|
|
|
class UatFrame;
|
2013-02-06 18:22:54 +00:00
|
|
|
}
|
|
|
|
|
2017-07-09 19:52:27 +00:00
|
|
|
class UatFrame : public QFrame
|
2013-02-06 18:22:54 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2014-02-25 20:42:35 +00:00
|
|
|
|
2013-02-06 18:22:54 +00:00
|
|
|
public:
|
2017-07-09 19:52:27 +00:00
|
|
|
explicit UatFrame(QWidget *parent = NULL);
|
|
|
|
~UatFrame();
|
2013-02-06 18:22:54 +00:00
|
|
|
|
2017-06-22 15:34:48 +00:00
|
|
|
void setUat(struct epan_uat *uat);
|
2013-02-06 18:22:54 +00:00
|
|
|
|
2017-06-22 15:34:48 +00:00
|
|
|
void acceptChanges();
|
|
|
|
void rejectChanges();
|
2013-02-06 18:22:54 +00:00
|
|
|
|
2018-10-08 19:12:41 +00:00
|
|
|
protected:
|
|
|
|
void showEvent(QShowEvent *);
|
|
|
|
|
2013-02-06 18:22:54 +00:00
|
|
|
private:
|
2017-07-09 19:52:27 +00:00
|
|
|
Ui::UatFrame *ui;
|
2013-02-06 18:22:54 +00:00
|
|
|
|
2017-06-22 15:34:48 +00:00
|
|
|
UatModel *uat_model_;
|
|
|
|
UatDelegate *uat_delegate_;
|
|
|
|
struct epan_uat *uat_;
|
2013-02-06 18:22:54 +00:00
|
|
|
|
2017-06-22 15:34:48 +00:00
|
|
|
void checkForErrorHint(const QModelIndex ¤t, const QModelIndex &previous);
|
|
|
|
bool trySetErrorHintFromField(const QModelIndex &index);
|
|
|
|
void addRecord(bool copy_from_current = false);
|
2017-07-21 23:12:52 +00:00
|
|
|
void applyChanges();
|
2020-12-03 18:44:45 +00:00
|
|
|
void resizeColumns();
|
2013-02-06 18:22:54 +00:00
|
|
|
|
|
|
|
private slots:
|
2019-08-13 09:28:48 +00:00
|
|
|
void copyFromProfile(QString filename);
|
2017-06-22 15:34:48 +00:00
|
|
|
void modelDataChanged(const QModelIndex &topLeft);
|
|
|
|
void modelRowsRemoved();
|
2017-10-17 17:57:04 +00:00
|
|
|
void modelRowsReset();
|
2017-07-16 10:32:40 +00:00
|
|
|
void on_uatTreeView_currentItemChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
2013-02-06 18:22:54 +00:00
|
|
|
void on_newToolButton_clicked();
|
|
|
|
void on_deleteToolButton_clicked();
|
2016-01-16 00:52:26 +00:00
|
|
|
void on_copyToolButton_clicked();
|
2017-11-14 12:44:27 +00:00
|
|
|
void on_moveUpToolButton_clicked();
|
|
|
|
void on_moveDownToolButton_clicked();
|
2017-10-17 17:57:04 +00:00
|
|
|
void on_clearToolButton_clicked();
|
2013-02-06 18:22:54 +00:00
|
|
|
};
|
|
|
|
|
2017-07-09 19:52:27 +00:00
|
|
|
#endif // UAT_FRAME_H
|