OpendTect-6_4  6.4
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...
 
const char * fileName () const
 
void getFileNames (BufferStringSet &) const
 
void setMode (Mode m)
 
Mode mode () const
 
void setSelectedFilter (const char *fltr)
 
const char * selectedFilter () const
 
void setDirectory (const char *dir)
 
void setAllowAllExts (bool yn)
 default true for read, false for write More...
 
void setConfirmOverwrite (bool yn)
 
void setDefaultExtension (const char *)
 
const char * getDefaultExtension () const
 
int go ()
 
int processExternalFilenames (const char *dir=0, const char *filters=0)
 

Static Public Member Functions

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

Static Public Attributes

static const char * filesep_
 

Protected Attributes

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

Static Protected Attributes

static FileMultiStringexternalfilenames_
 
static BufferString extfilenameserrmsg_
 

Private Member Functions

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

Detailed Description

Dialog to get a file or directory name from user.

Member Enumeration Documentation

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.

Enumerator
Gen 
Img 
Txt 
Html 

Constructor & Destructor Documentation

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

Always AnyFile.

Member Function Documentation

int uiFileDialog::beginCmdRecEvent ( const char *  wintitle)
private
void uiFileDialog::endCmdRecEvent ( int  refnr,
bool  ok 
)
private
const char* uiFileDialog::fileName ( ) const
inline
const char* uiFileDialog::getDefaultExtension ( ) const
static const char* uiFileDialog::getExternalFilenamesErrMsg ( )
static
void uiFileDialog::getFileNames ( BufferStringSet ) const
int uiFileDialog::go ( )
static void uiFileDialog::list2String ( const BufferStringSet ,
BufferString  
)
static
Mode uiFileDialog::mode ( ) const
inline
uiFileDialog::mODTextTranslationClass ( uiFileDialog  )
private
int uiFileDialog::processExternalFilenames ( const char *  dir = 0,
const char *  filters = 0 
)
const char* uiFileDialog::selectedFilter ( ) const
inline
void uiFileDialog::setAllowAllExts ( bool  yn)
inline

default true for read, false for write

void uiFileDialog::setConfirmOverwrite ( bool  yn)
inline
void uiFileDialog::setDefaultCaption ( )
private
void uiFileDialog::setDefaultExtension ( const char *  )
void uiFileDialog::setDirectory ( const char *  dir)
inline
static void uiFileDialog::setExternalFilenames ( const FileMultiString )
static
void uiFileDialog::setMode ( Mode  m)
inline
void uiFileDialog::setSelectedFilter ( const char *  fltr)
inline
static void uiFileDialog::string2List ( const BufferString ,
BufferStringSet  
)
static

Member Data Documentation

bool uiFileDialog::addallexts_
protected
uiString uiFileDialog::caption_
protected
bool uiFileDialog::confirmoverwrite_
protected
BufferString uiFileDialog::currentdir_
protected
BufferString uiFileDialog::defaultextension_
protected
FileMultiString* uiFileDialog::externalfilenames_
staticprotected
BufferString uiFileDialog::extfilenameserrmsg_
staticprotected
BufferStringSet uiFileDialog::filenames_
protected
const char* uiFileDialog::filesep_
static
BufferString uiFileDialog::filter_
protected
BufferString uiFileDialog::fn
protected
BufferString uiFileDialog::fname_
protected
bool uiFileDialog::forread_
protected
Mode uiFileDialog::mode_
protected
uiParent* uiFileDialog::parnt_
protected
BufferString uiFileDialog::selectedfilter_
protected

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