| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Slots | Signals | Public Member Functions | Protected Types | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
MainWindow Class Referenceabstract
Inheritance diagram for MainWindow:

## Public Slots
void | setDisplayFilter (QString filter, FilterAction::Action action, FilterAction::ActionType filterType)
virtual void | filterPackets (QString, bool)=0
virtual void | showPreferencesDialog (QString module_name)=0
virtual void | showIOGraphDialog (io_graph_item_unit_t, QString)=0
virtual void | showPlotDialog (const QString &, bool)=0
void | layoutPanes ()
void | applyRecentPaneGeometry ()
void | updateForUnsavedChanges ()
void | cyclePane (bool reverse=false)

## Signals
void | setCaptureFile (capture_file *cf)
void | captureActive (int)
void | fieldSelected (FieldInformation *)
void | fieldHighlight (FieldInformation *)
void | framesSelected (QList< int >)
void | filterAction (QString filter, FilterAction::Action action, FilterAction::ActionType type)
void | displayFilterSuccess (bool success)

## Public Member Functions
| MainWindow (QWidget *parent=nullptr)
void | setMainWindowTitle (QString title=QString())
bool | hasSelection ()
bool | hasUniqueSelection ()
QList< int > | selectedRows (bool useFrameNum=false)
void | insertColumn (QString name, QString abbrev, int pos=-1)
void | gotoFrame (int packet_num)
frame_data * | frameDataForRow (int) const
QString | getFilter ()
MainStatusBar * | statusBar ()
void | appendPacketMenu (FunnelAction *funnel_action)
QList< QAction * > | getPacketMenuActions ()
void | clearAddedPacketMenus ()
bool | addPacketMenus (QMenu *ctx_menu, GPtrArray *finfo_array)

## Protected Types
enum | CopySelected { CopyAllVisibleItems , CopyAllVisibleSelectedTreeItems , CopySelectedDescription , CopySelectedFieldName , CopySelectedValue , CopyListAsText , CopyListAsCSV , CopyListAsYAML , CopyListAsHTML }
enum | FileCloseContext { Default , Quit , Restart , Reload , Update , Export }

## Protected Slots
void | addDisplayFilterTranslationActions (QMenu *copy_menu)
void | updateDisplayFilterTranslationActions (const QString &df_text)
void | updateTitlebar ()

## Protected Member Functions
void | showWelcome ()
void | showCapture ()
void | setTitlebarForCaptureInProgress ()
void | setIconForCaptureInProgress (bool capture_in_progress)
virtual void | setMenusForCaptureFile (bool force_disable=false)=0
QWidget * | getLayoutWidget (layout_pane_content_e type)
void | populateRecentCapturesMenu ()
void | retranslateUiElements ()
| Handle retranslation of UI elements in MainWindow.
virtual void | openRecentCaptureFile (const QString &filename)=0
virtual bool | tryClosingCaptureFile (QString before_what, FileCloseContext context=Default)=0

## Protected Attributes
CaptureFile | capture_file_
QList< register_stat_group_t > | menu_groups_
QStackedWidget * | main_stack_
WelcomePage * | welcome_page_
QSplitter | master_split_
QSplitter | extra_split_
QWidget | empty_pane_
QVector< unsigned > | cur_layout_
PacketList * | packet_list_
ProtoTree * | proto_tree_
DataSourceTab * | data_source_tab_
PacketDiagram * | packet_diagram_
DisplayFilterCombo * | df_combo_box_
MainStatusBar * | main_status_bar_
ProfileSwitcher * | profile_switcher_
bool | use_capturing_title_
QMap< QString, QTextCodec * > | text_codec_map_
QMenu * | recent_captures_menu_
QAction * | no_recent_files_action_

## Member Function Documentation

## ◆ openRecentCaptureFile()

virtual void MainWindow::openRecentCaptureFile | ( | const QString & | filename | ) |
| protected pure virtual

Open a capture file from the recent files menu.

Parameters

  filename | Path to the file to open.

Implemented in WiresharkMainWindow, and StratosharkMainWindow.

## ◆ populateRecentCapturesMenu()

void MainWindow::populateRecentCapturesMenu | ( |  | ) |
| protected

Populate the recent captures menu. Calls openRecentCaptureFile() for each menu item action.

Populate the recent captures menu with files from WorkspaceState. Calls openRecentCaptureFile() (pure virtual) when user selects a file.

## ◆ retranslateUiElements()

void MainWindow::retranslateUiElements | ( |  | ) |
| protected

Handle retranslation of UI elements in MainWindow.

This function is called when the application language changes and usually handles elements like menu items and labels that need to be updated to reflect the new language.

The documentation for this class was generated from the following files:

- /builds/wireshark/wireshark/ui/qt/main_window.h
- /builds/wireshark/wireshark/ui/qt/main_window.cpp
- /builds/wireshark/wireshark/ui/qt/main_window_layout.cpp