Back to index

salome-gui  6.5.0
SUIT_FileDlg Class Reference

An extension of the Qt Open/Save file dialog box. More...

Inheritance diagram for SUIT_FileDlg:
Inheritance graph

Detailed Description

An extension of the Qt Open/Save file dialog box.

The class SUIT_FileDlg provides a set of static methods which canbe used for file or directories selection:


  // select file to dump contents of the view
  QStringList filters;
  filters << "Image files (*.bmp *.gif *.jpg )" << "All files (*)";
  QString fileName = SUIT_FileDlg::getFileName( desktop(), 
                                                "Dump view",
                                                false );
  if ( !fileName.isEmpty() ) {
    ... writing image to the file 

  // select list of files to open in the editor windows
  QStringList filters;
  filters << "*.cpp | *.cxx | *.c++" << "*.h | *.hpp | *.hxx";
  QStringList fileNames = SUIT_FileDlg::getOpenFileName( desktop(),
                                                         QString() );
  if ( !fileNames.isEmpty() ) {
    ... open files

The class SUIT_FileDlg can be subclassed to implement custom file dialog boxes. The class provides a set of methods which can be used in subclasses:

See also:
SUIT_FileValidator class.

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