The data structure

We decided to divide our structure in three directories : buttleofx/core, buttleofx/data and buttleofx/gui.

CORE

For the moment, we can find the undo/redo commands in this directory. For every undoable action in the application, we will have a class with the undo and redo commands. For example, when a node is dragged, it is possible to undo the action. For this we will have a CommandSetCoord class with fucntions such as UndoCommand and RedoCommand.

DATA

It will contain all the data needed to manage the application. We created a singleton ButtleData defined by a Graph and the corresponding GraphWrapper.

GUI

Concerning the graphical user interface, we have been working hard on the data structure but finally got to something relevant. We will have three main layers :

The core objects
This layer will store the hard data, for example the Nodes’ name, type, position, …
It will contain python objects such as a Node class and a Graph class.

The wrappers
They are necessary to bind the qml data with the python data. For example, to expose the Nodes’ data in the form of QProperties.
It will contain objects such as a NodeWrapper class and a GraphWrapper class.

The qml objects
These are the one that the user will be able to see in the application. They are created from a model defined by the wrappers.

We want to separate the data concerning our three elements, so we will have three directories :

/viewer
/graph
/parameters

Each one will include the corresponding core objects, wrappers and qml objects. This way, we can work on and execute the three elements separatly.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s