Wireshark 5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
GeometryStateDialog Class Reference

A dialog that remembers its geometry and splitter state. More...

#include <geometry_state_dialog.h>

Inheritance diagram for GeometryStateDialog:
CaptureInfoDialog ColoringRulesDialog CompiledFilterOutput ConversationHashTablesDialog DecodeAsDialog DisplayFilterExpressionDialog DissectorTablesDialog EnabledProtocolsDialog FileSetDialog FilterDialog FunnelTextDialog IOConsoleDialog KeyboardShortcutsDialog LuaDebuggerDialog ManageInterfacesDialog PacketCommentDialog PreferencesDialog ProfileDialog ResolvedAddressesDialog SupportedProtocolsDialog TCPStreamDialog TaggingRulesDialog ThemeDebugDialog ThemeDesignerDialog UatDialog WiresharkDialog

Public Member Functions

 GeometryStateDialog (QWidget *parent, Qt::WindowFlags f=Qt::Window)
 Constructs a new GeometryStateDialog with the specified parent and window flags.
 ~GeometryStateDialog ()
 Save the geometry and splitter state and then destroy the GeometryStateDialog.
void setWindowModality (Qt::WindowModality windowModality)
 Sets the window modality for the dialog. On non-macOS platforms, this also sets the parent to ensure modal dialogs are always on top of their parent.

Protected Member Functions

bool loadGeometry (int width=0, int height=0, const QString &dialog_name=QString())
 Loads the geometry and splitter state for the dialog.
void loadSplitterState (QSplitter *splitter=nullptr)
 Loads the state of a splitter for the dialog.

Detailed Description

A dialog that remembers its geometry and splitter state.

Constructor & Destructor Documentation

◆ GeometryStateDialog()

GeometryStateDialog::GeometryStateDialog ( QWidget * parent,
Qt::WindowFlags f = Qt::Window )
inlineexplicit

Constructs a new GeometryStateDialog with the specified parent and window flags.

Parameters
parentThe parent widget for the dialog.
fThe window flags for the dialog, defaulting to Qt::Window. On macOS, the parent is set to ensure the dialog behaves as an independent window that un-maximizes correctly. On other platforms, the parent is set to NULL to allow for independent window behavior. The Qt::Window flag is used to provide minimize and maximize buttons, as this dialog is intended to remember user-set geometry.

Member Function Documentation

◆ loadGeometry()

bool GeometryStateDialog::loadGeometry ( int width = 0,
int height = 0,
const QString & dialog_name = QString() )
protected

Loads the geometry and splitter state for the dialog.

Parameters
widthThe initial width for the dialog.
heightThe initial height for the dialog.
dialog_nameThe name of the dialog for saving/loading geometry.
Returns
true if a saved geometry was applied, false if the dialog kept its size or got the default width and height.

◆ loadSplitterState()

void GeometryStateDialog::loadSplitterState ( QSplitter * splitter = nullptr)
protected

Loads the state of a splitter for the dialog.

Parameters
splitterThe splitter for which to load the state.

◆ setWindowModality()

void GeometryStateDialog::setWindowModality ( Qt::WindowModality windowModality)

Sets the window modality for the dialog. On non-macOS platforms, this also sets the parent to ensure modal dialogs are always on top of their parent.

Parameters
windowModalityThe desired window modality (e.g., Qt::ApplicationModal, Qt::WindowModal, Qt::NonModal).

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