diff options
author | Michael Mann <mmann78@netscape.net> | 2017-07-30 23:30:59 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-08-07 04:53:42 +0000 |
commit | ff7a6305a7eaa3c3815e813acc78a1660ae82293 (patch) | |
tree | 70b097d2097c5adbe904bb0d2364d8fb21773f8e /ui/qt/models/uat_delegate.h | |
parent | 4dc835c9c6b7af68cd63ae9efa26ac23ee3d9365 (diff) |
Use proper tab order for "file types" in UAT "table".
Directory and File "UAT types" have been using a separately launched
dialog, instead of an "editor", so it breaks "tab rules". Create and
treat (File) dialog as an editor.
Change-Id: I983728abefb0cdd79899468a800328f1b56e2910
Reviewed-on: https://code.wireshark.org/review/22886
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/models/uat_delegate.h')
-rw-r--r-- | ui/qt/models/uat_delegate.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ui/qt/models/uat_delegate.h b/ui/qt/models/uat_delegate.h index 795161a686..81ad108864 100644 --- a/ui/qt/models/uat_delegate.h +++ b/ui/qt/models/uat_delegate.h @@ -28,7 +28,9 @@ #include <config.h> #include <glib.h> #include <epan/uat-int.h> + #include <QStyledItemDelegate> +#include <QModelIndex> class UatDelegate : public QStyledItemDelegate { @@ -43,15 +45,14 @@ public: void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const; -#if 0 void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const; -#endif - bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index); +private slots: + void applyDirectory(const QModelIndex& index); + void applyFilename(const QModelIndex& index); private: uat_field_t *indexToField(const QModelIndex &index) const; - QString openFileDialog(uat_field_t *field, const QString &cur_path) const; }; #endif // UAT_DELEGATE_H |