More Depth

Now as we are working on GUI of the CAD it is equally important to keep track of the backend stuff.

In this case Kernel is that backend where everything is to stored or processed.

We discussed today among our team and with Harmanpreet Singh, that before going further ahead in GUI and start implementing other entities and operations, we should divide our work and get the backend upto date with our GUI.

This will help us in the long run so as not to complicate things.

MDI

Today we dived into MDI (Multiple Document Interface) with tabs view for our GUI.

This defines how the interface will look like for our software. The new tabs are created but still need to work on the code to generate new subWindow child for MDI widget with correct graphicsScene associated with it.

Once this is completed we are going to start working on the core of the software, i.e Kernel.

Here everything will be handled, from events to adding or removing entities to performing operations on these entities. Even storage of the entities will be done in this module.

Save ‘n Load it

Now we are on track and going on a steady pace.

Today we implemented the save and load feature in eCAD.

We can save our points in an xml format. And this xml file will have a <point> tag which has x and y as its attributes and will store the point entity’s x coordinate and y coordinate respectively. This information is written with the help of QXmlStreamWriter.

And the same xml file can be opened in eCAD, which is parsed using QXmlStreamReader which then allows us to re-draw the entities.

The CadGraphicsScene class has read and write functions which are responsible for parsing.