JsonTreeModel Implementation
v0.1.0
A Qt tree model for visualizing and manipulating a JSON document.
|
JsonTreeModelNode is the base class for the internal data structure behind JsonTreeModel. More...
#include <jsontreemodel.h>
Public Types | |
enum | Type { Scalar, Object, Array } |
This enum describes the type of data represented by a JsonTreeModelNode. More... | |
Public Member Functions | |
JsonTreeModelNode (JsonTreeModelNode *parent) | |
Constructs a new node with the given parent. More... | |
virtual | ~JsonTreeModelNode () |
Frees the memory held by this node and its children. More... | |
JsonTreeModelNode * | parent () const |
Returns this node's parent. More... | |
void | setParent (JsonTreeModelNode *parent) |
Makes this node a child of parent. More... | |
virtual Type | type () const =0 |
virtual QJsonValue | value () const =0 |
Returns the JSON value represented by this node and its children (if any). More... | |
JsonTreeModelNode is the base class for the internal data structure behind JsonTreeModel.
This enum describes the type of data represented by a JsonTreeModelNode.
Enumerator | |
---|---|
Scalar | Represents scalar JSON values (nulls, Booleans, numbers, and strings). |
Object | Represents JSON objects. |
Array | Represents JSON arrays. |
|
inline |
Constructs a new node with the given parent.
|
inlinevirtual |
Frees the memory held by this node and its children.
|
inline |
Returns this node's parent.
|
inline |
Makes this node a child of parent.
|
pure virtual |
Implemented in JsonTreeModelNamedListNode, JsonTreeModelListNode, and JsonTreeModelScalarNode.
|
pure virtual |
Returns the JSON value represented by this node and its children (if any).
Implemented in JsonTreeModelWrapperNode, JsonTreeModelNamedListNode, JsonTreeModelListNode, and JsonTreeModelScalarNode.