A Javascript dictionary object.
More...
#include <ZMap.h>
|
void | set (const QString &key, QJSValue value) |
| Sets the specified key in the map to the specified value. More...
|
|
bool | remove (const QString &key) |
| Removes the specified key from the map. More...
|
|
void | clear () |
| Remove all key/value pairs from the map. More...
|
|
|
| ZMap (QObject *parent=0) |
|
int | getSize () |
|
Q_INVOKABLE bool | has (const QString &key) |
| Returns true if the map contains the specified key. More...
|
|
Q_INVOKABLE QJSValue | get (const QString &key) |
| Returns the value associated with a specified key in the map. More...
|
|
Q_INVOKABLE QVariantList | keys () |
| Obtain the key names in the map. More...
|
|
|
typedef QMap< QString, QJSValue > | zMap |
|
A Javascript dictionary object.
Definition at line 40 of file ZMap.h.
◆ zMap
◆ ZMap()
Zbl::ZMap::ZMap |
( |
QObject * |
parent = 0 | ) |
|
|
explicit |
◆ clear
void Zbl::ZMap::clear |
( |
| ) |
|
|
slot |
Remove all key/value pairs from the map.
Definition at line 87 of file ZMap.cpp.
◆ get()
QJSValue Zbl::ZMap::get |
( |
const QString & |
key | ) |
|
Returns the value associated with a specified key in the map.
- Parameters
-
key | Key for which a value will be obtained |
- Returns
- The value stored for the specified key
Definition at line 51 of file ZMap.cpp.
◆ getSize()
int Zbl::ZMap::getSize |
( |
| ) |
|
◆ has()
bool Zbl::ZMap::has |
( |
const QString & |
key | ) |
|
Returns true if the map contains the specified key.
- Parameters
-
- Returns
- true if map contains key, false otherwise
Definition at line 46 of file ZMap.cpp.
◆ keys()
QVariantList Zbl::ZMap::keys |
( |
| ) |
|
Obtain the key names in the map.
- Returns
- An array containing the name of keys in the map
Definition at line 66 of file ZMap.cpp.
◆ registerType()
void Zbl::ZMap::registerType |
( |
| ) |
|
|
static |
◆ remove
bool Zbl::ZMap::remove |
( |
const QString & |
key | ) |
|
|
slot |
Removes the specified key from the map.
- Parameters
-
key | The key that will be removed. |
- Returns
- true if the key was removed from the map, false if the key didn't exist in the map
Definition at line 61 of file ZMap.cpp.
◆ set
void Zbl::ZMap::set |
( |
const QString & |
key, |
|
|
QJSValue |
value |
|
) |
| |
|
slot |
Sets the specified key in the map to the specified value.
Any previous value for the specified key will be overwritten with the new value.
- Parameters
-
key | The key for which a value will be set |
value | The value to set in the map. |
Definition at line 56 of file ZMap.cpp.
◆ m_map
◆ size
The number of items in the map.
Definition at line 59 of file ZMap.h.
The documentation for this class was generated from the following files:
Zuble documentation copyright © 2019 Bob Dinitto.
Documentation contributions included
herein are the copyrights of their respective owners. The documentation
provided herein is licensed under the terms of the
GNU Free Documentation License version 1.3
as published by the Free Software Foundation.
Zuble is a derivative work of Qt version 5.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland
and/or other countries worldwide.
All other trademarks are property of their respective owners.