KDE 4.6 PyKDE API Reference

- KDE's Python API

# MarbleNavigator Class Reference

`from PyKDE4.marble import *`

Inherits: QWidget → QObject
Namespace: Marble

## Detailed Description

A widget class that contains simple controls for a MarbleWidget.

This widget lets the user control an instance of MarbleWidget. The user can control panning and zooming as well as returning to a predefined view called the 'Home' position. You cannot change the Home position from the MarbleNavigator, though.

See also:
  MarbleWidget

See also:
  MarbleControlBox

## Signals

| goHome ()
| moveDown ()
| moveLeft ()
| moveRight ()
| moveUp ()
| zoomChanged (int zoom)
| zoomIn ()
| zoomOut ()

## Methods

| __init__ (self, QWidget parent=0)
| changeZoom (self, int zoom)
int | minimumZoom (self)
| resizeEvent (self, QResizeEvent a0)

## Signal Documentation

goHome | ( |  | ) |

Signal emitted when the Home button has been pressed.

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

moveDown | ( |  | ) |

Signal emitted when the Move Down button has been pressed.

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

moveLeft | ( |  | ) |

Signal emitted when the Move Left button has been pressed.

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

moveRight | ( |  | ) |

Signal emitted when the Move Right button has been pressed.

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

moveUp | ( |  | ) |

Signal emitted when the Move Up button has been pressed.

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

zoomChanged | ( | 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 | ( |  | ) |

Signal emitted when the Zoom In button has been pressed.

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

zoomOut | ( |  | ) |

Signal emitted when the Zoom Out button has been pressed.

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

## Method Documentation

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

Construct a new MarbleNavigator

Parameters:

  | parent | the parent widget

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.

int minimumZoom | ( |  | self ) |

Return the minimum zoom level set in the widget.

Returns:
  the minimum zoom level set in the widget.

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

Reimplementation of the resizeEvent() of the widget.

If the MarbleNavigator gets shrunk enough, the slider will be hidden, leaving only the Zoom Up and Zoom Down buttons.