KDE 4.9 PyKDE API Reference

- KDE's Python API

# AbstractFloatItem Class Reference

`from PyKDE4.marble import *`

Inherits: Marble.RenderPlugin → QObject
Namespace: Marble

## Detailed Description

Abstract class:
  This class can be used as a base class for new classes, but can not be instantiated directly.

The abstract class for float item plugins

Float Item is a variant of Marble render plugins It keeps floating on top of the map at a given screen position

Good examples are Overview Map, License

## Methods
| __init__ (self, Marble.MarbleModel marbleModel, QPointF point=QPointF(10.0,10.0), QSizeF size=QSizeF(150.0,50.0))
| changeViewport (self, Marble.ViewportParams viewport)
QMenu | contextMenu (self)
| contextMenuEvent (self, QWidget w, QContextMenuEvent e)
bool | eventFilter (self, QObject object, QEvent e)
QFont | font (self)
| hide (self)
QPen | pen (self)
bool | positionLocked (self)
bool | render (self, Marble.GeoPainter painter, Marble.ViewportParams viewport, QString renderPos="FLOAT_ITEM", Marble.GeoSceneLayer layer=0)
QString | renderPolicy (self)
QStringList | renderPosition (self)
Marble.RenderPlugin.RenderType | renderType (self)
| setFont (self, QFont font)
| setPen (self, QPen pen)
| setPositionLocked (self, bool lock)
| setSettings (self, {QString:QVariant} settings)
| setVisible (self, bool visible)
{QString:QVariant} | settings (self)
| show (self)
| toolTipEvent (self, QHelpEvent e)
bool | visible (self)

## Method Documentation

__init__ | ( | self, |
|  | Marble.MarbleModel | marbleModel,
|  | QPointF | point=QPointF(10.0,10.0),
|  | QSizeF | size=QSizeF(150.0,50.0)
| ) |  |  |

changeViewport | ( | self, |
|  | Marble.ViewportParams | viewport
| ) |  |  |

QMenu contextMenu | ( |  | self ) |

contextMenuEvent | ( | self, |
|  | QWidget | w,
|  | QContextMenuEvent | e
| ) |  |  |

bool eventFilter | ( | self, |
|  | QObject | object,
|  | QEvent | e
| ) |  |  |

QFont font | ( |  | self ) |

current font for rendering

Returns:
  font

hide | ( |  | self ) |

Hide the item

If the item was shown this function will hide it

QPen pen | ( |  | self ) |

current pen for rendering

Returns:
  pen

bool positionLocked | ( |  | self ) |

Check is position locked

Float Item position can be locked. If it is, the item can't be moved with the cursor (in the UI)

To set it use

See also:
  setPositionLocked

Returns:
  position locked or not

bool render | ( | self, |
|  | Marble.GeoPainter | painter,
|  | Marble.ViewportParams | viewport,
|  | QString | renderPos="FLOAT_ITEM",
|  | Marble.GeoSceneLayer | layer=0
| ) |  |  |

QString renderPolicy | ( |  | self ) |

QStringList renderPosition | ( |  | self ) |

Marble.RenderPlugin.RenderType renderType | ( |  | self ) |

setFont | ( | self, |
|  | QFont | font
| ) |  |  |

setting current font for rendering

Parameters:

  | font |

setPen | ( | self, |
|  | QPen | pen
| ) |  |  |

setting current pen for rendering

Parameters:

  | pen |

setPositionLocked | ( | self, |
|  | bool | lock
| ) |  |  |

Set is position locked

Parameters:

  | lock | is locked?

Float Item position can be locked. If it is, item can't be moved with cursor (in UI)

To check it use

See also:
  positionLocked

setSettings | ( | self, |
|  | {QString:QVariant} | settings
| ) |  |  |

setVisible | ( | self, |
|  | bool | visible
| ) |  |  |

Set visibility of the float item

Float items can be visible or invisible. It's possible to check visibility with

See also:
  visible

Parameters:

  | visible | visibility of the item

{QString:QVariant} settings | ( |  | self ) |

show | ( |  | self ) |

Show the item

If the item was hidden this function will show it

toolTipEvent | ( | self, |
|  | QHelpEvent | e
| ) |  |  |

bool visible | ( |  | self ) |

Check visibility of the float item

Float items can be visible or invisible. It's possible to set visibility with

See also:
  setVisible

Returns:
  visible or not