Wireshark 4.7.3
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
ExtcapArgumentFileSelection Class Reference

Represents an extcap argument that provides a file selection UI. More...

#include <extcap_argument_file.h>

Inheritance diagram for ExtcapArgumentFileSelection:
ExtcapArgument

Public Member Functions

 ExtcapArgumentFileSelection (extcap_arg *argument, QObject *parent=Q_NULLPTR)
 Constructs an ExtcapArgumentFileSelection.
virtual ~ExtcapArgumentFileSelection ()
 Destroys the ExtcapArgumentFileSelection.
virtual QWidget * createEditor (QWidget *parent) override
 Creates the file selection editor widget.
virtual QString value () override
 Retrieves the selected file path.
virtual bool isValid () override
 Checks if the current file selection is valid.
virtual void setDefaultValue () override
 Sets the file selection to its default value.
Public Member Functions inherited from ExtcapArgument
 ExtcapArgument (QObject *parent=Q_NULLPTR)
 Constructs an empty ExtcapArgument.
 ExtcapArgument (extcap_arg *argument, QObject *parent=Q_NULLPTR)
 Constructs an ExtcapArgument from a core extcap_arg structure.
 ExtcapArgument (const ExtcapArgument &obj)
 Copy constructor for ExtcapArgument.
virtual ~ExtcapArgument ()
 Destroys the ExtcapArgument.
virtual QWidget * createLabel (QWidget *parent=0)
 Creates a label widget for this argument.
virtual extcap_argargument ()
 Retrieves the underlying extcap_arg structure.
virtual QString call ()
 Retrieves the call string for this argument.
virtual QString defaultValue ()
 Retrieves the default value of the argument.
bool isDefault ()
 Checks if the argument currently holds its default value.
bool isRequired ()
 Checks if the argument is required.
bool isSufficient ()
 Checks if the argument provides sufficient information on its own.
bool reload ()
 Reloads the argument data.
QString prefKey (const QString &device_name, const QString &option_name, const QString &option_value)
 Generates a preference key for this argument.
virtual QString prefValue ()
 Retrieves the preference value for this argument.
void resetValue ()
 Resets the argument to its initial value.
virtual QString group () const
 Retrieves the group name this argument belongs to.
virtual int argNr () const
 Retrieves the argument number.
virtual bool isSetDefaultValueSupported ()
 Checks if setting a default value is supported by this argument type.

Protected Attributes

QLineEdit * textBox
Protected Attributes inherited from ExtcapArgument
ExtcapValueList values
extcap_arg_argument
QLabel * _label
int _number

Additional Inherited Members

Public Slots inherited from ExtcapArgument
void onBoolChanged (bool val)
 Slot to handle boolean value changes.
void onIntChanged (int val)
 Slot to handle integer value changes.
void onStringChanged (QString val)
 Slot to handle string value changes.
Signals inherited from ExtcapArgument
void valueChanged ()
 Signal emitted when the argument's value changes.
Static Public Member Functions inherited from ExtcapArgument
static ExtcapArgumentcreate (extcap_arg *argument=Q_NULLPTR, QObject *parent=Q_NULLPTR)
 Factory method to create an appropriate ExtcapArgument subclass.
Protected Member Functions inherited from ExtcapArgument
bool fileExists ()
 Checks if a file path specified by the argument exists.
ExtcapValueList loadValues (QString parent)
 Loads the available values for this argument.
bool reloadValues ()
 Reloads the values list.

Detailed Description

Represents an extcap argument that provides a file selection UI.

Constructor & Destructor Documentation

◆ ExtcapArgumentFileSelection()

ExtcapArgumentFileSelection::ExtcapArgumentFileSelection ( extcap_arg * argument,
QObject * parent = Q_NULLPTR )

Constructs an ExtcapArgumentFileSelection.

Parameters
argumentPointer to the core extcap_arg structure.
parentThe parent QObject, defaults to Q_NULLPTR.

Member Function Documentation

◆ createEditor()

QWidget * ExtcapArgumentFileSelection::createEditor ( QWidget * parent)
overridevirtual

Creates the file selection editor widget.

Parameters
parentThe parent widget for the editor.
Returns
A pointer to the created file selection widget.

Reimplemented from ExtcapArgument.

◆ isValid()

bool ExtcapArgumentFileSelection::isValid ( )
overridevirtual

Checks if the current file selection is valid.

Returns
True if valid, false otherwise.

Reimplemented from ExtcapArgument.

◆ setDefaultValue()

void ExtcapArgumentFileSelection::setDefaultValue ( )
overridevirtual

Sets the file selection to its default value.

Reimplemented from ExtcapArgument.

◆ value()

QString ExtcapArgumentFileSelection::value ( )
overridevirtual

Retrieves the selected file path.

Returns
The selected file path string.

Reimplemented from ExtcapArgument.

Member Data Documentation

◆ textBox

QLineEdit* ExtcapArgumentFileSelection::textBox
protected

The line edit widget displaying the selected file path.


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