Maybe it works!

Whoa! It has struck me why I have been getting local coordinates of all entities , except point, in the undo stack, after they were moved because setPos has not been used for any one of them unlike the point entity. My bad!

The next query is what to be passed onto that position. Say in case of line, starting point or end point or maybe mid point. Well, none of them has worked since the position where line gets painted is not in peace where the mouse clicks were done. Rather it all is still in the local coordinates of the entity.

The position passed into the setPos should be the position of mousePressEvent but they are multiple, one for start point, another for end point. Since this should be only one, mouseMoveEvent comes to rescue I guess. If the line is painted, other entities too, with a live preview, I expect my setPos to cooperate and give me expected results.

I will be tackling with move command and mouseMoveEvent now.

Continuing with implementing preview

I continued with implementation of getting the preview of entities while they get painted. If inspecting softwares like LibreCAD, the preview is visible to the user while he/she moves the mouse. What I have yet implemented, yet for line and circle, is that preview is available on mouse press and mouse move events together.

Another thing, we find that the algorithm that implements ellipse to be incorrect. Will be working on it today!

Considering the fact that Qt provides various entities as predefined objects in it, comparing it to LCv3, I doubt if we will be needing something like storage manager. This is to be scrutinized more.