26 void insert(
const QString& key,
const QVariant&
value );
29 const QVariant
value(
const QString& key,
const QVariant& defValue = QVariant() )
const;
30 const QString
stringValue(
const QString& key,
const QString& defValue = QString() )
const;
31 int intValue(
const QString& key,
int defValue = 0 )
const;
32 double doubleValue(
const QString& key,
double defValue = 0.0 )
const;
33 bool boolValue(
const QString& key,
bool defValue =
false )
const;
const QString stringValue(const QString &key, const QString &defValue=QString()) const
Method to quickly fetch a string item.
Definition: cascadingqvariantmap.cpp:77
void setQVariantMap(const QVariantMap &map)
Sets the variant mapt to the given map.
Definition: cascadingqvariantmap.cpp:30
const QVariant value(const QString &key, const QVariant &defValue=QVariant()) const
Returns the value of the given key. If the map at this level doesn't have this key, it cascades to a higher-level. If it doesn't find the key if will fallback to the defValue supplied.
Definition: cascadingqvariantmap.cpp:64
A cascading map is a Hierarchical QVariantMap.
Definition: cascadingqvariantmap.h:16
double doubleValue(const QString &key, double defValue=0.0) const
Returns a double value.
Definition: cascadingqvariantmap.cpp:89
CascadingQVariantMap * parent() const
Returns the parent of this map.
Definition: cascadingqvariantmap.cpp:45
CascadingQVariantMap(CascadingQVariantMap *parent=0)
Definition: cascadingqvariantmap.cpp:13
int intValue(const QString &key, int defValue=0) const
Method to quickly fetch int items.
Definition: cascadingqvariantmap.cpp:83
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
void insert(const QString &key, const QVariant &value)
Insert the given value at the current cascading level.
Definition: cascadingqvariantmap.cpp:54
void deleteParents()
This helper method deletes all containing parents recursively Tough this doesnt' feel quite correct (...
Definition: cascadingqvariantmap.cpp:21
CascadingQVariantMap * root()
This method finds the 'root variant map.
Definition: cascadingqvariantmap.cpp:36
bool boolValue(const QString &key, bool defValue=false) const
Returns the default boolean value.
Definition: cascadingqvariantmap.cpp:95