|
Wireshark 4.7.3
The Wireshark network protocol analyzer
|
Wireshark main application window, extending MainWindow with the full Wireshark feature set including live capture, telephony analysis, RTP stream handling, wireless tools, and plugin/Lua integration. More...
#include <wireshark_main_window.h>
Public Slots | |
| bool | openCaptureFile (QString cf_path, QString display_filter, unsigned int type, bool is_tempfile=false) |
| Opens a capture file. | |
| bool | openCaptureFile (QString cf_path=QString(), QString display_filter=QString()) |
| Convenience overload that auto-detects file type. | |
| void | layoutToolbars () |
| Repositions and resizes toolbars according to current layout settings. | |
| void | updatePreferenceActions () |
| Refreshes menu items that reflect preference values. | |
| void | updateRecentActions () |
| Rebuilds the File → Open Recent submenu from the recent-files list. | |
| void | updateAggregationView () const |
| Refreshes the packet aggregation view to reflect the current capture state. | |
| void | setTitlebarForCaptureFile () |
| Updates the window title bar to reflect the current capture file name and state. | |
| void | showCaptureOptionsDialog () |
| Opens the capture options dialog (interface selection, filters, etc.). | |
| void | captureFileOpened () |
| Updates UI state when a capture file is first opened. | |
| void | captureFileReadFinished () |
| Updates UI state after a capture file has been fully read. | |
| void | captureFileClosing () |
| Updates UI state while a capture file is being closed. | |
| void | captureFileClosed () |
| Resets UI state after a capture file has been fully closed. | |
| void | launchRLCGraph (bool channelKnown, uint8_t RAT, uint16_t ueid, uint8_t rlcMode, uint16_t channelType, uint16_t channelId, uint8_t direction) |
| Opens the LTE RLC graph dialog for a specific channel. | |
| void | rtpPlayerDialogReplaceRtpStreams (QVector< rtpstream_id_t * > stream_ids) |
| Replaces all streams in the RTP Player dialog with the given stream list. | |
| void | rtpPlayerDialogAddRtpStreams (QVector< rtpstream_id_t * > stream_ids) |
| Adds streams to the RTP Player dialog. | |
| void | rtpPlayerDialogRemoveRtpStreams (QVector< rtpstream_id_t * > stream_ids) |
| Removes streams from the RTP Player dialog. | |
| void | rtpAnalysisDialogReplaceRtpStreams (QVector< rtpstream_id_t * > stream_ids) |
| Replaces all streams in the RTP Analysis dialog with the given stream list. | |
| void | rtpAnalysisDialogAddRtpStreams (QVector< rtpstream_id_t * > stream_ids) |
| Adds streams to the RTP Analysis dialog. | |
| void | rtpAnalysisDialogRemoveRtpStreams (QVector< rtpstream_id_t * > stream_ids) |
| Removes streams from the RTP Analysis dialog. | |
| void | rtpStreamsDialogSelectRtpStreams (QVector< rtpstream_id_t * > stream_ids) |
| Selects the given streams in the RTP Streams dialog. | |
| void | rtpStreamsDialogDeselectRtpStreams (QVector< rtpstream_id_t * > stream_ids) |
| Deselects the given streams in the RTP Streams dialog. | |
| Public Slots inherited from MainWindow | |
| void | setDisplayFilter (QString filter, FilterAction::Action action, FilterAction::ActionType filterType) |
| Sets the display filter and performs an action. | |
| void | filterPackets (QString new_filter=QString(), bool force=true) |
| Sets and applies a new display filter to the open capture file. | |
| virtual void | showPreferencesDialog (QString module_name)=0 |
| Shows the preferences dialog for a specific module. | |
| virtual void | showIOGraphDialog (io_graph_item_unit_t value_units, QString yfield)=0 |
| Shows the IO graph dialog. | |
| virtual void | showPlotDialog (const QString &y_field, bool filtered)=0 |
| Shows a plot dialog. | |
| void | layoutPanes () |
| Recalculates and lays out the panes. | |
| void | applyRecentPaneGeometry () |
| Applies the most recent pane geometry settings. | |
| void | updateForUnsavedChanges () |
| Updates the UI to reflect unsaved changes. | |
| void | cyclePane (bool reverse=false) |
| Cycles the focus through the available panes. | |
Signals | |
| void | setDissectedCaptureFile (capture_file *cf) |
| Emitted when a dissected capture file becomes the active file. | |
| void | closePacketDialogs () |
| Emitted to request that all packet-detail dialogs close themselves. | |
| void | reloadFields () |
| Emitted to request that all views reload their field definitions. | |
| void | packetInfoChanged (struct _packet_info *pinfo) |
| Emitted when the selected packet changes, providing the new packet info. | |
| void | fieldFilterChanged (const QByteArray field_filter) |
| Emitted when the field-based display filter changes. | |
| void | selectRtpStream (rtpstream_id_t *id) |
| Emitted to request that an RTP stream be selected in all interested dialogs. | |
| void | deselectRtpStream (rtpstream_id_t *id) |
| Emitted to request that an RTP stream be deselected in all interested dialogs. | |
| Signals inherited from MainWindow | |
| void | setCaptureFile (capture_file *cf) |
| Signal emitted to set a new capture file. | |
| void | captureActive (int active) |
| Signal emitted when a capture becomes active. | |
| void | fieldSelected (FieldInformation *finfo) |
| Signal emitted when a field is selected. | |
| void | fieldHighlight (FieldInformation *finfo) |
| Signal emitted when a field is highlighted. | |
| void | framesSelected (QList< int > frames) |
| Signal emitted when frames are selected. | |
| void | filterAction (QString filter, FilterAction::Action action, FilterAction::ActionType type) |
| Signal emitted to perform a filter action. | |
| void | displayFilterSuccess (bool success) |
| Signal emitted when a display filter is successfully applied. | |
Public Member Functions | |
| WiresharkMainWindow (QWidget *parent=nullptr) | |
| Constructs the Wireshark main window and initialises all menus, toolbars, and UI components. | |
| ~WiresharkMainWindow () | |
| Destroys the main window and releases all associated resources. | |
| QMenu * | createPopupMenu () override |
| Creates and returns the window's right-click popup menu. | |
| CaptureFile * | captureFile () |
| Returns a pointer to the current capture file object. | |
| void | setFunnelMenus (void) |
| Rebuilds the Lua funnel statistics menus from registered funnel entries. | |
| void | removeAdditionalToolbar (QString toolbarName) |
| Removes an additional (plugin/interface) toolbar by name. | |
| void | addInterfaceToolbar (const iface_toolbar *toolbar_entry) |
| Adds an interface toolbar for the given toolbar descriptor. | |
| void | removeInterfaceToolbar (const char *menu_title) |
| Removes the interface toolbar with the given menu title. | |
| QString | getMwFileName () |
| Returns the file path currently shown in the main window title bar. | |
| void | setMwFileName (QString fileName) |
| Sets the file path shown in the main window title bar. | |
| Public Member Functions inherited from MainWindow | |
| MainWindow (QWidget *parent=nullptr) | |
| Constructs a new MainWindow. | |
| ~MainWindow () | |
| Destroys the MainWindow. | |
| void | setMainWindowTitle (QString title=QString()) |
| Sets the title of the main window. | |
| bool | hasSelection () |
| Checks if there is a current selection. | |
| bool | hasUniqueSelection () |
| Checks if the current selection is unique. | |
| QList< int > | selectedRows (bool useFrameNum=false) |
| Retrieves the selected rows. | |
| void | insertColumn (QString name, QString abbrev, int pos=-1) |
| Inserts a column into the view. | |
| void | gotoFrame (int packet_num) |
| Navigates to a specific frame number. | |
| frame_data * | frameDataForRow (int row) const |
| Retrieves frame data for a specific row. | |
| QString | getFilter () |
| Retrieves the current display filter. | |
| MainStatusBar * | statusBar () |
| Retrieves the main status bar. | |
| InterfaceListManager * | interfaceListManager () const |
| Returns the local interface enumeration/statistics coordinator. | |
| void | appendPacketMenu (FunnelAction *funnel_action) |
| Appends a custom packet menu action. | |
| QList< QAction * > | getPacketMenuActions () |
| Retrieves the list of custom packet menu actions. | |
| void | clearAddedPacketMenus () |
| Clears the recently added custom packet menus. | |
| bool | addPacketMenus (QMenu *ctx_menu, GPtrArray *finfo_array) |
| Adds packet menus to the given context menu. | |
Protected Slots | |
| void | applyFilter (QString new_filter=QString(), bool force=false) override |
| Applies a new display filter to the open capture file. | |
| Protected Slots inherited from MainWindow | |
| void | addDisplayFilterTranslationActions (QMenu *copy_menu) |
| Adds translation actions for the display filter to a menu. | |
| void | updateDisplayFilterTranslationActions (const QString &df_text) |
| Updates the available translation actions based on filter text. | |
| void | updateTitlebar () |
| Updates the main title bar text. | |
| virtual void | applyFilter (QString new_filter, bool force)=0 |
| Applies a new display filter to the open capture file. | |
Protected Member Functions | |
| bool | eventFilter (QObject *obj, QEvent *event) override |
| Filters events on watched objects (e.g. focus changes on child widgets). | |
| bool | event (QEvent *event) override |
| Handles window-level events such as activation changes. | |
| void | keyPressEvent (QKeyEvent *event) override |
| Handles key press events for global keyboard shortcuts. | |
| void | closeEvent (QCloseEvent *event) override |
| Prompts the user to save unsaved changes before closing the window. | |
| void | dragEnterEvent (QDragEnterEvent *event) override |
| Accepts drag-enter events for capture files dragged onto the window. | |
| void | dropEvent (QDropEvent *event) override |
| Opens a capture file dropped onto the window. | |
| void | changeEvent (QEvent *event) override |
| Responds to locale or palette changes by retranslating the UI. | |
| void | openRecentCaptureFile (const QString &filename) override |
| Opens the given recent capture file, handling any necessary prompts. | |
| bool | tryClosingCaptureFile (QString before_what, FileCloseContext context=Default) override |
| Attempts to close the current capture file, prompting the user to save if there are unsaved changes. | |
| Protected Member Functions inherited from MainWindow | |
| void | showWelcome () |
| Displays the welcome screen. | |
| void | showCapture () |
| Displays the main capture view. | |
| void | setTitlebarForCaptureInProgress () |
| Sets the title bar text for when a capture is in progress. | |
| void | setIconForCaptureInProgress (bool capture_in_progress) |
| Sets the window icon to indicate if a capture is in progress. | |
| QWidget * | getLayoutWidget (layout_pane_content_e type) |
| Retrieves the widget corresponding to a layout pane content type. | |
| void | populateRecentCapturesMenu () |
| Populate the recent captures menu. Calls openRecentCaptureFile() for each menu item action. | |
| void | retranslateUiElements () |
| Handle retranslation of UI elements in MainWindow. | |
Friends | |
| class | MainApplication |
| Friend class allowing access to private members. | |
Wireshark main application window, extending MainWindow with the full Wireshark feature set including live capture, telephony analysis, RTP stream handling, wireless tools, and plugin/Lua integration.
|
explicit |
Constructs the Wireshark main window and initialises all menus, toolbars, and UI components.
| parent | Optional parent widget. |
| void WiresharkMainWindow::addInterfaceToolbar | ( | const iface_toolbar * | toolbar_entry | ) |
Adds an interface toolbar for the given toolbar descriptor.
| toolbar_entry | Descriptor of the interface toolbar to add. |
|
overrideprotectedslot |
Applies a new display filter to the open capture file.
| new_filter | New filter expression; empty string shows all packets. |
| force | true to reapply even if the filter is unchanged. |
|
inline |
Returns a pointer to the current capture file object.
|
overrideprotected |
Responds to locale or palette changes by retranslating the UI.
| event | The change event. |
|
overrideprotected |
Prompts the user to save unsaved changes before closing the window.
| event | The close event; call ignore() to cancel. |
|
override |
Creates and returns the window's right-click popup menu.
|
signal |
Emitted to request that an RTP stream be deselected in all interested dialogs.
| id | RTP stream identifier to deselect. |
|
overrideprotected |
Accepts drag-enter events for capture files dragged onto the window.
| event | The drag-enter event. |
|
overrideprotected |
Opens a capture file dropped onto the window.
| event | The drop event carrying the file URL(s). |
|
overrideprotected |
Handles window-level events such as activation changes.
| event | The event to process. |
true if the event was handled; false otherwise.
|
overrideprotected |
Filters events on watched objects (e.g. focus changes on child widgets).
| obj | Object that received the event. |
| event | The event to inspect. |
true to suppress the event; false to pass it on.
|
signal |
Emitted when the field-based display filter changes.
| field_filter | New field filter expression as a byte array. |
| QString WiresharkMainWindow::getMwFileName | ( | ) |
Returns the file path currently shown in the main window title bar.
|
overrideprotected |
Handles key press events for global keyboard shortcuts.
| event | The key event to process. |
|
slot |
Opens the LTE RLC graph dialog for a specific channel.
| channelKnown | true if all channel parameters are known and should be applied immediately. |
| RAT | Radio access technology (e.g. LTE). |
| ueid | UE identifier. |
| rlcMode | RLC mode (TM, UM, or AM). |
| channelType | Logical channel type. |
| channelId | Logical channel ID. |
| direction | Traffic direction (uplink or downlink). |
|
slot |
Opens a capture file.
| cf_path | Path to the capture file to open. |
| display_filter | Display filter to apply after opening; may be empty. |
| type | Wiretap file type hint (use WTAP_TYPE_AUTO for auto-detection). |
| is_tempfile | true if the file is a temporary capture file. |
true on success; false on failure.
|
inlineslot |
Convenience overload that auto-detects file type.
| cf_path | Path to the capture file; empty opens a file dialog. |
| display_filter | Display filter to apply; may be empty. |
true on success; false on failure.
|
overrideprotectedvirtual |
Opens the given recent capture file, handling any necessary prompts.
| filename | Absolute path of the recent capture file to open. |
Implements MainWindow.
|
signal |
Emitted when the selected packet changes, providing the new packet info.
| pinfo | Packet info for the newly selected packet. |
| void WiresharkMainWindow::removeAdditionalToolbar | ( | QString | toolbarName | ) |
Removes an additional (plugin/interface) toolbar by name.
| toolbarName | Display name of the toolbar to remove. |
| void WiresharkMainWindow::removeInterfaceToolbar | ( | const char * | menu_title | ) |
Removes the interface toolbar with the given menu title.
| menu_title | NUL-terminated display title of the toolbar to remove. |
|
slot |
Adds streams to the RTP Analysis dialog.
| stream_ids | Vector of RTP stream identifiers to add. |
|
slot |
Removes streams from the RTP Analysis dialog.
| stream_ids | Vector of RTP stream identifiers to remove. |
|
slot |
Replaces all streams in the RTP Analysis dialog with the given stream list.
| stream_ids | Vector of RTP stream identifiers to set. |
|
slot |
Adds streams to the RTP Player dialog.
| stream_ids | Vector of RTP stream identifiers to add. |
|
slot |
Removes streams from the RTP Player dialog.
| stream_ids | Vector of RTP stream identifiers to remove. |
|
slot |
Replaces all streams in the RTP Player dialog with the given stream list.
| stream_ids | Vector of RTP stream identifiers to set. |
|
slot |
Deselects the given streams in the RTP Streams dialog.
| stream_ids | Vector of RTP stream identifiers to deselect. |
|
slot |
Selects the given streams in the RTP Streams dialog.
| stream_ids | Vector of RTP stream identifiers to select. |
|
signal |
Emitted to request that an RTP stream be selected in all interested dialogs.
| id | RTP stream identifier to select. |
|
signal |
Emitted when a dissected capture file becomes the active file.
| cf | Pointer to the newly active capture file. |
| void WiresharkMainWindow::setMwFileName | ( | QString | fileName | ) |
Sets the file path shown in the main window title bar.
| fileName | New file path string. |
|
overrideprotectedvirtual |
Attempts to close the current capture file, prompting the user to save if there are unsaved changes.
| before_what | Human-readable description of the action requiring the close. |
| context | Context hint that affects the save prompt behaviour. |
true if the file was closed or had no unsaved changes; false if cancelled. Implements MainWindow.