settings.h
author insilmaril
Thu Jul 13 08:40:58 2006 +0000 (2006-07-13)
changeset 358 1cec1d19a157
parent 163 30b22f7bd009
child 366 e95081c21da2
permissions -rw-r--r--
Fixed broken check for non-existen OO-export configuration
     1 #ifndef SETTINGS_H
     2 #define SETTINGS_H
     3 
     4 #include <qsettings.h>
     5 #include <qstring.h>
     6 #include <qstringlist.h>
     7 
     8 #include "misc.h"
     9 
    10 // Some helper functions and simplified settings class
    11 // to read and parse settings e.g.  in undo/redo directories
    12 
    13 class SimpleSettings
    14 {
    15 public:
    16     SimpleSettings ();
    17 	~SimpleSettings ();
    18 	void clear();
    19 	void readSettings(const QString &);
    20 	void writeSettings(const QString &);
    21 	QString readEntry (const QString &);
    22 	void setEntry (const QString &,const QString &);
    23 private:	
    24 	QStringList keylist;
    25 	QStringList valuelist;
    26 };
    27 
    28 
    29 // Overloaded QSettings class, used to save some settings in 
    30 // a map instead of users home directory
    31 class Settings:public QSettings,public xmlObj
    32 {
    33 public:
    34     Settings ();
    35 	~Settings ();
    36 	void clear();
    37 	void clearLocal (const QString &);
    38 	QString readLocalEntry ( const QString &, const QString &, const QString &);
    39 	void setLocalEntry (const QString &, const QString &, const QString &);
    40 	QString getXMLData (const QString &);
    41 
    42 protected:
    43 	QStringList pathlist;
    44 	QStringList keylist;
    45 	QStringList valuelist;
    46 };
    47 
    48 #endif