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

ThemeFile Class Reference

This class makes handling theme files easier. More...

#include <theme_file.h>

List of all members.

Public Methods

 ThemeFile (QString const &filename)
bool isValid () const
QRgb readColor ()
QString readString ()
QString readString (QString const &expected)
QString readString (QString const &expected1, QString const &expected2)
QString readString (QString const &expected1, QString const &expected2, QString const &expected3)
int readInt ()
double readDouble ()
int lineNr () const
QString const & filename () const

Private Attributes

QString m_filename
int m_line_nr
QFile m_file
QTextStream m_stream


Detailed Description

This class makes handling theme files easier.

Author:
Ralf Schmelter (ralfs@pc2a.chemie.uni-dortmund.de).
Version:
0.1


Constructor & Destructor Documentation

ThemeFile::ThemeFile (  QString const & filename ) 
 

Creates the object.

The theme data is read from the given file.

Parameters:
filename   The filename of the theme file.


Member Function Documentation

QString const& ThemeFile::filename (  )  const
 

Return the filename of the theme file.

bool ThemeFile::isValid (  )  const
 

Returns true, if the theme file is valid (could be opened).

int ThemeFile::lineNr (  )  const
 

Returns the actual line number.

QRgb ThemeFile::readColor (  ) 
 

Reads a color from a theme file.

double ThemeFile::readDouble (  ) 
 

Reads an double from the theme file.

int ThemeFile::readInt (  ) 
 

Reads an integer from the theme file.

QString ThemeFile::readString (  QString const & expected1,
QString const & expected2,
QString const & expected3
) 
 

Reads a text string from the theme file.

Parameters:
expected1   The first alternative expected.
expected2   The second alternative expected.
expected3   The third alternative expected. If neither this nor expected1 or expected2 is found, an error message is displayed.

QString ThemeFile::readString (  QString const & expected1,
QString const & expected2
) 
 

Reads a text string from the theme file.

Parameters:
expected1   The first alternative expected.
expected2   The second alternative expected. If neither this nor expected1 is found, an error message is displayed.

QString ThemeFile::readString (  QString const & expected ) 
 

Reads a text string from the theme file.

Parameters:
expected   The expected text. If it is not found, an error message will be displayed.

QString ThemeFile::readString (  ) 
 

Reads a text string from the theme file.


Member Data Documentation

QFile ThemeFile::m_file [private]
 

The file to use.

QString ThemeFile::m_filename [private]
 

The filename.

int ThemeFile::m_line_nr [private]
 

The actual line number.

QTextStream ThemeFile::m_stream [private]
 

The stream to use.


The documentation for this class was generated from the following file:
Generated at Sun Jan 6 18:49:13 2002 for EasySok by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001