Warning, /education/marble/examples/cpp/map-controls/Readme.txt is written in an unsupported language. File is not indexed.
0001 The online version of this example can be found at 0002 https://techbase.kde.org/Marble/MarbleSignalsSlots 0003 0004 We'd like to add other widgets to our Marble window: A zoom slider and a label 0005 that shows the current mouse position in geodetic coordinates: longitude and 0006 latitude. 0007 In order to achieve this we need to create a vertical layout. Once we are done 0008 we add the slider and the label that we created to the layout. Also we zoom the 0009 globe to the slider's default value using the MarbleWidget::zoomView(int) 0010 method. 0011 We want to center our globe onto South America. So we create a new 0012 GeoDataCoordinates object that takes the longitude and the latitude as a 0013 parameter and we call MarbleWidget::centerOn. 0014 As you might have realized already GeoDataCoordinates is the geodetic "sister" 0015 of QPoint. They share a very similar API. Additionally GeoDataCoordinates 0016 features a nice set of string conversion methods 0017 (GeoDataCoordinates::fromString(), GeoDataCoordinates::lonToString() and 0018 GeoDataCoordinates::latToString()). They are used in various places inside 0019 Marble such as the signal MarbleWidget::mouseMoveGeoPosition(const QString&) . 0020 Finally we connect the signals and slots that MarbleWidget offers to the 0021 signals and slots of the slider and the label.