Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Public Slots | Public Member Functions | Static Public Member Functions | List of all members
CaptureFileDialog Class Reference

A file dialog for opening, saving, and merging capture files with additional options. More...

#include <capture_file_dialog.h>

Inheritance diagram for CaptureFileDialog:
WiresharkFileDialog

Public Slots

void accept () Q_DECL_OVERRIDE
 Accepts the dialog and finalizes the operation.
 
int exec () Q_DECL_OVERRIDE
 Executes the dialog in a modal state.
 
int open (QString &file_name, unsigned int &type, QString &display_filter)
 Opens a file dialog to open a capture file.
 
check_savability_t saveAs (QString &file_name, bool must_support_comments)
 Opens a file dialog to save the capture file.
 
check_savability_t exportSelectedPackets (QString &file_name, packet_range_t *range, QString selRange=QString())
 Opens a file dialog to export specific packets.
 
int merge (QString &file_name, QString &display_filter)
 Opens a file dialog to merge capture files.
 

Public Member Functions

 CaptureFileDialog (QWidget *parent=NULL, capture_file *cf=NULL)
 Constructs a new CaptureFileDialog.
 
int mergeType ()
 Retrieves the selected merge type.
 
int selectedFileType ()
 Retrieves the selected file type.
 
ws_compression_type compressionType ()
 Retrieves the selected compression type.
 
- Public Member Functions inherited from WiresharkFileDialog
 WiresharkFileDialog (QWidget *parent=nullptr, const QString &caption=QString(), const QString &directory=QString(), const QString &filter=QString())
 Constructs a Wireshark file dialog.
 
QString selectedNativePath () const
 Returns the selected file path in native OS format.
 

Static Public Member Functions

static check_savability_t checkSaveAsWithComments (QWidget *parent, capture_file *cf, int file_type)
 Checks whether the capture file can be saved with comments in the specified format.
 
- Static Public Member Functions inherited from WiresharkFileDialog
static QString getExistingDirectory (QWidget *parent=Q_NULLPTR, const QString &caption=QString(), const QString &dir=QString(), Options options=ShowDirsOnly)
 Presents a directory chooser dialog and returns the selected path.
 
static QString getOpenFileName (QWidget *parent=Q_NULLPTR, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=Q_NULLPTR, Options options=Options())
 Presents an open-file dialog and returns the selected file path.
 
static QString getSaveFileName (QWidget *parent=Q_NULLPTR, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=Q_NULLPTR, Options options=Options())
 Presents a save-file dialog and returns the chosen file path.
 

Detailed Description

A file dialog for opening, saving, and merging capture files with additional options.

Constructor & Destructor Documentation

◆ CaptureFileDialog()

CaptureFileDialog::CaptureFileDialog ( QWidget *  parent = NULL,
capture_file cf = NULL 
)
explicit

Constructs a new CaptureFileDialog.

Parameters
parentThe parent widget, defaults to NULL.
cfThe capture file associated with the dialog, defaults to NULL.

Member Function Documentation

◆ checkSaveAsWithComments()

check_savability_t CaptureFileDialog::checkSaveAsWithComments ( QWidget *  parent,
capture_file cf,
int  file_type 
)
static

Checks whether the capture file can be saved with comments in the specified format.

Parameters
parentThe parent widget.
cfThe capture file to check.
file_typeThe file format type.
Returns
The savability status.

◆ compressionType()

ws_compression_type CaptureFileDialog::compressionType ( )

Retrieves the selected compression type.

Returns
The compression type used.

◆ exec

int CaptureFileDialog::exec ( )
slot

Executes the dialog in a modal state.

Returns
The result code of the dialog execution.

◆ exportSelectedPackets

check_savability_t CaptureFileDialog::exportSelectedPackets ( QString &  file_name,
packet_range_t range,
QString  selRange = QString() 
)
slot

Opens a file dialog to export specific packets.

Parameters
file_nameOutput string to store the chosen export file name.
rangeThe packet range to export.
selRangeOptional string representing the selected range.
Returns
The savability status.

◆ merge

int CaptureFileDialog::merge ( QString &  file_name,
QString &  display_filter 
)
slot

Opens a file dialog to merge capture files.

Parameters
file_nameOutput string to store the chosen merge file name.
display_filterOutput string to store the applied display filter.
Returns
The result code of the merge operation.

◆ mergeType()

int CaptureFileDialog::mergeType ( )

Retrieves the selected merge type.

Returns
The merge type identifier.

◆ open

int CaptureFileDialog::open ( QString &  file_name,
unsigned int &  type,
QString &  display_filter 
)
slot

Opens a file dialog to open a capture file.

Parameters
file_nameOutput string to store the selected file name.
typeOutput integer to store the selected file type.
display_filterOutput string to store the applied display filter.
Returns
The result code of the operation.

◆ saveAs

check_savability_t CaptureFileDialog::saveAs ( QString &  file_name,
bool  must_support_comments 
)
slot

Opens a file dialog to save the capture file.

Parameters
file_nameOutput string to store the chosen save file name.
must_support_commentsTrue if the saved format must support comments.
Returns
The savability status.

◆ selectedFileType()

int CaptureFileDialog::selectedFileType ( )

Retrieves the selected file type.

Returns
The file type identifier.

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