86 QString
toString(
const QModelIndex &start_idx = QModelIndex())
const;
109 virtual void timerEvent(QTimerEvent *event)
override;
129 virtual bool eventFilter(QObject * obj, QEvent * ev)
override;
137 virtual QModelIndex
moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers)
override;
145 QString
traverseTree(
const QModelIndex & rootNode,
int identLevel = 0)
const;
155 QMenu colorize_menu_;
158 QList<QAction *> copy_actions_;
161 int column_resize_timer_;
164 QList<QPair<int,int> > selected_hfid_path_;
167 QPoint drag_start_position_;
179 void saveSelectedField(QModelIndex &index);
186 static void foreachTreeNode(
proto_node *node,
void *proto_tree_ptr);
192 void foreachExpand(
const QModelIndex &index);
319 void selectionChanged(
const QItemSelection &selected,
const QItemSelection &deselected)
override;
325 void ctxShowPacketBytes();
330 void ctxExportPacketBytes();
357 void updateContentWidth();
362 void connectToMainWindow();
A wrapper class for the core proto_node structure, providing tree traversal and data access.
Definition proto_node.h:24
A tree view for displaying protocol dissection details.
Definition proto_tree.h:30
virtual QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override
Handles cursor movements within the tree.
Definition proto_tree.cpp:1004
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override
Handles changes in the tree view selection.
Definition proto_tree.cpp:640
void fieldSelected(FieldInformation *finfo)
Signal emitted when a field is selected.
void openPacketInNewWindow(bool open)
Signal emitted to open the packet in a new window.
QMenu * colorizeMenu()
Retrieves the colorize menu.
Definition proto_tree.h:44
void expandSubtrees()
Expands all subtrees of the currently selected item.
Definition proto_tree.cpp:694
void emitRelatedFrame(int related_frame, ft_framenum_type_t framenum_type=FT_FRAMENUM_NONE)
Emits a signal indicating a related frame.
Definition proto_tree.cpp:617
void ctxCopyVisibleItems()
Context menu action to copy all visible items.
Definition proto_tree.cpp:120
void setMonospaceFont(const QFont &mono_font)
Sets the monospace font used in the tree view.
Definition proto_tree.cpp:558
@ Value
Definition proto_tree.h:96
@ Name
Definition proto_tree.h:94
@ Description
Definition proto_tree.h:95
void syncExpanded(const QModelIndex &index)
Synchronizes the expanded state of a node.
Definition proto_tree.cpp:668
void autoScrollTo(const QModelIndex &index)
Automatically scrolls to a specific model index.
Definition proto_tree.cpp:622
void clear()
Clears the protocol tree.
Definition proto_tree.cpp:104
virtual void focusInEvent(QFocusEvent *event) override
Handles focus in events.
Definition proto_tree.cpp:529
void selectedFrameChanged(QList< int > frames)
Slot triggered when the selected frame changes.
Definition proto_tree.cpp:814
void redissectPacketsRequested()
Signal emitted to request redissection of packets.
QString toString(const QModelIndex &start_idx=QModelIndex()) const
Converts the tree or a subtree to a string representation.
Definition proto_tree.cpp:907
void goToPacket(int packet_num)
Signal emitted to jump to a specific packet.
void relatedFrame(int frame_num, ft_framenum_type_t type)
Signal emitted to indicate a related frame.
void collapseAll()
Collapses all items in the tree.
Definition proto_tree.cpp:747
void ctxOpenUrlWiki()
Context menu action to open the associated protocol wiki page.
Definition proto_tree.cpp:193
virtual void timerEvent(QTimerEvent *event) override
Handles timer events.
Definition proto_tree.cpp:498
void expandAll()
Expands all items in the tree.
Definition proto_tree.cpp:738
virtual bool eventFilter(QObject *obj, QEvent *ev) override
Filters events for watched objects.
Definition proto_tree.cpp:931
void goToHfid(int hfid)
Navigates to a specific Header Field ID (HFID).
Definition proto_tree.cpp:634
void editProtocolPreference(pref_t *pref, module_t *module)
Signal emitted to edit a specific protocol preference.
virtual void keyReleaseEvent(QKeyEvent *event) override
Handles key release events.
Definition proto_tree.cpp:511
virtual void contextMenuEvent(QContextMenuEvent *event) override
Handles context menu events.
Definition proto_tree.cpp:246
void showProtocolPreferences(const QString module_name)
Signal emitted to show preferences for a specific protocol.
void restoreSelectedField()
Restores the previously selected field in the tree.
Definition proto_tree.cpp:860
void ctxCopySelectedInfo()
Context menu action to copy the selected information.
Definition proto_tree.cpp:154
void setRootNode(proto_node *root_node)
Sets the root protocol node to be displayed.
Definition proto_tree.cpp:603
void itemDoubleClicked(const QModelIndex &index)
Slot triggered when an item is double-clicked.
Definition proto_tree.cpp:793
void setCaptureFile(capture_file *cf)
Set the capture file.
Definition proto_tree.cpp:922
QString traverseTree(const QModelIndex &rootNode, int identLevel=0) const
Traverses the tree and builds a string representation.
Definition proto_tree.cpp:883
void ctxCopyAsFilter()
Context menu action to copy the selected item as a display filter.
Definition proto_tree.cpp:138
void syncCollapsed(const QModelIndex &index)
Synchronizes the collapsed state of a node.
Definition proto_tree.cpp:681
void collapseSubtrees()
Collapses all subtrees of the currently selected item.
Definition proto_tree.cpp:716
void itemClicked(const QModelIndex &index)
Slot triggered when an item is clicked.
Definition proto_tree.cpp:756
void selectedFieldChanged(FieldInformation *finfo)
Slot triggered when the selected field changes.
Definition proto_tree.cpp:826
void recolorPacketsRequested()
Signal emitted to request packet recolorization.
Item model that exposes a libwireshark proto_node tree to Qt views, enabling the packet-details tree ...
Definition proto_tree_model.h:25
enum ft_framenum_type ft_framenum_type_t
Convenience typedef for ft_framenum_type.
Definition ftypes.h:208
@ FT_FRAMENUM_NONE
Definition ftypes.h:197
Represents a capture file and its associated metadata.
Definition cfile.h:84
Holds all state for the dissection of a single byte array, including session, buffer,...
Definition epan_dissect.h:28
Represents a preference module grouping related preferences under a named, hierarchical entry in the ...
Definition prefs-int.h:27