• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

KShapeGesture Class Reference

#include <kgesture.h>

List of all members.


Public Member Functions

float distance (const KShapeGesture &other, float abortThreshold) const
uint hashable () const
bool isValid () const
 KShapeGesture (const KShapeGesture &other)
 KShapeGesture (const QString &description)
 KShapeGesture (const QPolygon &shape)
 KShapeGesture ()
bool operator!= (const KShapeGesture &other) const
KShapeGesture & operator= (const KShapeGesture &other)
bool operator== (const KShapeGesture &other) const
void setShape (const QPolygon &shape)
void setShapeName (const QString &friendlyName)
QString shapeName () const
QString toString () const
QByteArray toSvg (const QString &attributes=QString()) const
 ~KShapeGesture ()

Detailed Description

Definition at line 37 of file kgesture.h.


Constructor & Destructor Documentation

KShapeGesture::KShapeGesture (  ) 

Create a new invalid shape gesture.

Definition at line 50 of file kgesture.cpp.

KShapeGesture::KShapeGesture ( const 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

Definition at line 56 of file kgesture.cpp.

KShapeGesture::KShapeGesture ( const QString &  description  ) 

Creates a new gesture from a string description.

Parameters:
description create gesture according to this

Definition at line 63 of file kgesture.cpp.

KShapeGesture::KShapeGesture ( const KShapeGesture &  other  ) 

Copies the given gesture.

Parameters:
other gesture to copy

Definition at line 93 of file kgesture.cpp.

KShapeGesture::~KShapeGesture (  ) 

Destructor.

Definition at line 99 of file kgesture.cpp.


Member Function Documentation

float KShapeGesture::distance ( const KShapeGesture &  other,
float  abortThreshold 
) const

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

Definition at line 225 of file kgesture.cpp.

uint KShapeGesture::hashable (  )  const

Return an opaque value for use in hash tables.

Definition at line 384 of file kgesture.cpp.

bool KShapeGesture::isValid (  )  const

Return true if this gesture is valid.

Definition at line 158 of file kgesture.cpp.

bool KShapeGesture::operator!= ( const KShapeGesture &  other  )  const

Return the opposite of operator==().

Definition at line 379 of file kgesture.cpp.

KShapeGesture & KShapeGesture::operator= ( const KShapeGesture &  other  ) 

Set this gesture to the other gesture.

Definition at line 362 of file kgesture.cpp.

bool KShapeGesture::operator== ( const KShapeGesture &  other  )  const

Return whether this gesture is equal to the other gesture.

Definition at line 371 of file kgesture.cpp.

void KShapeGesture::setShape ( const QPolygon &  shape  ) 

Set the shape to draw to trigger this gesture.

Definition at line 105 of file kgesture.cpp.

void KShapeGesture::setShapeName ( const QString &  friendlyName  ) 

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

Definition at line 146 of file kgesture.cpp.

QString KShapeGesture::shapeName (  )  const

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

Definition at line 152 of file kgesture.cpp.

QString KShapeGesture::toString (  )  const

Return a string representation of this gesture.

Return empty string if invalid. This function is mainly for use with config files.

See also:
shapeName()

Definition at line 164 of file kgesture.cpp.

QByteArray KShapeGesture::toSvg ( const QString &  attributes = QString()  )  const

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.

Definition at line 184 of file kgesture.cpp.


The documentation for this class was generated from the following files:
  • kgesture.h
  • kgesture.cpp

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal