Well, I could do it that way, with individual functions in that one class all scanning for clicks in various areas and against various objects.
I just thought it would be nice for each object to figure out when it has been clicked itself and have code for handling each case in the implementation of the code for the class of that object. Also, I might want a slider for music and effects volume, and figured it would be nice to be able to use the code already implemented for that... just with a few changes to it to handle the 3D situation.
The QPushButton has all the nice stuff for being pressed, been released, only setting clicked when the mouse button was pushed and released and code for being checked or not. I would like to be able to use all that.
If I can get one of the controls classes to work, then getting all the rest to work would be very easy. Sliders, buttons, radio buttons, edit boxes, you name it. It'd be just so much better if I could make implementations of the abstract classes so each work in 3D.
I prefer having the modularity that comes with each individual class being able to handle its own domain of responsibilities, rather than having one big honking giant class having its tentacles digging into and manipulating everything.
I will look into the QEventloop class. Thank you for that.
Bookmarks