WARNING: USE THIS SOFTWARE AT YOUR OWN RISK! THIS IS EXPERIMENTAL SOFTWARE NOT INTENDED FOR PRODUCTION USE! Zuble is currently an early stage prototype. As such Zuble is minimally tested and inherently unstable. It is provided for experimental, development, and demonstration purposes only. | Zuble QML Types | Zuble C++ Classes | Zuble Overview |
Zuble
0.1
Zuble Framework C++/QML extension API
|
This class allows Javascript programs to access QXmlItem objects. More...
#include <ZxItem.h>
Signals | |
void | stringValueChanged () |
Public Member Functions | |
ZxItem (QObject *parent=0) | |
Q_INVOKABLE bool | isAtomicValue () const |
determine if this item is an atomic value. Atomic values are represented by QVariant objects. More... | |
Q_INVOKABLE bool | isNode () const |
determine if this item is a node value. More... | |
Q_INVOKABLE bool | isNull () const |
determine if this item is null More... | |
Q_INVOKABLE QVariant | toAtomicValue () const |
convert this item to it's atomic value equivalent. More... | |
QObject * | getRootNode () |
Obtain the root node from the node model that contains this node. More... | |
Q_INVOKABLE QObject * | elementById (const QString &id) |
Obtain the element node from this node model that has the specified id attribute. More... | |
Q_INVOKABLE void | setAtomicValue (QVariant value) |
set the item to an atomic value More... | |
const QString | getLocalName () |
returns the local name of this item More... | |
const QString | getStringValue () |
returns the string value of this item More... | |
Static Public Member Functions | |
static void | registerType () |
Registers ZxItem as a QML type. More... | |
Protected Member Functions | |
void | setValue (const QXmlItem &item, ZxQuery *zQuery) |
bool | ensureIntegrity (const QString &code, const QString &message) |
Protected Attributes | |
QXmlItem | m_item |
Encapsulated QmlItem object. More... | |
ZxQuery * | m_zQuery |
Pointer to the ZxQuery object associated with this item. More... | |
Properties | |
QString | localName |
get the node local name More... | |
QString | stringValue |
get the node string value More... | |
QObject | rootNode |
get the root node for the model containing this node More... | |
Friends | |
class | ZxResultItems |
class | ZxQuery |
This class allows Javascript programs to access QXmlItem objects.
|
explicit |
Definition at line 35 of file ZxItem.cpp.
Referenced by elementById(), and getRootNode().
QObject * Zbl::ZxItem::elementById | ( | const QString & | id | ) |
Obtain the element node from this node model that has the specified id attribute.
id | the id value of the desired element (attribute must have type xs:ID) |
Definition at line 142 of file ZxItem.cpp.
|
protected |
Definition at line 183 of file ZxItem.cpp.
Referenced by elementById(), getLocalName(), getRootNode(), and getStringValue().
const QString Zbl::ZxItem::getLocalName | ( | ) |
QObject * Zbl::ZxItem::getRootNode | ( | ) |
Obtain the root node from the node model that contains this node.
Definition at line 119 of file ZxItem.cpp.
const QString Zbl::ZxItem::getStringValue | ( | ) |
bool Zbl::ZxItem::isAtomicValue | ( | ) | const |
determine if this item is an atomic value. Atomic values are represented by QVariant objects.
Definition at line 63 of file ZxItem.cpp.
bool Zbl::ZxItem::isNode | ( | ) | const |
determine if this item is a node value.
Definition at line 68 of file ZxItem.cpp.
bool Zbl::ZxItem::isNull | ( | ) | const |
determine if this item is null
Definition at line 73 of file ZxItem.cpp.
|
static |
Registers ZxItem as a QML type.
Definition at line 40 of file ZxItem.cpp.
Referenced by Zbl::Zblcore::registerTypes().
void Zbl::ZxItem::setAtomicValue | ( | QVariant | value | ) |
set the item to an atomic value
Definition at line 54 of file ZxItem.cpp.
|
protected |
Definition at line 45 of file ZxItem.cpp.
Referenced by elementById(), Zbl::ZxQuery::getFocusItem(), Zbl::ZxResultItems::getItem(), and getRootNode().
|
signal |
Referenced by setAtomicValue(), and setValue().
QVariant Zbl::ZxItem::toAtomicValue | ( | ) | const |
convert this item to it's atomic value equivalent.
Definition at line 78 of file ZxItem.cpp.
|
friend |
|
protected |
Encapsulated QmlItem object.
Definition at line 163 of file ZxItem.h.
Referenced by Zbl::ZxQuery::bindVariable(), elementById(), getLocalName(), getRootNode(), getStringValue(), isAtomicValue(), isNode(), isNull(), setAtomicValue(), Zbl::ZxQuery::setFocusItem(), setValue(), and toAtomicValue().
|
protected |
Pointer to the ZxQuery object associated with this item.
This is needed to obtain the XML model from which the QXmlItem's data can be obtained.
Definition at line 172 of file ZxItem.h.
Referenced by elementById(), ensureIntegrity(), getLocalName(), getRootNode(), and setValue().
|
read |
|
read |
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.