KDE 4.4 PyKDE API Reference

- KDE's Python API

# FrameGraphicsItem Class Reference

`from PyKDE4.marble import *`

Inherits: Marble.ScreenGraphicsItem → Marble.MarbleGraphicsItem
Subclasses: Marble.LabelGraphicsItem
Namespace: Marble.FrameGraphicsItem

## Detailed Description

## Enumerations

FrameType | { NoFrame, RectFrame, RoundedRectFrame }

## Methods

| __init__ (self, Marble.MarbleGraphicsItem parent=0)
| __init__ (self, QPointF position, QSizeF size, Marble.MarbleGraphicsItem parent=0)
QBrush | background (self)
QPainterPath | backgroundShape (self)
QBrush | borderBrush (self)
Qt::PenStyle | borderStyle (self)
float | borderWidth (self)
QRectF | contentRect (self, QPointF position)
QRectF | contentRect (self)
QSizeF | contentSize (self)
Marble.FrameGraphicsItem.FrameType | frame (self)
float | margin (self)
float | marginBottom (self)
float | marginLeft (self)
float | marginRight (self)
float | marginTop (self)
float | padding (self)
| paint (self, Marble.GeoPainter painter, Marble.ViewportParams viewport, QString renderPos, Marble.GeoSceneLayer layer=0)
| paintBackground (self, Marble.GeoPainter painter)
| paintContent (self, Marble.GeoPainter painter, Marble.ViewportParams viewport, QString renderPos, Marble.GeoSceneLayer layer=0)
QRectF | paintedRect (self, QPointF position=QPointF(0.0,0.0))
| setBackground (self, QBrush background)
| setBorderBrush (self, QBrush brush)
| setBorderStyle (self, Qt::PenStyle style)
| setBorderWidth (self, float width)
| setContentSize (self, QSizeF size)
| setFrame (self, Marble.FrameGraphicsItem.FrameType type)
| setMargin (self, float margin)
| setMarginBottom (self, float marginBottom)
| setMarginLeft (self, float marginLeft)
| setMarginRight (self, float marginRight)
| setMarginTop (self, float marginTop)
| setPadding (self, float width)

## Method Documentation

__init__ | ( | self, |
|  | Marble.MarbleGraphicsItem | parent=0
| ) |  |  |

__init__ | ( | self, |
|  | QPointF | position,
|  | QSizeF | size,
|  | Marble.MarbleGraphicsItem | parent=0
| ) |  |  |

QBrush background | ( |  | self ) |

Returns the background brush of the item.

QPainterPath backgroundShape | ( |  | self ) |

Returns the shape of the background.

QBrush borderBrush | ( |  | self ) |

Returns the brush of the border.

Qt::PenStyle borderStyle | ( |  | self ) |

Returns the style of the border.

float borderWidth | ( |  | self ) |

QRectF contentRect | ( | self, |
|  | QPointF | position
| ) |  |  |

QRectF contentRect | ( |  | self ) |

QSizeF contentSize | ( |  | self ) |

Marble.FrameGraphicsItem.FrameType frame | ( |  | self ) |

Returns the type of the frame.

float margin | ( |  | self ) |

Returns the margin of the item. This is used for all margins with the value 0.0. The padding is the space outside the painted space.

float marginBottom | ( |  | self ) |

Returns the bottom margin of the item.

float marginLeft | ( |  | self ) |

Returns the left margin of the item.

float marginRight | ( |  | self ) |

Returns the right margin of the item.

float marginTop | ( |  | self ) |

Returns the top margin of the item.

float padding | ( |  | self ) |

Returns the padding of the item. The padding is the empty space inside the border.

paint | ( | self, |
|  | Marble.GeoPainter | painter,
|  | Marble.ViewportParams | viewport,
|  | QString | renderPos,
|  | Marble.GeoSceneLayer | layer=0
| ) |  |  |

This function won't be reimplemented in most cases.

paintBackground | ( | self, |
|  | Marble.GeoPainter | painter
| ) |  |  |

Paints the background. This function won't be reimplemented in most cases.

paintContent | ( | self, |
|  | Marble.GeoPainter | painter,
|  | Marble.ViewportParams | viewport,
|  | QString | renderPos,
|  | Marble.GeoSceneLayer | layer=0
| ) |  |  |

Here the items paint their content.

QRectF paintedRect | ( | self, |
|  | QPointF | position=QPointF(0.0,0.0)
| ) |  |  |

setBackground | ( | self, |
|  | QBrush | background
| ) |  |  |

Changes the background brush of the item.

setBorderBrush | ( | self, |
|  | QBrush | brush
| ) |  |  |

Change the brush of the border.

setBorderStyle | ( | self, |
|  | Qt::PenStyle | style
| ) |  |  |

Change the style of the border.

setBorderWidth | ( | self, |
|  | float | width
| ) |  |  |

setContentSize | ( | self, |
|  | QSizeF | size
| ) |  |  |

Sets the size of the item. The given size is the size required for contents. This function does not guarantee a correct content size if you set margin or padding afterwards.

setFrame | ( | self, |
|  | Marble.FrameGraphicsItem.FrameType | type
| ) |  |  |

Sets the type of the Frame. Standard is NoFrame.

setMargin | ( | self, |
|  | float | margin
| ) |  |  |

Sets the margin of the item. This is used for all margins with the value 0.0.

setMarginBottom | ( | self, |
|  | float | marginBottom
| ) |  |  |

Set the bottom margin of the item.

setMarginLeft | ( | self, |
|  | float | marginLeft
| ) |  |  |

Set the left margin of the item.

setMarginRight | ( | self, |
|  | float | marginRight
| ) |  |  |

Set the right margin of the item.

setMarginTop | ( | self, |
|  | float | marginTop
| ) |  |  |

Set the top margin of the item.

setPadding | ( | self, |
|  | float | width
| ) |  |  |

Set the padding of the item.

## Enumeration Documentation

FrameType

Enumerator: