Preferences::Preferences( const QString& filename, const QString& format, const QString& version ) : d( new PreferencesPrivate ) { d->dirty_ = false; d->file_ = filename; d->format_ = format; d->version_ = version; d->filestate_ = false; d->formatstate_ = false; }
class Preferences { public:  Preferences(const QString& filename, const QString& format, const QString& version);  virtual ~Preferences();   const QString& file(); const QString& format(); const QString& version();  bool fileState();  bool formatState();   bool getBool(const QString& group, const QString& key, bool def = false, bool create = false); void setBool(const QString& group, const QString& key, bool value);  long getNumber(const QString& group, const QString& key, long def, bool create = false); void setNumber( const QString& group, const QString& key, long value);  double getDouble(const QString& group, const QString& key, double def = 0.0, bool create = false); void setDouble(const QString& group, const QString& key, double value);  QString getString(const QString& group, const QString& key, const QString& def, bool create = false); void setString(const QString& group, const QString& key, const QString& value);   void removeKey(const QString& group, const QString& key);  void removeGroup( const QString& group ); bool containKey( const QString& group, const QString& key ) const; bool containGroup( const QString& group ) const;   void flush(); virtual void reload();  protected:  void readData(); void writeData(); void processGroup( const QDomElement& group );  virtual QString getGroupDoc(const QString &group); virtual QString getEntryDoc(const QString &group, const QString &entry);  private: PreferencesPrivate* d; };
Preferences::Preferences( const QString& filename, const QString& format, const QString& version ) : d( new PreferencesPrivate ){	d->dirty_ = false;	d->file_ = filename;	d->format_ = format;	d->version_ = version;	d->filestate_ = false;	d->formatstate_ = false;}