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

theme_file.h

00001 /*
00002  *   EasySok --- A(nother) sokoban game for KDE.
00003  *
00004  *   Copyright (C) 2001 by Ralf Schmelter (ralfs@pc2a.chemie.uni-dortmund.de).
00005  *
00006  *   This program is free software; you can redistribute it and/or modify
00007  *   it under the terms of the GNU General Public License version 2 as
00008  *   published by the Free Software Foundation.
00009  *
00010  *   This program is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with this program; if not, write to the Free Software
00017  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018  */
00019 
00020 
00021 #ifndef EASYSOK_THEME_FILE_INC_GUARD_H
00022 #define EASYSOK_THEME_FILE_INC_GUARD_H
00023 
00024 
00025 #include <qcolor.h>
00026 #include <qfile.h>
00027 #include <qstring.h>
00028 #include <qtextstream.h>
00029 
00030 
00031 
00032 
00040 class ThemeFile
00041 {
00042 
00043 public:
00044 
00053     ThemeFile(QString const & filename);
00054 
00055 
00060     bool isValid() const;
00061 
00062 
00067     QRgb readColor();
00068 
00069 
00074     QString readString();
00075 
00076 
00083     QString readString(QString const & expected);
00084 
00085 
00094     QString readString(QString const & expected1, QString const & expected2);
00095 
00096 
00106     QString readString(QString const & expected1, QString const & expected2, QString const & expected3);
00107 
00108 
00113     int readInt();
00114 
00115 
00120     double readDouble();
00121 
00122 
00127     int lineNr() const;
00128 
00129 
00134     QString const & filename() const;
00135 
00136 
00137 private:
00138 
00143     QString m_filename;
00144 
00145 
00150     int m_line_nr;
00151 
00152 
00157     QFile m_file;
00158 
00159 
00164     QTextStream m_stream;
00165 };
00166 
00167 
00168 #endif

Generated at Sun Jan 6 18:49:09 2002 for EasySok by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001