KDE 4.5 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

KShapeGesture Class Reference

from PyKDE4.kdeui import *

Detailed Description


Methods

 __init__ (self)
 __init__ (self, QPolygon shape)
 __init__ (self, QString description)
 __init__ (self, KShapeGesture other)
float distance (self, KShapeGesture other, float abortThreshold)
long hashable (self)
bool isValid (self)
bool operator != (self, KShapeGesture other)
bool operator == (self, KShapeGesture other)
 setShape (self, QPolygon shape)
 setShapeName (self, QString friendlyName)
QString shapeName (self)
QString toString (self)
QByteArray toSvg (self, QString attributes=QString())

Method Documentation

__init__ (   self )

Create a new invalid shape gesture.

__init__ (  self,
QPolygon  shape
)

Creates a new gesture consisting of given shape. If the gesture belongs to a KAction, and the user draws approximately the same shape on the screen while holding down the right mouse button, the action will trigger. shape must be a "reasonable" polygon. It must contain at least two points and it should contain at most 50 for performance reasons. No two consecutive points are allowed to be at the same position.

Parameters:
shape  shape to draw to trigger this gesture

__init__ (  self,
QString  description
)

Creates a new gesture from a string description.

Parameters:
description  create gesture according to this

__init__ (  self,
KShapeGesture  other
)

Copies the given gesture.

Parameters:
other  gesture to copy

float distance (  self,
KShapeGesture  other,
float  abortThreshold
)

Return a difference measurement betwenn this gesture and the other gesture. Abort comparison if difference is larger than abortThreshold and return a very large difference in that case. Usual return values range from x to y //TODO: fill in x and y

long hashable (   self )

Return an opaque value for use in hash tables

bool isValid (   self )

Return true if this gesture is valid.

bool operator != (  self,
KShapeGesture  other
)

Return the opposite of operator==()

bool operator == (  self,
KShapeGesture  other
)

Return whether this gesture is equal to the other gesture.

setShape (  self,
QPolygon  shape
)

Set the shape to draw to trigger this gesture.

setShapeName (  self,
QString  friendlyName
)

set a user-visible name for this gesture's shape, like "triangle" or "line".

QString shapeName (   self )

Return the user-visible name for this gesture's shape, like "triangle" or "line".

QString toString (   self )

Return a string representation of this gesture. Return empty string if invalid. This function is mainly for use with config files.

See also:
shapeName()

QByteArray toSvg (  self,
QString  attributes=QString()
)

Return an idealized SVG image of this gesture. Return an empty image if invalid.

Parameters:
attributes  SVG attributes to apply to the SVG "path" element that makes up the drawing of the gesture. By default, only a 'fill="none"' attribute will be set.

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • polkitqt
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal