# class KShapeGesture

###

Module | kdeui
Namespace |
Class | KShapeGesture
Inherits |

### methods

- KShapeGesture ( )

  returns ctor

  Create a new invalid shape gesture.

- KShapeGesture (shape)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  shape | QPolygon |

  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.

  shape - shape to draw to trigger this gesture

- KShapeGesture (description)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  description | QString |

  Creates a new gesture from a string description.

  description - create gesture according to this

- KShapeGesture (other)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  other | KShapeGesture |

  Copies the given gesture.

  other - gesture to copy

- distance (other, abortThreshold)

  returns float

  Argument | Type | Default
  --- | --- | ---
  other | KShapeGesture |
  abortThreshold | float |

  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

- hashable ( )

  returns uint

  Return an opaque value for use in hash tables

- isValid ( )

  returns bool

  Return true if this gesture is valid.

- operator != (other)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  other | KShapeGesture |

  Return the opposite of operator==()

- operator == (other)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  other | KShapeGesture |

  Return whether this gesture is equal to the other gesture.

- setShape (shape)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  shape | QPolygon |

  Set the shape to draw to trigger this gesture.

- setShapeName (friendlyName)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  friendlyName | QString |

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

- shapeName ( )

  returns QString

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

- toString ( )

  returns QString

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

  See also shapeName()

- toSvg (attributes)

  returns QByteArray

  Argument | Type | Default
  --- | --- | ---
  attributes | QString | QString()

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

  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.