OpendTect  6.6
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
uiFileDialog Class Reference

Dialog to get a file or directory name from user. More...

Public Types

enum  Mode {
  AnyFile , ExistingFile , Directory , DirectoryOnly ,
  ExistingFiles
}
 File selection mode. More...
 
enum  Type { Gen , Img , Txt , Html }
 

Public Member Functions

 uiFileDialog (uiParent *, bool forread, const char *fname=0, const char *filter=0, const uiString &caption=uiString::emptyString())
 
 uiFileDialog (uiParent *, Mode mode=AnyFile, const char *fname=0, const char *filter=0, const uiString &caption=uiString::emptyString())
 
 uiFileDialog (uiParent *, Type, const char *fname=0, const uiString &caption=uiString::emptyString())
 Always AnyFile. More...
 
 uiFileDialog (uiParent *p, bool forread, const char *fname, const char *filter, const char *caption)
 
 uiFileDialog (uiParent *p, Mode mode, const char *fname, const char *filter, const char *caption)
 
 uiFileDialog (uiParent *p, Type typ, const char *fname, const char *caption)
 
const char * fileName () const
 
const char * getDefaultExtension () const
 
void getFileNames (BufferStringSet &) const
 
int go ()
 
Mode mode () const
 
int processExternalFilenames (const char *dir=0, const char *filters=0)
 
const char * selectedFilter () const
 
void setAllowAllExts (bool yn)
 default true for read, false for write More...
 
void setConfirmOverwrite (bool yn)
 
void setDefaultExtension (const char *)
 
void setDirectory (const char *dir)
 
void setMode (Mode m)
 
void setSelectedFilter (const char *fltr)
 

Static Public Member Functions

static const char * getExternalFilenamesErrMsg ()
 
static void list2String (const BufferStringSet &, BufferString &)
 
static void setExternalFilenames (const FileMultiString &)
 
static void string2List (const BufferString &, BufferStringSet &)
 

Static Public Attributes

static const char * filesep_
 

Protected Attributes

bool addallexts_
 
uiString caption_
 
bool confirmoverwrite_
 
BufferString currentdir_
 
BufferString defaultextension_
 
BufferStringSet filenames_
 
BufferString filter_
 
BufferString fn
 
BufferString fname_
 
bool forread_
 
Mode mode_
 
uiParentparnt_
 
BufferString selectedfilter_
 

Static Protected Attributes

static FileMultiStringexternalfilenames_
 
static BufferString extfilenameserrmsg_
 

Private Member Functions

int beginCmdRecEvent (const char *wintitle)
 
void endCmdRecEvent (int refnr, bool ok)
 
void setDefaultCaption ()
 

Detailed Description

Dialog to get a file or directory name from user.

<>

Member Enumeration Documentation

◆ Mode

File selection mode.

Enumerator
AnyFile 

The name of a file, whether it exists or not.

ExistingFile 

The name of a single existing file.

Directory 

The name of a directory. Both files and directories displayed.

DirectoryOnly 

The name of a directory. The file dialog will only display directories.

ExistingFiles 

The names of zero or more existing files.

◆ Type

Enumerator
Gen 
Img 
Txt 
Html 

Constructor & Destructor Documentation

◆ uiFileDialog() [1/6]

uiFileDialog::uiFileDialog ( uiParent ,
bool  forread,
const char *  fname = 0,
const char *  filter = 0,
const uiString caption = uiString::emptyString() 
)

◆ uiFileDialog() [2/6]

uiFileDialog::uiFileDialog ( uiParent ,
Mode  mode = AnyFile,
const char *  fname = 0,
const char *  filter = 0,
const uiString caption = uiString::emptyString() 
)

◆ uiFileDialog() [3/6]

uiFileDialog::uiFileDialog ( uiParent ,
Type  ,
const char *  fname = 0,
const uiString caption = uiString::emptyString() 
)

Always AnyFile.

