summaryrefslogtreecommitdiffstats
path: root/ui/qt/widgets/rowmove_tree_view.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
commita86c5f7cae7ec9a3398300555a0b644689d946a1 (patch)
tree39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /ui/qt/widgets/rowmove_tree_view.h
parentReleasing progress-linux version 4.2.6-1~progress7.99u1. (diff)
downloadwireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz
wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ui/qt/widgets/rowmove_tree_view.h')
-rw-r--r--ui/qt/widgets/rowmove_tree_view.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/ui/qt/widgets/rowmove_tree_view.h b/ui/qt/widgets/rowmove_tree_view.h
new file mode 100644
index 00000000..ac415c41
--- /dev/null
+++ b/ui/qt/widgets/rowmove_tree_view.h
@@ -0,0 +1,35 @@
+/** @file
+ *
+ * Tree view that uses a model's moveRows(), if implemented, to support
+ * internalMoves.
+ *
+ * Copyright 2024 John Thacker <johnthacker@gmail.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef ROWMOVE_TREE_VIEW_H
+#define ROWMOVE_TREE_VIEW_H
+
+#include <config.h>
+#include <ui/qt/widgets/tabnav_tree_view.h>
+
+/**
+ * Like QTreeView, but instead of changing to the next row (same column) when
+ * pressing Tab while editing, change to the next column (same row).
+ */
+class RowMoveTreeView : public TabnavTreeView
+{
+ Q_OBJECT
+
+public:
+ RowMoveTreeView(QWidget *parent = nullptr);
+
+protected:
+ void dropEvent(QDropEvent *event) override;
+};
+#endif // ROWMOVE_TREE_VIEW_H