Marble.MarbleControlBox

KDE 4.2 PyKDE API Reference for Marble

- KDE's Python API

# MarbleControlBox Class Reference

`from PyKDE4.marble import *`

Inherits: QWidget → QObject
Namespace: Marble

## Detailed Description

A widget class that contains advanced controls for a MarbleWidget.

This widget lets the user control an instance of MarbleWidget. The widget contains a ToolBox with 3 pages: a Navigation page with a search tool for cities and other names, a Legend page with a legend for the symbols on the map, and a Map View page with a choice of themes / datasets.

The Navigation page lets the user navigate around the globe by using buttons for panning and a slider for zooming. There is also a "Home" button that lets the user go back to a predefined point at the earth, not unlike the home page in a web browser. In addition there is a search tool that lets the user search for names of points of interest (cities, mountains, glaciers, etc).

The Legend page does not contain any controls, but displays a legend of the symbols that are displayed on the globe.

The Map View page gives the user a choice of different datasets to display, which can also be thought of as different visual themes. The default datasets are a standard Atlas view, a Night view, and a Sattelite view.

See also:
  MarbleWidget

See also:
  MarbleNavigator

## Signals
| centerOn (QModelIndex a0, bool a1)
| goHome ()
| gpsInputDisabled (bool a0)
| gpsPositionChanged (float lat, float lon)
| moveDown ()
| moveLeft ()
| moveRight ()
| moveUp ()
| projectionSelected (Marble.Projection a0)
| selectMapTheme (QString a0)
| updateGps ()
| zoomChanged (int zoom)
| zoomIn ()
| zoomOut ()
## Methods
| __init__ (self, QWidget parent=0)
| __init__ (self, Marble.MarbleControlBox a0)
| addMarbleWidget (self, Marble.MarbleWidget widget)
| centerOn (self, QModelIndex a0, bool a1)
| changeZoom (self, int zoom)
| disableGpsInput (self, bool a0)
| enableFileViewActions (self)
| goHome (self)
| gpsInputDisabled (self, bool a0)
| gpsPositionChanged (self, float lat, float lon)
int | minimumZoom (self)
| moveDown (self)
| moveLeft (self)
| moveRight (self)
| moveUp (self)
| projectionSelected (self, Marble.Projection a0)
| projectionSelected (self, int projectionIndex)
| receiveGpsCoordinates (self, float a0, float a1, Marble.GeoDataCoordinates.Unit a2)
| resizeEvent (self, QResizeEvent a0)
| selectMapTheme (self, QString a0)
| selectProjection (self, Marble.Projection projection)
| selectTheme (self, QString a0)
| setCurrentLocationTabShown (self, bool show)
| setFileViewTabShown (self, bool show)
| setLegendTabShown (self, bool show)
| setLocations (self, MarblePlacemarkModel locations)
| setMapThemeModel (self, QStandardItemModel mapThemeModel)
| setMapViewTabShown (self, bool show)
| setNavigationTabShown (self, bool show)
| updateGps (self)
| zoomChanged (self, int zoom)
| zoomIn (self)
| zoomOut (self)

## Method Documentation

__init__ | ( | self, |
|  | QWidget | parent=0
| ) |  |  |

Construct a new MarbleControlBox

Parameters:

  | parent | the parent widget

__init__ | ( | self, |
|  | Marble.MarbleControlBox | a0
| ) |  |  |

addMarbleWidget | ( | self, |
|  | Marble.MarbleWidget | widget
| ) |  |  |

Add a MarbleWidget to be controlled by this widget.

Parameters:

  | widget | the MarbleWidget to be added.

Add a MarbleWidget so that it will be controlled by this widget. This call create all the connections of signals and slots that are necessary to have full control of the MarbleWidget, and thereby frees the programmer from doing it.

centerOn | ( | self, |
|  | QModelIndex | a0,
|  | bool | a1
| ) |  |  |

Signal emitted when a user selects a placemark in the search widget.

Parameters:

  | index | the index for the chosen placemark.

This signal is emitted when the user has selected a placemark in the search, e.g. by double clicking it or by pressing return. If it is connected to the centerOn( QModelIndex&) slot in a MarbleWidget, the widget will center the view on this placemark.

Signal syntax:
  `QObject.connect(source, SIGNAL("centerOn(const QModelIndex&, bool)"), target_slot)`

changeZoom | ( | self, |
|  | int | zoom
| ) |  |  |

Sets the value of the slider.

Parameters:

  | zoom | The new zoom value.

This slot should be called when the zoom value is changed from the widget itself, e.g. by using the scroll wheel. It sets the value of the slider, but nothing more. In particular it doesn't emit the zoomChanged signal.

disableGpsInput | ( | self, |
|  | bool | a0
| ) |  |  |

enableFileViewActions | ( |  | self ) |

goHome | ( |  | self ) |

