2021-11-30 13:01:36 +00:00
|
|
|
/** @file
|
2013-11-22 01:07:36 +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-11-22 01:07:36 +00:00
|
|
|
|
|
|
|
#ifndef DECODE_AS_DIALOG_H
|
|
|
|
#define DECODE_AS_DIALOG_H
|
|
|
|
|
2015-04-26 17:21:09 +00:00
|
|
|
#include <config.h>
|
2013-11-22 01:07:36 +00:00
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
|
|
#include "cfile.h"
|
2017-07-14 19:21:37 +00:00
|
|
|
#include <ui/qt/models/decode_as_model.h>
|
|
|
|
#include <ui/qt/models/decode_as_delegate.h>
|
2013-11-22 01:07:36 +00:00
|
|
|
|
2016-02-28 18:23:20 +00:00
|
|
|
#include "geometry_state_dialog.h"
|
2013-12-10 19:23:26 +00:00
|
|
|
#include <QMap>
|
2015-06-23 17:31:58 +00:00
|
|
|
#include <QAbstractButton>
|
2015-02-08 20:24:19 +00:00
|
|
|
|
|
|
|
class QComboBox;
|
2013-11-22 01:07:36 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class DecodeAsDialog;
|
|
|
|
}
|
|
|
|
|
2016-02-28 18:23:20 +00:00
|
|
|
class DecodeAsDialog : public GeometryStateDialog
|
2013-11-22 01:07:36 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2013-12-10 21:07:26 +00:00
|
|
|
explicit DecodeAsDialog(QWidget *parent = 0, capture_file *cf = NULL, bool create_new = false);
|
2013-11-22 01:07:36 +00:00
|
|
|
~DecodeAsDialog();
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::DecodeAsDialog *ui;
|
|
|
|
|
2017-07-14 19:21:37 +00:00
|
|
|
DecodeAsModel* model_;
|
|
|
|
DecodeAsDelegate* delegate_;
|
|
|
|
|
2013-12-10 19:23:26 +00:00
|
|
|
void addRecord(bool copy_from_current = false);
|
2017-07-14 19:21:37 +00:00
|
|
|
void applyChanges();
|
|
|
|
void fillTable();
|
|
|
|
void resizeColumns();
|
2013-11-22 01:07:36 +00:00
|
|
|
|
2018-10-07 17:45:15 +00:00
|
|
|
public slots:
|
|
|
|
void modelRowsReset();
|
|
|
|
|
2013-11-22 01:07:36 +00:00
|
|
|
private slots:
|
2020-06-30 08:28:30 +00:00
|
|
|
void copyFromProfile(QString filename);
|
2017-07-14 19:21:37 +00:00
|
|
|
void on_decodeAsTreeView_currentItemChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
2013-12-10 19:23:26 +00:00
|
|
|
|
|
|
|
void on_newToolButton_clicked();
|
|
|
|
void on_deleteToolButton_clicked();
|
|
|
|
void on_copyToolButton_clicked();
|
2018-10-07 17:45:15 +00:00
|
|
|
void on_clearToolButton_clicked();
|
2013-12-10 19:23:26 +00:00
|
|
|
|
2015-06-23 17:31:58 +00:00
|
|
|
void on_buttonBox_clicked(QAbstractButton *button);
|
2013-11-22 01:07:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // DECODE_AS_DIALOG_H
|