aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/proto_tree.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2012-08-14 04:12:56 +0000
committerGerald Combs <gerald@wireshark.org>2012-08-14 04:12:56 +0000
commite0fcd7c21fe9333ab51641b8a5dc6a1477848ac7 (patch)
tree7b599899eb84e8e8527c65ea6f2ce1fe1af2d022 /ui/qt/proto_tree.cpp
parent5a84802a2184b3ef95764fa838a7850f2101f6f4 (diff)
Add a "View" menu along with actions+slots for expanding and collapsing
packet details. Connect the "Go" menu actions directly to their corresponding packet list slots. svn path=/trunk/; revision=44483
Diffstat (limited to 'ui/qt/proto_tree.cpp')
-rw-r--r--ui/qt/proto_tree.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/ui/qt/proto_tree.cpp b/ui/qt/proto_tree.cpp
index 64a30c9815..c4cffaae83 100644
--- a/ui/qt/proto_tree.cpp
+++ b/ui/qt/proto_tree.cpp
@@ -30,6 +30,7 @@
#include <QApplication>
#include <QHeaderView>
+#include <QTreeWidgetItemIterator>
QColor expert_color_chat ( 0x80, 0xb7, 0xf7 ); /* light blue */
QColor expert_color_note ( 0xa0, 0xff, 0xff ); /* bright turquoise */
@@ -216,3 +217,19 @@ void ProtoTree::updateSelectionStatus(QTreeWidgetItem* item) {
emit protoItemUnselected();
}
}
+
+#include <QDebug>
+
+void ProtoTree::expandSubtrees()
+{
+ QTreeWidgetItem *topSel;
+
+ foreach(topSel, selectedItems()) {
+ QTreeWidgetItemIterator iter(topSel);
+ while (*iter) {
+ (*iter)->setExpanded(true);
+ iter++;
+ }
+ }
+}
+