Gem Illuminator
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
Signals | Public Member Functions | Protected Attributes | List of all members
FileIO Class Reference

The FileIO class provides platform independent file reading for resource files used. The file that should be read is specified by name and FileIO will load it from platform dependent location. More...

#include <fileio.h>

Inheritance diagram for FileIO:
Config Highscore

Signals

void error (const QString &msg)
 This signal will be emitted if an error occurs. More...
 
void sourceChanged (const QString &source)
 This signal is emitted if the source() is changed. More...
 

Public Member Functions

 FileIO (QObject *parent=0)
 Creates a new FileIO. More...
 
 ~FileIO ()
 
Q_INVOKABLE QString read ()
 Reads previous specified file. More...
 
void setSource (const QString &source)
 Sets the source file by name. The source is read calling read() More...
 
QString source ()
 The name of file that is read by read(). More...
 
Q_INVOKABLE bool write (const QString &data)
 Writes specified data into source() More...
 

Protected Attributes

QString m_source
 

Detailed Description

The FileIO class provides platform independent file reading for resource files used. The file that should be read is specified by name and FileIO will load it from platform dependent location.

Constructor & Destructor Documentation

FileIO::FileIO ( QObject *  parent = 0)
explicit

Creates a new FileIO.

Parameters
parentQObject-parent
FileIO::~FileIO ( )

Member Function Documentation

void FileIO::error ( const QString &  msg)
signal

This signal will be emitted if an error occurs.

Parameters
msgThe error message describing the error
QString FileIO::read ( )

Reads previous specified file.

Returns
Read file as QString.
void FileIO::setSource ( const QString &  source)

Sets the source file by name. The source is read calling read()

Parameters
sourceThe name of file that should be read.
QString FileIO::source ( )

The name of file that is read by read().

Returns
void FileIO::sourceChanged ( const QString &  source)
signal

This signal is emitted if the source() is changed.

Parameters
sourceThe new source
bool FileIO::write ( const QString &  data)

Writes specified data into source()

Parameters
dataThe data that will be written into source()

Member Data Documentation

QString FileIO::m_source
protected

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