kresources
idmapper.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
00031 #ifndef KRESOURCES_IDMAPPER_H
00032 #define KRESOURCES_IDMAPPER_H
00033
00034 #include <QtCore/QMap>
00035 #include <QtCore/QString>
00036
00037 #include "kresources_export.h"
00038
00039 namespace KRES {
00040
00041 class IdMapperPrivate;
00042
00051 class KRESOURCES_EXPORT IdMapper
00052 {
00053 public:
00058 IdMapper();
00059
00073 explicit IdMapper( const QString &path,
00074 const QString &identifier = QString() );
00075
00077 ~IdMapper();
00078
00084 void setPath( const QString &path );
00085
00089 QString path() const;
00090
00095 void setIdentifier( const QString &identifier );
00096
00100 QString identifier() const;
00101
00105 bool load();
00106
00110 bool save();
00111
00115 void clear();
00116
00126 void setRemoteId( const QString &localId, const QString &remoteId );
00127
00136 void removeRemoteId( const QString &remoteId );
00137
00144 QString remoteId( const QString &localId ) const;
00145
00150 QString localId( const QString &remoteId ) const;
00151
00162 void setFingerprint( const QString &localId, const QString &fingerprint );
00163
00171 QString fingerprint( const QString &localId ) const;
00172
00176 QMap<QString, QString> remoteIdMap() const;
00177
00182 QString asString() const;
00183
00184 protected:
00189 QString filename();
00190
00191 private:
00192 IdMapperPrivate *const d;
00193 };
00194
00195 }
00196
00197 #endif