Signal emitted when the Home button has been pressed.

Signal syntax:
  `QObject.connect(source, SIGNAL("goHome()"), target_slot)`

gpsInputDisabled | ( | self, |
|  | bool | a0
| ) |  |  |

Signal syntax:
  `QObject.connect(source, SIGNAL("gpsInputDisabled(bool)"), target_slot)`

gpsPositionChanged | ( | self, |
|  | float | lat,
|  | float | lon
| ) |  |  |

Signal syntax:
  `QObject.connect(source, SIGNAL("gpsPositionChanged(qreal, qreal)"), target_slot)`

int minimumZoom | ( |  | self ) |

Return the minimum zoom level set in the widget.

Returns:
  the minimum zoom level set in the widget.

moveDown | ( |  | self ) |

Signal emitted when the Move Down button has been pressed.

Signal syntax:
  `QObject.connect(source, SIGNAL("moveDown()"), target_slot)`

moveLeft | ( |  | self ) |

Signal emitted when the Move Left button has been pressed.

Signal syntax:
  `QObject.connect(source, SIGNAL("moveLeft()"), target_slot)`

moveRight | ( |  | self ) |

Signal emitted when the Move Right button has been pressed.

Signal syntax:
  `QObject.connect(source, SIGNAL("moveRight()"), target_slot)`

moveUp | ( |  | self ) |

Signal emitted when the Move Up button has been pressed.

Signal syntax:
  `QObject.connect(source, SIGNAL("moveUp()"), target_slot)`

projectionSelected | ( | self, |
|  | Marble.Projection | a0
| ) |  |  |

Signal syntax:
  `QObject.connect(source, SIGNAL("projectionSelected(Projection)"), target_slot)`

projectionSelected | ( | self, |
|  | int | projectionIndex
| ) |  |  |

receiveGpsCoordinates | ( | self, |
|  | float | a0,
|  | float | a1,
|  | Marble.GeoDataCoordinates.Unit | a2
| ) |  |  |

resizeEvent | ( | self, |
|  | QResizeEvent | a0
| ) |  |  |

Reimplementation of the resizeEvent() of the widget.

If the MarbleControlBox gets shrunk enough, the slider in the Navigation tab will be hidden, leaving only the Zoom Up and Zoom Down buttons.

selectMapTheme | ( | self, |
|  | QString | a0
| ) |  |  |

Signal syntax:
  `QObject.connect(source, SIGNAL("selectMapTheme(const QString&)"), target_slot)`

selectProjection | ( | self, |
|  | Marble.Projection | projection
| ) |  |  |

selectTheme | ( | self, |
|  | QString | a0
| ) |  |  |

setCurrentLocationTabShown | ( | self, |
|  | bool | show
| ) |  |  |

Control whether the Current Location tab is shown.

Parameters:

  | show | boolean that controls if the Current Location tab is shown.

setFileViewTabShown | ( | self, |
|  | bool | show
| ) |  |  |

Control whether the File View tab is shown.

Parameters:

  | show | boolean that controls if the File View tab is shown.

setLegendTabShown | ( | self, |
|  | bool | show
| ) |  |  |

Control whether the Legend tab is shown.

Parameters:

  | show | boolean that controls if the Legend tab is shown.

setLocations | ( | self, |
|  | MarblePlacemarkModel | locations
| ) |  |  |

Set a list/set of placemark names for the search widget.

Parameters:

  | locations | the QAbstractitemModel containing the placemarks

This function is called to display a potentially large number of placemark names in a widget and let the user search between them.

See also:
  centerOn

setMapThemeModel | ( | self, |
|  | QStandardItemModel | mapThemeModel
| ) |  |  |

setMapViewTabShown | ( | self, |
|  | bool | show
| ) |  |  |

Control whether the Map View tab is shown.

Parameters:

  | show | boolean that controls if the Map View tab is shown.

setNavigationTabShown | ( | self, |
|  | bool | show
| ) |  |  |

Control whether the Navigation tab is shown.

Parameters:

  | show | boolean that controls if the Navigation tab is shown.

updateGps | ( |  | self ) |

Signal syntax:
  `QObject.connect(source, SIGNAL("updateGps()"), target_slot)`

zoomChanged | ( | self, |
|  | int | zoom
| ) |  |  |

Signal emitted when the zoom slider has been moved.

Parameters:

  | zoom | The new zoom value.

Signal syntax:
  `QObject.connect(source, SIGNAL("zoomChanged(int)"), target_slot)`

zoomIn | ( |  | self ) |

Signal emitted when the Zoom In button has been pressed.

Signal syntax:
  `QObject.connect(source, SIGNAL("zoomIn()"), target_slot)`

zoomOut | ( |  | self ) |

Signal emitted when the Zoom Out button has been pressed.

Signal syntax:
  `QObject.connect(source, SIGNAL("zoomOut()"), target_slot)`