Base Framework
Public Types | Public Member Functions | List of all members
SaveFileDialog Class Reference

Save file dialog. More...

#include <base/ui/SaveFileDialog.h>

Inherits Dialog.

Public Types

enum  Flag { ASK_TO_CREATE = 1, ASK_TO_OVERWRITE = 2 }
 

Public Member Functions

 SaveFileDialog () noexcept
 
unsigned int getFlags () const noexcept
 
void setFlags (unsigned int flags) noexcept
 
const StringgetTitle () const noexcept
 
void setTitle (const String &title) noexcept
 
const StringgetFilename () const noexcept
 
void setFilename (const String &filename) noexcept
 
const StringgetFolder () const noexcept
 
void setFolder (const String &folder) noexcept
 
const Map< String, String > & getFilters () const noexcept
 
void setFilter (const String &description, const String &filter) noexcept
 
void setFilters (const Map< String, String > &filters) noexcept
 
bool execute ()
 
- Public Member Functions inherited from Dialog
virtual ~Dialog () noexcept
 

Detailed Description

Save file dialog.

Save file dialog.

Version
1.0

Member Enumeration Documentation

◆ Flag

Enumerator
ASK_TO_CREATE 

Ask to create the file if it doesn't exist.

ASK_TO_OVERWRITE 

Ask to overwrite the file if the does exist.

Constructor & Destructor Documentation

◆ SaveFileDialog()

SaveFileDialog::SaveFileDialog ( )
noexcept

Initializes the save file dialog window.

Member Function Documentation

◆ execute()

bool SaveFileDialog::execute ( )
virtual

Executes the dialog.

Implements Dialog.

◆ getFilename()

const String& SaveFileDialog::getFilename ( ) const
inlinenoexcept

Returns the file name.

◆ getFilters()

const Map<String, String>& SaveFileDialog::getFilters ( ) const
inlinenoexcept

Returns the filters.

◆ getFlags()

unsigned int SaveFileDialog::getFlags ( ) const
inlinenoexcept

Returns the flags.

◆ getFolder()

const String& SaveFileDialog::getFolder ( ) const
inlinenoexcept

Returns the initial folder.

◆ getTitle()

const String& SaveFileDialog::getTitle ( ) const
inlinenoexcept

Returns the title of the dialog window.

◆ setFilename()

void SaveFileDialog::setFilename ( const String filename)
inlinenoexcept

Sets the current file name.

◆ setFilter()

void SaveFileDialog::setFilter ( const String description,
const String filter 
)
noexcept

Sets the filter.

Parameters
descriptionThe filter description.
filterThe filter.

◆ setFilters()

void SaveFileDialog::setFilters ( const Map< String, String > &  filters)
noexcept

Sets the filters.

◆ setFlags()

void SaveFileDialog::setFlags ( unsigned int  flags)
inlinenoexcept

Sets the flags.

◆ setFolder()

void SaveFileDialog::setFolder ( const String folder)
inlinenoexcept

Sets the initial folder.

◆ setTitle()

void SaveFileDialog::setTitle ( const String title)
inlinenoexcept

Sets the title of the dialog window.