Mapper  0.9.0
API documentation
Functions
OpenOrienteering::FileDialog Namespace Reference

A collection of file dialog utility functions. More...

Functions

bool needUpperCaseExtensions ()
 Returns true if upper case extensions have to be added explicitly to filters in file dialogs. More...
 
void adjustParameters (QString &filter, QFileDialog::Options &options)
 Adjusts filter and options for file dialogs. More...
 
QString getOpenFileName (QWidget *parent=nullptr, const QString &caption={}, const QString &dir={}, QString filter={}, QString *selected_filter=nullptr, QFileDialog::Options options={})
 Calls QFileDialog::getOpenFileName with adjusted parameters. More...
 
QString getSaveFileName (QWidget *parent=nullptr, const QString &caption={}, const QString &dir={}, QString filter={}, QString *selected_filter=nullptr, QFileDialog::Options options={})
 Calls QFileDialog::getSaveFileName with adjusted parameters. More...
 

Detailed Description

A collection of file dialog utility functions.

Function Documentation

◆ adjustParameters()

void OpenOrienteering::FileDialog::adjustParameters ( QString filter,
QFileDialog::Options options 
)

Adjusts filter and options for file dialogs.

Adds upper case version of the extension when needed. Sets QFileDialog::HideNameFilterDetails when the length of any particular filter exceeds a certain threshold.

◆ getOpenFileName()

QString OpenOrienteering::FileDialog::getOpenFileName ( QWidget parent = nullptr,
const QString caption = {},
const QString dir = {},
QString  filter = {},
QString selected_filter = nullptr,
QFileDialog::Options  options = {} 
)
inline

◆ getSaveFileName()

QString OpenOrienteering::FileDialog::getSaveFileName ( QWidget parent = nullptr,
const QString caption = {},
const QString dir = {},
QString  filter = {},
QString selected_filter = nullptr,
QFileDialog::Options  options = {} 
)
inline

◆ needUpperCaseExtensions()

bool OpenOrienteering::FileDialog::needUpperCaseExtensions ( )

Returns true if upper case extensions have to be added explicitly to filters in file dialogs.