No repainting yet!

So the points are stored in vector as I mentioned in my previous post. I am still stuck with repainting of these points in the graphics view. Only the first point painted is visible in the graphics scene.

Earlier, the functionality of repaint was achieved by means of a signal-slot which we discovered not to be befitting for correct implementations subsequently. This signal was emitted every time a point was painted in the scene. But if same approach is followed now as well, the vector continues to have coordinates of one point only with its capacity equal to 2.

Expecting to see such issues in near future as well where we will be confronting the fact that yes, this has to work another way around. Things will be changing. This is all a part of learning.

Also got hands into implementation of arc on mouse clicks with 3 points.

Looking into repainting issue for now!

Beginning with storage

Yesterday, I started with storing the coordinates of various points that are painted in the graphics scene on mouse clicks in vector.

The problem that came up was that there was repetition of a point two times being stored in the vector. The qDebug() (== cout) was implemented in the wrong place. We corrected it.

The next thing that came up wrong was that the vector was not getting appended. Coordinates of one point, the one that was painted at the last, were stored in the vector. The size of the vector remained 1.

On a few modifications, the vector size got incremented every time a new point was plotted. BUT the points that have been painted previously disappeared, only the one painted in the end was visible in the graphics scene. Perhaps, a new scene is generated every time a new point is plotted.

Today, I will be looking into this issue and soon will be able to get it working.