◆ uiFileDialog() [4/6]

uiFileDialog::uiFileDialog ( uiParent p,
bool  forread,
const char *  fname,
const char *  filter,
const char *  caption 
)
inline

◆ uiFileDialog() [5/6]

uiFileDialog::uiFileDialog ( uiParent p,
Mode  mode,
const char *  fname,
const char *  filter,
const char *  caption 
)
inline

◆ uiFileDialog() [6/6]

uiFileDialog::uiFileDialog ( uiParent p,
Type  typ,
const char *  fname,
const char *  caption 
)
inline

Member Function Documentation

◆ beginCmdRecEvent()

int uiFileDialog::beginCmdRecEvent ( const char *  wintitle)
private

◆ endCmdRecEvent()

void uiFileDialog::endCmdRecEvent ( int  refnr,
bool  ok 
)
private

◆ fileName()

const char* uiFileDialog::fileName ( ) const
inline

◆ getDefaultExtension()

const char* uiFileDialog::getDefaultExtension ( ) const

◆ getExternalFilenamesErrMsg()

static const char* uiFileDialog::getExternalFilenamesErrMsg ( )
static

◆ getFileNames()

void uiFileDialog::getFileNames ( BufferStringSet ) const

◆ go()

int uiFileDialog::go ( )

◆ list2String()

static void uiFileDialog::list2String ( const BufferStringSet ,
BufferString  
)
static

◆ mode()

Mode uiFileDialog::mode ( ) const
inline

◆ processExternalFilenames()

int uiFileDialog::processExternalFilenames ( const char *  dir = 0,
const char *  filters = 0 
)

◆ selectedFilter()

const char* uiFileDialog::selectedFilter ( ) const
inline

◆ setAllowAllExts()

void uiFileDialog::setAllowAllExts ( bool  yn)
inline

default true for read, false for write

◆ setConfirmOverwrite()

void uiFileDialog::setConfirmOverwrite ( bool  yn)
inline

◆ setDefaultCaption()

void uiFileDialog::setDefaultCaption ( )
private

◆ setDefaultExtension()

void uiFileDialog::setDefaultExtension ( const char *  )

◆ setDirectory()

void uiFileDialog::setDirectory ( const char *  dir)
inline

◆ setExternalFilenames()

static void uiFileDialog::setExternalFilenames ( const FileMultiString )
static

◆ setMode()

void uiFileDialog::setMode ( Mode  m)
inline

◆ setSelectedFilter()

void uiFileDialog::setSelectedFilter ( const char *  fltr)
inline

◆ string2List()

static void uiFileDialog::string2List ( const BufferString ,
BufferStringSet  
)
static

Member Data Documentation

◆ addallexts_

bool uiFileDialog::addallexts_
protected

◆ caption_

uiString uiFileDialog::caption_
protected

◆ confirmoverwrite_

bool uiFileDialog::confirmoverwrite_
protected

◆ currentdir_

BufferString uiFileDialog::currentdir_
protected

◆ defaultextension_

BufferString uiFileDialog::defaultextension_
protected

◆ externalfilenames_

FileMultiString* uiFileDialog::externalfilenames_
staticprotected

◆ extfilenameserrmsg_

BufferString uiFileDialog::extfilenameserrmsg_
staticprotected

◆ filenames_

BufferStringSet uiFileDialog::filenames_
protected

◆ filesep_

const char* uiFileDialog::filesep_
static

◆ filter_

BufferString uiFileDialog::filter_
protected

◆ fn

BufferString uiFileDialog::fn
protected

◆ fname_

BufferString uiFileDialog::fname_
protected

◆ forread_

bool uiFileDialog::forread_
protected

◆ mode_

Mode uiFileDialog::mode_
protected

◆ parnt_

uiParent* uiFileDialog::parnt_
protected

◆ selectedfilter_

BufferString uiFileDialog::selectedfilter_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2022