Qt Utilities  5.8.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
Widgets::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 Widgets::PathSelection:
[legend]
Collaboration diagram for Widgets::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)
 

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()

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

Constructs a path selection widget.

Definition at line 37 of file pathselection.cpp.

Member Function Documentation

◆ eventFilter()

bool Widgets::PathSelection::eventFilter ( QObject *  obj,
QEvent *  event 
)
protected

Definition at line 68 of file pathselection.cpp.

◆ lineEdit() [1/2]

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

Returns the line edit with the selected path.

Definition at line 42 of file pathselection.h.

◆ lineEdit() [2/2]

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

Returns the line edit with the selected path.

Definition at line 50 of file pathselection.h.

◆ provideCustomFileDialog()

void Widgets::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 71 of file pathselection.h.

◆ provideCustomFileMode()

void Widgets::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 60 of file pathselection.h.


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