summaryrefslogtreecommitdiff
path: root/library/config.h
Side-by-side diff
Diffstat (limited to 'library/config.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/config.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/library/config.h b/library/config.h
index 1dc32fa..0bab7ca 100644
--- a/library/config.h
+++ b/library/config.h
@@ -22,33 +22,33 @@
#define CONFIG_H
// ##### could use QSettings with Qt 3.0
#include <qmap.h>
#include <qstringlist.h>
class ConfigPrivate;
class Config
{
public:
typedef QMap< QString, QString > ConfigGroup;
enum Domain { File, User };
Config( const QString &name, Domain domain=User );
~Config();
-
+
bool operator == ( const Config & other ) const { return (filename == other.filename); }
bool operator != ( const Config & other ) const { return (filename != other.filename); }
bool isValid() const;
bool hasKey( const QString &key ) const;
void setGroup( const QString &gname );
void writeEntry( const QString &key, const char* value );
void writeEntry( const QString &key, const QString &value );
void writeEntryCrypt( const QString &key, const QString &value );
void writeEntry( const QString &key, int num );
#ifdef Q_HAS_BOOL_TYPE
void writeEntry( const QString &key, bool b );
#endif
void writeEntry( const QString &key, const QStringList &lst, const QChar &sep );
void removeEntry( const QString &key );
@@ -71,32 +71,35 @@ public:
void clearGroup();
void write( const QString &fn = QString::null );
protected:
void read();
bool parse( const QString &line );
QMap< QString, ConfigGroup > groups;
QMap< QString, ConfigGroup >::Iterator git;
QString filename;
QString lang;
QString glang;
bool changed;
ConfigPrivate *d;
static QString configFilename(const QString& name, Domain);
+
+private: // Sharp ROM compatibility
+ Config( const QString &name, bool what );
};
inline QString Config::readEntry( const QString &key, const QString &deflt ) const
{ return ((Config*)this)->readEntry(key,deflt); }
inline QString Config::readEntryCrypt( const QString &key, const QString &deflt ) const
{ return ((Config*)this)->readEntryCrypt(key,deflt); }
inline QString Config::readEntryDirect( const QString &key, const QString &deflt ) const
{ return ((Config*)this)->readEntryDirect(key,deflt); }
inline int Config::readNumEntry( const QString &key, int deflt ) const
{ return ((Config*)this)->readNumEntry(key,deflt); }
inline bool Config::readBoolEntry( const QString &key, bool deflt ) const
{ return ((Config*)this)->readBoolEntry(key,deflt); }
inline QStringList Config::readListEntry( const QString &key, const QChar &sep ) const
{ return ((Config*)this)->readListEntry(key,sep); }
#endif