DataModelBuilder

DataModelBuilder is an application with GUI based on Qt Quick and QVL plugin that allows to create and modify tree-like data models of any complexity and export them to JSON file which can then be loaded by any app which can parse JSON, but it is intended to be loaded using VL, DMBCore library or QVL plugin in any C++ or Qt Quick app.

Usage

Main interface

Main interface comprises such parts:

Data view

Visual data interface (data view) consists of

Variable lists include:

Variable field is a visual representation of a variable including

Edit controls

Rename

Edit value

Change type

Interaction controls

Create a new DB

Save current DB

Load DB from a file

Data model construction process

Any tree-like data model consists of two types of nodes:

A data model graph

Branch is a type of a node that can have child nodes (leafs or other branches).

In VL terminology branch is called “container” and there are two types of them:

Leaf is a node which opposite to a branch can’t have any child nodes. Primitive types in VL act as leaf nodes:

Creating a container

New node will be added

Creating a primitive type

New node will be added

Create a new composite type

Create

Modify

You can

Through the context menu of a variable

To show the menu right-click on a variable field.

Container content

You can modify a container content by click on Expand switch and then on button Add

New variable will be added

Instantiate an object of a type

By clicking Add -> Add a type instance on any container block you can select and instantiate a type from the Type Library

Into the content

Here we can see the previously created type “Test object”

If you add to an object then the Instantce creation dialog with a suggested name will be shown. You can enter any name that is not taken by any of object’s properties

Into any container

You can instantiate a type into any container as described above.

Into the types collection

You can create a derived type inheriting it from another just instaniating it directly into the Types Library and then modifying.

The newly created type will have the instantiated type as a prototype (“Test object” in this case)