Qt: Allow shift-double-clicking on a frame link.

You can open a new packet window in the GTK+ UI by holding down the
shift key and double-clicking on a frame link in the protocol tree. Add
this behavior to the Qt UI. Document the different ways of opening a new
packet window and update the image.

Change-Id: I55caf6cc8089a6c305fafd47b4870e7c69dbfb10
Reviewed-on: https://code.wireshark.org/review/7101
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2015-02-13 08:36:53 -08:00
parent 4d5bdf4256
commit 936f685af5
6 changed files with 23 additions and 7 deletions

BIN
docbook/wsug_graphics/ws-packet-sep-win.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -30,16 +30,25 @@ You can also select and view packets the same way while Wireshark is capturing
if you selected ``Update list of packets in real time'' in the ``Capture
Preferences'' dialog box.
In addition, you can view individual packets in a separate window as shown in
<<ChWorkPacketSepView>>. Do this by selecting the packet in which you are
interested in the packet list pane, and then select menu:View[Show Packet in New
Window]. This allows you to easily compare two or even more packets.
In addition you can view individual packets in a separate window as shown in
<<ChWorkPacketSepView>>. You can do this by double-clicking on an item in the
packet list or by selecting the packet in which you are interested in the packet
list pane and selecting menu:View[Show Packet in New Window]. This allows you to
easily compare two or more packets, even across multiple files.
[[ChWorkPacketSepView]]
.Viewing a packet in a separate window
image::wsug_graphics/ws-packet-sep-win.png[]
Along with double-clicking the packet list and using the main menu there are a
number of other ways to open a new packet window:
- Hold down the shift key and double-click on a frame link in the packet
details.
- From <<PacketListPopupMenuTable>>.
- From <<PacketDetailsPopupMenuTable>>.
[[ChWorkDisplayPopUpSection]]
=== Pop-up menus

View File

@ -393,6 +393,8 @@ MainWindow::MainWindow(QWidget *parent) :
main_ui_->statusBar, SLOT(pushFieldStatus(QString&)));
connect(proto_tree_, SIGNAL(protoItemSelected(field_info *)),
this, SLOT(setMenusForSelectedTreeRow(field_info *)));
connect(proto_tree_, SIGNAL(openPacketInNewWindow(bool)),
this, SLOT(openPacketDialog(bool)));
connect(byte_view_tab_, SIGNAL(byteFieldHovered(QString&)),
main_ui_->statusBar, SLOT(pushByteStatus(QString&)));

View File

@ -433,7 +433,7 @@ PacketList::PacketList(QWidget *parent) :
void PacketList::setProtoTree (ProtoTree *proto_tree) {
proto_tree_ = proto_tree;
connect(proto_tree_, SIGNAL(goToFrame(int)), this, SLOT(goToPacket(int)));
connect(proto_tree_, SIGNAL(goToPacket(int)), this, SLOT(goToPacket(int)));
connect(proto_tree_, SIGNAL(relatedFrame(int)), this, SLOT(addRelatedFrame(int)));
}

View File

@ -455,7 +455,11 @@ void ProtoTree::itemDoubleClick(QTreeWidgetItem *item, int column) {
fi = item->data(0, Qt::UserRole).value<field_info *>();
if(fi->hfinfo->type == FT_FRAMENUM) {
emit goToFrame(fi->value.value.uinteger);
if (QApplication::queryKeyboardModifiers() & Qt::ShiftModifier) {
emit openPacketInNewWindow(true);
} else {
emit goToPacket(fi->value.value.uinteger);
}
}
if(FI_GET_FLAG(fi, FI_URL) && IS_FT_STRING(fi->hfinfo->type)) {

View File

@ -51,7 +51,8 @@ private:
signals:
void protoItemSelected(QString &);
void protoItemSelected(field_info *);
void goToFrame(int);
void openPacketInNewWindow(bool);
void goToPacket(int);
void relatedFrame(int);
public slots: