Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Public Types | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
EditorFileDialog Class Reference

A QLineEdit combined with a file dialog button, designed for use as a table cell editor. More...

#include <editor_file_dialog.h>

Inheritance diagram for EditorFileDialog:

Public Types

enum  FileMode { ExistingFile , Directory }
 Determines whether the dialog selects files or directories. More...
 

Signals

void acceptEdit (const QModelIndex &index)
 Signal emitted to accept the edit and update the model.
 

Public Member Functions

 EditorFileDialog (const QModelIndex &index, enum FileMode mode, QWidget *parent=0, const QString &caption=QString(), const QString &directory=QString(), const QString &filter=QString())
 Constructs a new EditorFileDialog.
 
void setOption (QFileDialog::Option option, bool on=true)
 Sets or unsets a QFileDialog option.
 
virtual void focusInEvent (QFocusEvent *event)
 Handles focus in events.
 
virtual void focusOutEvent (QFocusEvent *event)
 Handles focus out events.
 
virtual bool eventFilter (QObject *obj, QEvent *event)
 Event filter to monitor specific events on the widget or its children.
 

Protected Member Functions

void resizeEvent (QResizeEvent *)
 Handles resize events to adjust the layout of the line edit and button.
 

Protected Attributes

QPushButton * file_dialog_button_
 
const QModelIndex index_
 
enum FileMode mode_
 
QString caption_
 
QString directory_
 
QString filter_
 
QFileDialog::Options options_
 

Detailed Description

A QLineEdit combined with a file dialog button, designed for use as a table cell editor.

Member Enumeration Documentation

◆ FileMode

Determines whether the dialog selects files or directories.

Enumerator
ExistingFile 

Mode for selecting an existing file.

Directory 

Mode for selecting a directory.

Constructor & Destructor Documentation

◆ EditorFileDialog()

EditorFileDialog::EditorFileDialog ( const QModelIndex &  index,
enum FileMode  mode,
QWidget *  parent = 0,
const QString &  caption = QString(),
const QString &  directory = QString(),
const QString &  filter = QString() 
)
explicit

Constructs a new EditorFileDialog.

Parameters
indexThe model index of the table cell being edited.
modeThe selection mode (file or directory).
parentThe parent widget, defaults to 0.
captionThe title of the file dialog, defaults to empty.
directoryThe initial directory to open, defaults to empty.
filterThe file filter string, defaults to empty.

Member Function Documentation

◆ acceptEdit

void EditorFileDialog::acceptEdit ( const QModelIndex &  index)
signal

Signal emitted to accept the edit and update the model.

Parameters
indexThe model index of the cell that was edited.

◆ eventFilter()

bool EditorFileDialog::eventFilter ( QObject *  obj,
QEvent *  event 
)
virtual

Event filter to monitor specific events on the widget or its children.

Parameters
objThe object receiving the event.
eventThe event being filtered.
Returns
True if the event was filtered out, false otherwise.

◆ focusInEvent()

void EditorFileDialog::focusInEvent ( QFocusEvent *  event)
virtual

Handles focus in events.

Parameters
eventThe focus event.

◆ focusOutEvent()

void EditorFileDialog::focusOutEvent ( QFocusEvent *  event)
virtual

Handles focus out events.

Parameters
eventThe focus event.

◆ setOption()

void EditorFileDialog::setOption ( QFileDialog::Option  option,
bool  on = true 
)

Sets or unsets a QFileDialog option.

Parameters
optionThe option to configure.
onTrue to enable the option, false to disable (defaults to true).

Member Data Documentation

◆ caption_

QString EditorFileDialog::caption_
protected

The title caption of the file dialog.

◆ directory_

QString EditorFileDialog::directory_
protected

The initial directory for the file dialog.

◆ file_dialog_button_

QPushButton* EditorFileDialog::file_dialog_button_
protected

Pointer to the button that triggers the file dialog.

◆ filter_

QString EditorFileDialog::filter_
protected

The file filter string for the file dialog.

◆ index_

const QModelIndex EditorFileDialog::index_
protected

The saved model index of the table cell being edited.

◆ mode_

enum FileMode EditorFileDialog::mode_
protected

The configured file selection mode.

◆ options_

QFileDialog::Options EditorFileDialog::options_
protected

The configured options for the file dialog.


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