2017-07-09 19:52:27 +00:00
|
|
|
/* uat_frame.h
|
2013-02-06 18:22:54 +00:00
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
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
|
|
|
|
|
|
|
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();
|
2013-02-06 18:22:54 +00:00
|
|
|
|
|
|
|
private slots:
|
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
|