I need some opinions on what a “perfect” design pattern is for general mouse interaction.
Here's a simplified task. I have a small 3d program (QT and openGL) and I use a mouse to interact. Each interaction, as a rule, is not only a call to one function, basically up to 3 function calls are made (initiate, execute, terminate). For example, camera rotation: here, the initial function call delivers the current first position of the mouse, while function function calls will update the camera, etc.
However, for only a few interactions, hardcoding them (inside MousePressEvent, MouseReleaseEvent MouseMoveEvent or MouseWheelEvent, etc.) does not really matter, but if I think of a more advanced program (for example, 20 or more interactions), then I need the right design .
Therefore, how would you create such interactions within QT.
I hope I made my problem clear enough, otherwise I won’t be bothered to complain :-)
thank
source
share