KDE 4.7 PyKDE API Reference

- KDE's Python API

# GeoDataLineStyle Class Reference

`from PyKDE4.marble import *`

Inherits: Marble.GeoDataColorStyle → Marble.GeoDataObject → Marble.GeoNode
Namespace: Marble

## Detailed Description

specifies the style how lines are drawn

A GeoDataLineStyle specifies how the name of a GeoDataFeature is drawn in the viewer. A custom color, color mode (both inherited from GeoDataColorStyle) and width for the width of the line.

## Methods

| __init__ (self)
| __init__ (self, Marble.GeoDataLineStyle other)
| __init__ (self, QColor color)
bool | background (self)
Qt::PenCapStyle | capStyle (self)
QVector<qreal> | dashPattern (self)
QString | nodeType (self)
| pack (self, QDataStream stream)
Qt::PenStyle | penStyle (self)
float | physicalWidth (self)
| setBackground (self, bool background)
| setCapStyle (self, Qt::PenCapStyle style)
| setDashPattern (self, QVector<qreal> pattern)
| setPenStyle (self, Qt::PenStyle style)
| setPhysicalWidth (self, float realWidth)
| setWidth (self, float width)
| unpack (self, QDataStream stream)
float | width (self)

## Method Documentation

__init__ | ( |  | self ) |

__init__ | ( | self, |
|  | Marble.GeoDataLineStyle | other
| ) |  |  |

__init__ | ( | self, |
|  | QColor | color
| ) |  |  |

Construct a new GeoDataLineStyle

Parameters:

  color the color to use when showing the name
  See also:
    GeoDataColorStyle

bool background | ( |  | self ) |

Return true if background get drawn

Returns:

Qt::PenCapStyle capStyle | ( |  | self ) |

Return the current pen cap style

Returns:
  the current pen cap style

QVector<qreal> dashPattern | ( |  | self ) |

Return the current dash pattern

Returns:
  the current dash pattern

QString nodeType | ( |  | self ) |

pack | ( | self, |
|  | QDataStream | stream
| ) |  |  |

Serialize the style to a stream.

Parameters:

  |  | stream the stream

Qt::PenStyle penStyle | ( |  | self ) |

Return the current pen cap style

Returns:
  the current pen cap style

float physicalWidth | ( |  | self ) |

Return the current physical width of the line

Returns:
  the current width

setBackground | ( | self, |
|  | bool | background
| ) |  |  |

Set whether to draw the solid background

Parameters:

  | bool |

setCapStyle | ( | self, |
|  | Qt::PenCapStyle | style
| ) |  |  |

Set pen cap style

Parameters:

  |  | style cap style

setDashPattern | ( | self, |
|  | QVector<qreal> | pattern
| ) |  |  |

Sets the dash pattern

Parameters:

  | pattern | dash pattern

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

Set pen cap style

Parameters:

  |  | style cap style

setPhysicalWidth | ( | self, |
|  | float | realWidth
| ) |  |  |

Set the physical width of the line (in meters)

Parameters:

  |  | width the new width

setWidth | ( | self, |
|  | float | width
| ) |  |  |

Set the width of the line

Parameters:

  |  | width the new width

unpack | ( | self, |
|  | QDataStream | stream
| ) |  |  |

Unserialize the style from a stream

Parameters:

  |  | stream the stream

float width | ( |  | self ) |

Return the current width of the line

Returns:
  the current width