Login  Register

qg_graphicview → rs_graphicview → rs_eventhandler

Posted by ravas on Nov 03, 2015; 5:55pm
URL: https://forum.librecad.org/qg-graphicview-rs-graphicview-rs-eventhandler-tp5712543.html

I think the original intention of rs_graphicview was to be an interface
so that we are including less than the full qg_graphicview in other files.

It seems like at some point the concept of rs_graphicview being an interface was lost.
Isn't it supposed to be just a declaration of functions that will be reimplemented in qg_graphicview,
thereby allowing access to those functions in files that include rs_graphicview?

The passing of events from qg_graphicview → rs_graphicview → rs_eventhandler
doesn't make sense. qg_graphicview can call the event handler directly.

In summary: it seems like all the code from rs_graphicview.cpp is supposed to be in qg_graphicview.cpp,
and that rs_graphicview.h is supposed to be only a declaration of the functions needed in files that include it.