|
| CValueCache (int fileSplitDepth, QObject *parent=nullptr) |
| Constructor.
|
|
swift::misc::CVariantMap | getAllValues (const QString &keyPrefix={}) const |
| Return map containing all values in the cache. If prefix is provided then only those values whose keys start with that prefix. More...
|
|
swift::misc::CVariantMap | getAllValues (const QStringList &keys) const |
| Return map containing all given values in the cache. More...
|
|
swift::misc::CValueCachePacket | getAllValuesWithTimestamps (const QString &keyPrefix={}) const |
| Return map containing all values in the cache, and timestamps when they were modified. More...
|
|
QStringList | getAllUnsavedKeys (const QString &keyPrefix={}) const |
| Return keys of all values which have been changed but not saved. More...
|
|
void | insertValues (const swift::misc::CValueCachePacket &values) |
| Add some values to the cache. Values already in the cache will remain in the cache unless they are overwritten. More...
|
|
QJsonObject | saveToJson (const QString &keyPrefix={}) const |
| Save values in Json format. If prefix is provided then only those values whose keys start with that prefix. More...
|
|
void | loadFromJson (const QJsonObject &json) |
| Load all values in Json format. Values already in the cache will remain in the cache unless they are overwritten. More...
|
|
CStatusMessageList | loadFromJsonNoThrow (const QJsonObject &json, const CLogCategoryList &categories, const QString &prefix) |
| Call loadFromJson, catch any CJsonException that are thrown and return them as CStatusMessage. More...
|
|
CStatusMessage | saveToFiles (const QString &directory, const QString &keyPrefix={}) |
| Save values to Json files in a given directory. If prefix is provided then only those values whose keys start with that prefix. More...
|
|
CStatusMessage | saveToFiles (const QString &directory, const QStringList &keys) |
| Save values to Json files in a given directory. More...
|
|
CStatusMessage | loadFromFiles (const QString &directory) |
| Load all values from Json files in a given directory. Values already in the cache will remain in the cache unless they are overwritten. More...
|
|
QString | filenameForKey (const QString &key) const |
| Return the (relative) filename that may is (or would be) used to save the value with the given key. The file may or may not exist (because it might not have been saved yet). More...
|
|
QStringList | enumerateFiles (const QString &directory) const |
| List the Json files which are (or would be) used to save the current values. The files may or may not exist (because they might not have been saved yet). More...
|
|
void | clearAllValues (const QString &keyPrefix={}) |
| Clear all values from the cache. More...
|
|
QString | getHumanReadableName (const QString &key) const |
| Return the human readable name of the given key, or the raw key string if there is none.
|
|
QString | getHumanReadableWithKey (const QString &key) const |
| Return the human readable name of the given key, with the raw key string appended.
|
|
BatchGuard | batchChanges (QObject *owner) |
| Begins a batch of changes to be made through CCached instances owned by owner. More...
|
|
| ~BatchGuard () |
| Destructor. Applies deferred changes.
|
|
| BatchGuard (const BatchGuard &)=delete |
| Deleted copy constructor. Class is move-only.
|
|
BatchGuard & | operator= (const BatchGuard &)=delete |
| Deleted copy assignment operator. Class is move-only.
|
|
| BatchGuard (BatchGuard &&other) noexcept |
| Move constructor.
|
|
BatchGuard & | operator= (BatchGuard &&other) noexcept |
| Move assignment operator.
|
|
QBindable< QString > | bindableObjectName () |
|
| QObject (QObject *parent) |
|
| QT_NO_CONTEXTLESS_CONNECT QT_NO_CONTEXTLESS_CONNECT |
|
| QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT |
|
| Q_CLASSINFO (Name, Value) |
|
| Q_EMIT Q_EMIT |
|
| Q_ENUM (...) |
|
| Q_ENUMS (...) |
|
| Q_ENUM_NS (...) |
|
| Q_FLAG (...) |
|
| Q_FLAGS (...) |
|
| Q_FLAG_NS (...) |
|
| Q_GADGET Q_GADGET |
|
| Q_GADGET_EXPORT (EXPORT_MACRO) |
|
| Q_INTERFACES (...) |
|
| Q_INVOKABLE Q_INVOKABLE |
|
| Q_MOC_INCLUDE Q_MOC_INCLUDE |
|
| Q_NAMESPACE Q_NAMESPACE |
|
| Q_NAMESPACE_EXPORT (EXPORT_MACRO) |
|
| Q_OBJECT Q_OBJECT |
|
| Q_PROPERTY (...) |
|
| Q_REVISION Q_REVISION |
|
| Q_SET_OBJECT_NAME (Object) |
|
| Q_SIGNAL Q_SIGNAL |
|
| Q_SIGNALS Q_SIGNALS |
|
| Q_SLOT Q_SLOT |
|
| Q_SLOTS Q_SLOTS |
|
T | qobject_cast (QObject *object) |
|
T | qobject_cast (const QObject *object) |
|
bool | blockSignals (bool block) |
|
virtual bool | event (QEvent *e) |
|
virtual bool | eventFilter (QObject *watched, QEvent *event) |
|
bool | moveToThread (QThread *targetThread) |
|
bool | setProperty (const char *name, QVariant &&value) |
|
bool | setProperty (const char *name, const QVariant &value) |
|
int | startTimer (int interval, Qt::TimerType timerType) |
|
int | startTimer (std::chrono::nanoseconds interval, Qt::TimerType timerType) |
|
void | deleteLater () |
|
void | destroyed (QObject *obj) |
|
void | installEventFilter (QObject *filterObj) |
|
void | killTimer (Qt::TimerId id) |
|
void | killTimer (int id) |
|
void | objectNameChanged (const QString &objectName) |
|
void | removeEventFilter (QObject *obj) |
|
void | setObjectName (QAnyStringView name) |
|
void | setObjectName (const QString &name) |
|
void | setParent (QObject *parent) |
|
QList< QByteArray > | dynamicPropertyNames () const const |
|
QList< T > | findChildren (QAnyStringView name, Qt::FindChildOptions options) const const |
|
QList< T > | findChildren (Qt::FindChildOptions options) const const |
|
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
|
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const |
|
QObject * | parent () const const |
|
QString | objectName () const const |
|
QThread * | thread () const const |
|
QVariant | property (const char *name) const const |
|
T | findChild (QAnyStringView name, Qt::FindChildOptions options) const const |
|
T | findChild (Qt::FindChildOptions options) const const |
|
bool | disconnect (const QObject *receiver, const char *method) const const |
|
bool | disconnect (const char *signal, const QObject *receiver, const char *method) const const |
|
bool | inherits (const char *className) const const |
|
bool | isQuickItemType () const const |
|
bool | isWidgetType () const const |
|
bool | isWindowType () const const |
|
bool | signalsBlocked () const const |
|
virtual const QMetaObject * | metaObject () const const |
|
const QObjectList & | children () const const |
|
void | dumpObjectInfo () const const |
|
void | dumpObjectTree () const const |
|
|
static const QStringList & | getLogCategories () |
| Log categories.
|
|
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
|
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
|
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
|
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
|
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
|
QString | tr (const char *sourceText, const char *disambiguation, int n) |
|
bool | disconnect (const QMetaObject::Connection &connection) |
|
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
|
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
|
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
|
Manages a map of { QString, CVariant } pairs, which can be distributed among multiple processes.
RAII object returned by CValueCache::batchChanges.
Applies deferred changes when it is destroyed.
Definition at line 153 of file valuecache.h.