00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _KO_PROPERTIES_H
00020 #define _KO_PROPERTIES_H
00021
00022 #include <QString>
00023 #include <QMap>
00024 #include <QVariant>
00025 #include "koffice_export.h"
00026
00027
00034 class KOFFICECORE_EXPORT KoProperties {
00035
00036 public:
00037
00041 KoProperties() {}
00042
00046 KoProperties(const KoProperties & rhs);
00047
00048 virtual ~KoProperties() {}
00049
00050 public:
00051
00055 virtual void load(const QString &);
00056
00057
00061 virtual QString store();
00062
00063
00067 virtual void setProperty(const QString & name, const QVariant & value);
00068
00073 virtual bool getProperty(const QString & name, QVariant & value) const;
00074
00089 virtual QVariant getProperty(const QString & name) const;
00090
00104 int getInt(const QString & name, int def = 0) const;
00110 double getDouble(const QString & name, double def = 0.0) const;
00116 bool getBool(const QString & name, bool def = false) const;
00130 QString getString(const QString & name, const QString & def = QString::null) const;
00131
00132 private:
00133 void dump();
00134
00135 protected:
00136
00137 QMap<QString, QVariant> m_properties;
00138
00139 };
00140
00141 #endif // _KO_PROPERTIES_H