F:/KPlato/koffice/libs/kofficecore/KoProperties.h

Aller à la documentation de ce fichier.
00001 /*
00002    Copyright (c) 2006 Boudewijn Rempt <boud@valdyas.org>
00003  
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017    Boston, MA 02110-1301, USA.
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

Généré le Wed Nov 22 23:41:03 2006 pour KPlato par  doxygen 1.5.1-p1