KTNEF Library
ktnefpropertyset.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00031 #ifndef KTNEFPROPERTYSET_H
00032 #define KTNEFPROPERTYSET_H
00033
00034 #include <QtCore/QMap>
00035 #include <QtCore/QVariant>
00036 #include "ktnef_export.h"
00037
00038 namespace KTnef { class KTNEFProperty; }
00039
00040 namespace KTnef {
00041
00046 class KTNEF_EXPORT KTNEFPropertySet
00047 {
00048 public:
00052 KTNEFPropertySet();
00053
00057 ~KTNEFPropertySet();
00058
00068 void addProperty( int key, int type, const QVariant &value,
00069 const QVariant &name=QVariant(), bool overwrite=false );
00070
00082 QString findProp( int key, const QString &fallback=QString(),
00083 bool convertToUpper=false ) const;
00084
00096 QString findNamedProp( const QString &name,
00097 const QString &fallback=QString(),
00098 bool convertToUpper=false ) const;
00099
00103 QMap<int,KTNEFProperty*>& properties();
00104
00108 const QMap<int,KTNEFProperty*>& properties() const;
00109
00117 QVariant property( int key ) const;
00118
00127 void addAttribute( int key, int type, const QVariant &value,
00128 bool overwrite=false );
00129
00133 QMap<int,KTNEFProperty*>& attributes();
00134
00138 const QMap<int,KTNEFProperty*>& attributes() const;
00139
00147 QVariant attribute( int key ) const;
00148
00154 void clear( bool deleteAll=false );
00155
00156 private:
00157
00158 class Private;
00159 Private *const d;
00160
00161
00162 Q_DISABLE_COPY( KTNEFPropertySet )
00163 };
00164
00165 }
00166 #endif