kitchensync
KSync::SyncHistoryMap Class Reference
#include <synchistory.h>
Detailed Description
A small helper class to map a string (timestamp,md5sum) from and to a uid and save this map on permanent storage like KConfig.
Definition at line 40 of file synchistory.h.
Public Types | |
typedef QMap< QString, QString > | Map |
typedef QMap< QString, QString >::Iterator | Iterator |
Public Member Functions | |
SyncHistoryMap (const QString &fileName=QString::null) | |
virtual | ~SyncHistoryMap () |
void | setFileName (const QString &fileName) |
QString | fileName () const |
void | load () |
void | save () |
QString | text (const QString &id_key) const |
bool | contains (const QString &id_key) const |
void | insert (const QString &id_key, const QString &text_data) |
void | set (const SyncHistoryMap::Map &) |
SyncHistoryMap::Map | map () const |
void | clear () |
Protected Member Functions | |
KConfig * | config () |
Constructor & Destructor Documentation
|
Construct an empty MetaMap. You need to call load to retrive the information from the permanent storage.
SyncHistoryMap *map = new SyncHistoryMap(metaData); map->load();
Definition at line 40 of file synchistory.cpp. |
|
Destructor, cleans up and deletes the internal Config object.
Definition at line 49 of file synchistory.cpp. |
Member Function Documentation
|
Clears the permanent storage and also the internal map.
Definition at line 162 of file synchistory.cpp. |
|
creates the kconfig object on demand
Definition at line 176 of file synchistory.cpp. |
|
Definition at line 122 of file synchistory.cpp. |
|
Definition at line 58 of file synchistory.cpp. |
|
If the id_key already existed before the old incarnation is shadowed.
Definition at line 134 of file synchistory.cpp. |
|
load the information This method possible creates a KConfig object if mFile is a valid path and tries to load the saved MetaData and fills the internal map. Definition at line 70 of file synchistory.cpp. |
|
Definition at line 153 of file synchistory.cpp. |
|
Saves the current Map to a permanent storage and wipes out any previous data. Calling without a prior call to load() works as well as the Config object is created on demand Definition at line 91 of file synchistory.cpp. |
|
replace the internal map with the parameter
Definition at line 144 of file synchistory.cpp. |
|
Definition at line 114 of file synchistory.cpp. |
The documentation for this class was generated from the following files: