Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

FileIO Class Reference

This class is responsible for all file input and output. More...

#include <FileIO.h>

Inheritance diagram for FileIO::

List of all members.

Signals

void sbMessage (QString)
 Sets a statusbar message.

void setWaitCursor ()
 Sets the hourglass cursor.

void setPreviousCursor ()
 Resets the cursor to the previous one.


Public Methods

 FileIO (QWidget *)
 Constructor. More...

 ~FileIO ()
 Destructor.

ProjectopenFile (QString mrufile=QString::null)
 Opens a 'fsm'-file. More...

ProjectopenFileXML (QString mrufile=QString::null)
 Opens a 'fsm'-file. More...

bool saveFile (Project *)
 Saves project as 'fsm'-file. More...

bool saveFileAs (Project *)
 Save project as 'fsm'-file with a new name. More...

bool exportFile (Project *,Export *)
 Exports the actual file. More...

int saveOptions (Options *)
 Saves the application options. More...

int loadOptions (Options *)
 Loads the application options. More...

bool loadMRU (QStringList &)
 Loads the list of most recently used files.

bool saveMRU (QStringList)
 Saves the list of most recently used files.

void setActFilePath (QString file)
 Sets actual file name.

QString getActFilePath ()
 Gets actual file name.

QString getActFileName ()
 Returns the current file name.

QString getActExportFileName ()
 Returns the current export file name.

QString getEmptyFieldString ()
 Returns the string that represents an empty field (null value) in the options file.


Private Methods

bool doSave (Project *)
 Performs the actual saving of project p.

bool doSaveXML (Project *)
 Performs the actual saving of project p in XML format.

void setOptions (QMap< QString, QString > *map, Options *opt)
 Sets the loaded application options. More...


Private Attributes

MainWindowmain
 Pointer to the main window.

QDir act_dir
 Current directory.

QString act_file
 Current file name.

QString act_exportfile
 Current export file name.

QFileDialog * filedlg
 File dialog.

QFileDialog * exportdlg
 File dialog (export).


Detailed Description

This class is responsible for all file input and output.

It can load and save 'fsm'-files and the application options and stores the file name of the actual file..


Constructor & Destructor Documentation

FileIO::FileIO QWidget * parent
 

Constructor.

Initialises the FileIO object with the parent parent.


Member Function Documentation

bool FileIO::exportFile Project * p,
Export * exp
 

Exports the actual file.

Opens a file dialog and exports the actual machine into the specified format.

int FileIO::loadOptions Options * opt
 

Loads the application options.

Loads the options from $HOME/.qfsm/qfsmrc into opt.

Project * FileIO::openFile QString mrufile = QString::null
 

Opens a 'fsm'-file.

Asks for a file name and opens the specified 'fsm'-file.

Project * FileIO::openFileXML QString mrufile = QString::null
 

Opens a 'fsm'-file.

Opens the '.fsm' file mrufile. If mrufile is null a file dialog is opened first.

bool FileIO::saveFile Project * p
 

Saves project as 'fsm'-file.

If no file name is given, it first asks for the file name.

bool FileIO::saveFileAs Project * p
 

Save project as 'fsm'-file with a new name.

Asks for a file name and saves the project p as a 'fsm'-file.

int FileIO::saveOptions Options * opt
 

Saves the application options.

Saves options opt in the qfsmrc-file which is in $HOME/.qfsm/.

void FileIO::setOptions QMap< QString, QString > * map,
Options * opt
[private]
 

Sets the loaded application options.

Parameters:
map   pairs of strings which contain the options
opt   options object where the options will be saved


The documentation for this class was generated from the following files:
Generated at Fri Apr 11 22:37:15 2003 for Qfsm by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001