44 #include <private/qmetaobjectbuilder_p.h> 45 #include "private/qdeclarativeopenmetaobject_p.h" 79 emit q->valueChanged(key, value);
177 return d->mo->value(key.
toUtf8());
196 qWarning() <<
"Creating property with name" 198 <<
"is not permitted, conflicts with internal symbols.";
225 return d->keys.count();
236 return d->keys.size();
248 return d->keys.isEmpty();
259 return d->keys.contains(key);
277 if (!
d->keys.contains(key))
280 return (*(
d->mo))[utf8key];
The QVariant class acts like a union for the most common Qt data types.
void clear(const QString &key)
Clears the value (if any) associated with key.
virtual ~QDeclarativePropertyMap()
Destroys the bindable map.
#define QT_END_NAMESPACE
This macro expands to.
bool isEmpty() const
Returns true if the map contains no keys; otherwise returns false.
QByteArray toUtf8() const Q_REQUIRED_RESULT
Returns a UTF-8 representation of the string as a QByteArray.
The QByteArray class provides an array of bytes.
void insert(const QString &key, const QVariant &value)
Sets the value associated with key to value.
bool contains(const QString &key) const
Returns true if the map contains key.
QDeclarativePropertyMapMetaObject * mo
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
QVariant & operator[](const QString &key)
Returns the value associated with the key key as a modifiable reference.
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
The QDeclarativePropertyMap class allows you to set key-value pairs that can be used in QML bindings...
int size() const
Returns the number of keys in the map.
void append(const T &t)
Inserts value at the end of the list.
QVariant value(const QString &key) const
Returns the value associated with key.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QStringList class provides a list of strings.
QDeclarativePropertyMap(QObject *parent=0)
Constructs a bindable map with parent object parent.
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
Q_CORE_EXPORT void qWarning(const char *,...)
#define Q_DECLARE_PUBLIC(Class)
int count() const
Same as size().
Q_INVOKABLE QStringList keys() const
Returns the list of keys.
void emitChanged(const QString &key, const QVariant &value)