KDE 4.5 PyKDE API Reference

- KDE's Python API

# MarbleNavigator Class Reference

`from PyKDE4.marble import *`

Inherits: QWidget → QObject
Namespace: Marble.MarbleNavigator

## 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)
| goHome (self)
int | minimumZoom (self)
| moveDown (self)
| moveLeft (self)
| moveRight (self)
| moveUp (self)
| resizeEvent (self, QResizeEvent a0)
| zoomChanged (self, int zoom)
| zoomIn (self)
| zoomOut (self)

## 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.

goHome | ( |  | self ) |

Signal emitted when the Home button has been pressed.

Signal syntax:
  `QObject.connect(source, SIGNAL("goHome()"), 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)`

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.

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)`