LibrePCB Developers Documentation
Loading...
Searching...
No Matches
FileDialog Class Referencefinal

Wrapper around QFileDialog to slightly change its behaviour. More...

#include <filedialog.h>

+ Collaboration diagram for FileDialog:

Public Member Functions

 FileDialog ()=delete
 
 FileDialog (const FileDialog &other)=delete
 
 ~FileDialog ()=delete
 

Static Public Member Functions

static QString getOpenFileName (QWidget *parent=nullptr, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=nullptr, QFileDialog::Options options=QFileDialog::Options())
 
static QStringList getOpenFileNames (QWidget *parent=nullptr, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=nullptr, QFileDialog::Options options=QFileDialog::Options())
 
static QString getSaveFileName (QWidget *parent=nullptr, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=nullptr, QFileDialog::Options options=QFileDialog::Options())
 
static QString getExistingDirectory (QWidget *parent=nullptr, const QString &caption=QString(), const QString &dir=QString(), QFileDialog::Options options=QFileDialog::ShowDirsOnly)
 

Static Private Member Functions

static void patchOptions (QFileDialog::Options &options) noexcept
 

Detailed Description

Wrapper around QFileDialog to slightly change its behaviour.

Using these methods ensures that no native file dialogs are used if the environment variable LIBREPCB_DISABLE_NATIVE_DIALOGS is set to "1". This is needed for automatic functional testing, as native dialogs are hard to test.

Constructor & Destructor Documentation

◆ FileDialog() [1/2]

FileDialog ( )
delete

◆ FileDialog() [2/2]

FileDialog ( const FileDialog other)
delete

◆ ~FileDialog()

~FileDialog ( )
delete

Member Function Documentation

◆ getOpenFileName()

QString getOpenFileName ( QWidget *  parent = nullptr,
const QString &  caption = QString(),
const QString &  dir = QString(),
const QString &  filter = QString(),
QString *  selectedFilter = nullptr,
QFileDialog::Options  options = QFileDialog::Options() 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOpenFileNames()

QStringList getOpenFileNames ( QWidget *  parent = nullptr,
const QString &  caption = QString(),
const QString &  dir = QString(),
const QString &  filter = QString(),
QString *  selectedFilter = nullptr,
QFileDialog::Options  options = QFileDialog::Options() 
)
static
+ Here is the call graph for this function:

◆ getSaveFileName()

QString getSaveFileName ( QWidget *  parent = nullptr,
const QString &  caption = QString(),
const QString &  dir = QString(),
const QString &  filter = QString(),
QString *  selectedFilter = nullptr,
QFileDialog::Options  options = QFileDialog::Options() 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getExistingDirectory()

QString getExistingDirectory ( QWidget *  parent = nullptr,
const QString &  caption = QString(),
const QString &  dir = QString(),
QFileDialog::Options  options = QFileDialog::ShowDirsOnly 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ patchOptions()

void patchOptions ( QFileDialog::Options &  options)
staticprivatenoexcept
+ Here is the caller graph for this function:

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