Qt Utilities  6.4.1
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
Public Member Functions | Protected Member Functions | List of all members
QtUtilities::PathSelection Class Reference

A QLineEdit with a QPushButton next to it which allows to select file/directory via QFileDialog. More...

#include <pathselection.h>

Inheritance diagram for QtUtilities::PathSelection:
[legend]
Collaboration diagram for QtUtilities::PathSelection:
[legend]

Public Member Functions

 PathSelection (QWidget *parent=nullptr)
 Constructs a path selection widget. More...
 
ClearLineEditlineEdit ()
 Returns the line edit with the selected path. More...
 
const ClearLineEditlineEdit () const
 Returns the line edit with the selected path. More...
 
void provideCustomFileMode (QFileDialog::FileMode customFileMode)
 Can be used to provide a custom file mode. More...
 
void provideCustomFileDialog (QFileDialog *customFileDialog)
 Can be used to provide a custom file dialog. More...
 

Protected Member Functions

bool eventFilter (QObject *obj, QEvent *event) override
 

Detailed Description

A QLineEdit with a QPushButton next to it which allows to select file/directory via QFileDialog.

Definition at line 15 of file pathselection.h.

Constructor & Destructor Documentation

◆ PathSelection()

QtUtilities::PathSelection::PathSelection ( QWidget *  parent = nullptr)
explicit

Constructs a path selection widget.

Definition at line 37 of file pathselection.cpp.

Member Function Documentation

◆ eventFilter()

bool QtUtilities::PathSelection::eventFilter ( QObject *  obj,
QEvent *  event 
)
overrideprotected

Definition at line 68 of file pathselection.cpp.

◆ lineEdit() [1/2]

ClearLineEdit * QtUtilities::PathSelection::lineEdit ( )
inline

Returns the line edit with the selected path.

Definition at line 43 of file pathselection.h.

◆ lineEdit() [2/2]

const ClearLineEdit * QtUtilities::PathSelection::lineEdit ( ) const
inline

Returns the line edit with the selected path.

Definition at line 51 of file pathselection.h.

◆ provideCustomFileDialog()

void QtUtilities::PathSelection::provideCustomFileDialog ( QFileDialog *  customFileDialog)
inline

Can be used to provide a custom file dialog.

The default file mode is ignored when a custom file dialog has been specified.

Definition at line 72 of file pathselection.h.

◆ provideCustomFileMode()

void QtUtilities::PathSelection::provideCustomFileMode ( QFileDialog::FileMode  customFileMode)
inline

Can be used to provide a custom file mode.

The default file mode is QFileDialog::Directory.

Definition at line 61 of file pathselection.h.


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