Registered Member
|
I'm trying to handle custom inputs on a MarbleWidget, while retaining existing InputHandler functionality. Basically, I want to install an Event Filter on top of the existing functionality, so I can grab "my inputs" and return true, or return false to pass it down the stack. Based on the tutorials I have looked at, there seem to be several ways to do this: subclass MarbleWidgetInputHandler, subclass LayerInterface, or create a plugin. What is the best way to do this?
My first instinct was to subclass MarbleWidgetInputHandler, and reimplement eventFilter, but I have run into several roadblocks which make me wonder if I'm on the wrong path. First, I subclassed MarbleWidget, but when I did that, I lost all the existing functionality like dragging the globe to move the map; this is because all of the actual functionality is in MarbleWidgetDefaultInputHandler. Second, I subclassed MarbleWidgetDefaultInputHandler, and got the Marble functionality back; however, I don't think I can reimplement eventFilter anymore, since it is not declared virtual in MarbleWidgetDefaultInputHandler. Am I missing something, or should I try another route? My C++ is a little rusty, so please forgive me if I'm missing something obvious. Thanks. |
Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]