class ScQtFileEditDlg

This Class provides a FileDialogView
It is a subclass of ScQtFileDialog. More...

Definition#include <scqtfiledialog.h>
InheritsQDir (unknown) [private], ScQtFileDlg (unknown) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

This Class provides a FileDialogView
It is a subclass of ScQtFileDialog.

ScQtFileDialog creates and destroys the instances. Dont use it directly.

The dialog is separated into three input fields, some buttons and a listview.

The listview shows the actual directory (starting with the ".." dir, followed by all dirs, followed by files.

The type ComboBox (field is writable) contains the filter (e.g. "*.txt"). If a new filter is entered, the old one is stored in the combobox list (max size is 8) and recallable by ComboBox selection.

The path ComboBox (field is writable) contains the path string. If a new path is entered, the old one is stored in the combobox list (max size is 8) and recallable by ComboBox selection.

example call (mkDir):


    fd = new ScQtFileEditDlg( parent, name, path, filter );
    fd->setAutoExtension( true );
    fd->allowMkDir( true );
    fd->setNFilter( false );
    fd->setFSorting( true );
    fd->readIt();
    fd->exec();

    if ( fd->result() == QDialog::Accepted )
      fname = fd->getResult();
    else
      fname = "";

    delete fd;

QString  getResult ( )

getResult

returns the actual selected file/dir name extended with the type extension if AutoExtension is set.

Returns: : the filename (with the path preset)

QString  getFileName ( )

getFileName

returns the actual selected file/dir name extended with the type extension if AutoExtension is set. The path is included.

Returns: : the filename (without the path)

void  readIt ( )

readIt

reads the selected directory using the preset parameters.

void  setAutoExtension ( bool ex=false )

setAutoExtension

set or unsets AutoExtension. If AutoExtension is on and a file type is used, the program checks, whether a matching extension builds the end of the selected filename . If yes, the filename is untouched, if no, the filename is concated by the extension of the type string.

void  allowMkDir ( bool mkdir=false )

allowMkDir

allows or denies mkdir feature. If allowed, the MkDir button is switched on.

void  setDirOnly ( bool donly=false )

setDirOnly

sets the ListView to show dirs only or not

void  setNFilter ( bool ff=false )

setNFilter

set or unsets the name filter.

void  setFSorting ( bool ff=false )

setFSorting

set or unsets the filenames sorting.

void  setMode ( int mode=QDir::All )

setMode

set the QDir mode

 ScQtFileEditDlg ( QWidget *parent=0, const char *name=0, const QString &path="/", const QString &filter="*" )

ScQtFileEditDlg

 ~ScQtFileEditDlg ()

~ScQtFileEditDlg