diff options
author | Michael Mann <mmann78@netscape.net> | 2017-06-21 23:58:50 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-06-22 13:07:11 +0000 |
commit | 29e726a606a5bb7b860d8a2f6ee2996c1b4a154e (patch) | |
tree | 361782ab965df7283993ebb45f035bb471b221fc /ui/qt/uat_delegate.cpp | |
parent | 9fe90b93ce9bbb802f45b93632a78f5261b3f717 (diff) | |
download | wireshark-29e726a606a5bb7b860d8a2f6ee2996c1b4a154e.tar.gz |
Add support for "bool" and "display filter" types for UATs.
Filter expressions needs support for a checkbox (bool) and
string field that verifies display filters.
Change-Id: Idfbffd6cdb5abaee8914126a05d890e834c17306
Reviewed-on: https://code.wireshark.org/review/22340
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/qt/uat_delegate.cpp')
-rw-r--r-- | ui/qt/uat_delegate.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ui/qt/uat_delegate.cpp b/ui/qt/uat_delegate.cpp index 641edbcc24..09e9ef848b 100644 --- a/ui/qt/uat_delegate.cpp +++ b/ui/qt/uat_delegate.cpp @@ -28,6 +28,9 @@ #include <QEvent> #include <QFileDialog> #include <QLineEdit> +#include <QCheckBox> + +#include "display_filter_edit.h" UatDelegate::UatDelegate(QObject *parent) : QStyledItemDelegate(parent) { @@ -66,6 +69,11 @@ QWidget *UatDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem & // TODO add a live validator? Should SyntaxLineEdit be used? return QStyledItemDelegate::createEditor(parent, option, index); + case PT_TXTMOD_DISPLAY_FILTER: + { + DisplayFilterEdit *editor = new DisplayFilterEdit(parent); + return editor; + } case PT_TXTMOD_HEXBYTES: { // Requires input of the form "ab cd ef" (with possibly no or a colon @@ -81,6 +89,12 @@ QWidget *UatDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem & return editor; } + case PT_TXTMOD_BOOL: + { + // model will handle creating checkbox + return 0; + } + case PT_TXTMOD_NONE: return 0; |