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

KDEUI

Public Member Functions | List of all members
KShapeGesture Class Reference

#include <kgesture.h>

Public Member Functions

 KShapeGesture ()
 
 KShapeGesture (const QPolygon &shape)
 
 KShapeGesture (const QString &description)
 
 KShapeGesture (const KShapeGesture &other)
 
 ~KShapeGesture ()
 
float distance (const KShapeGesture &other, float abortThreshold) const
 
uint hashable () const
 
bool isValid () const
 
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
 

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
shapeshape 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
descriptioncreate gesture according to this

Definition at line 63 of file kgesture.cpp.

KShapeGesture::KShapeGesture ( const KShapeGesture &  other)

Copies the given gesture.

Parameters
othergesture 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
attributesSVG 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
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal