Registered Member
|
I'm having two issues. I have an application that uses MarbleWidget, and I'd like to NOT show the scale bar, compass, and overview map. I call the appropriate functions to do this, i.e., for a MarbleWidget instance called _mapWidget:
This works when I do it after changing the theme, but if I do it immediately after creating my MarbleWidget instance, the settings don't seem to stick. So the first question: does my MarbleWidget instance need to be visible first? Are there other things (besides a theme change) that might trigger a reversion of these settings to the defaults? The second issue: I'd also like to hide the float item that I believe is a NavigationFloatItem (over to the right of the map). This wasn't visible by default in older versions of Marble, and I can't find a setShowNavigation function in the source code. It's possible that I've missed something in the documentation, but I can't seem to figure out what the function to hide this item is called. In the Marble desktop application there's a menu item (View -> Info Boxes -> Navigation) that lets me toggle whether this is visible. Is there some trick to do this in my application, or did I just miss something obvious? Thanks. |
Registered Member
|
I've solved both my problems. First, the second problem. I'm fairly certain there's no equivalent to a MarbleWidget::setShowNavigation function. However, the setShow* functions are just convenience functions, there's an easier way to do it: you can just loop over all float items, and set their visibility to false. Or set visibility of select items, as I've done:
As an added bonus, this works even when I do it RIGHT AFTER creating my MarbleWidget instance, whereas my calls to setShowOverViewMap, etc., did not (which was my first problem). |
Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]