synaptiks::Touchpad Class Reference

Control and configure a synaptics touchpad. More...

#include <touchpad.h>

List of all members.

Public Types

enum  CircularScrollingTrigger {
  AnyEdgeTrigger = 0, TopEdgeTrigger = 1, TopRightCornerTrigger = 2, RightEdgeTrigger = 3,
  BottomRightCornerTrigger = 4, BottomEdgeTrigger = 5, BottomLeftCornerTrigger = 6, LeftEdgeTrigger = 7,
  TopLeftCornerTrigger = 8
}
 

The touchpad areas, which trigger circular scrolling.

More...
enum  Capability {
  LeftButtonCapability = 0x1, MiddleButtonCapability = 0x2, RightButtonCapability = 0x4, TwoFingersCapability = 0x8,
  ThreeFingersCapability = 0x16
}
 

The touchpad capabilities.

More...

Public Slots

Q_SCRIPTABLE QString name () const
 Return the human-readable name of this touchpad.
Q_SCRIPTABLE bool isOn () const
 Is the touchpad on?
Q_SCRIPTABLE void setOn (bool on)
 Switch the touchpad according to the given parameter.
Q_SCRIPTABLE float minimumSpeed () const
 Return the minimum motion speed.
Q_SCRIPTABLE void setMinimumSpeed (float speed)
 Set the minimum motion speed.
Q_SCRIPTABLE float maximumSpeed () const
 Return the maximum motion speed.
Q_SCRIPTABLE void setMaximumSpeed (float speed)
 Set the maximum motion speed.
Q_SCRIPTABLE float accelerationFactor () const
 Get the acceleration factor.
Q_SCRIPTABLE void setAccelerationFactor (float accel)
 Set the acceleration factor.
Q_SCRIPTABLE bool edgeMotionAlways () const
 Is edge motion always active, or only when dragging?
Q_SCRIPTABLE void setEdgeMotionAlways (bool enabled)
 Enable edge motion for all movements.
Q_SCRIPTABLE bool tapAndDragGesture () const
 Is the tap-and-drag gesture enabled?
Q_SCRIPTABLE void setTapAndDragGesture (bool enabled)
 Enable or disable the tap-and-drag gesture.
Q_SCRIPTABLE bool lockedDrags () const
 Are locked drags enabled?
Q_SCRIPTABLE void setLockedDrags (bool enabled)
 Enable or disable locked drags.
Q_SCRIPTABLE int lockedDragsTimeout () const
 Get the timeout for a lock drag to expire.
Q_SCRIPTABLE void setLockedDragsTimeout (int timeout)
 Set the timeout for a locked drag to expire.
Q_SCRIPTABLE bool circularScrolling () const
 Is circular scrolling enabled?
Q_SCRIPTABLE void setCircularScrolling (bool enabled)
 Enabled or disable circular scrolling.
Q_SCRIPTABLE
CircularScrollingTrigger 
circularScrollingTrigger () const
 Return the part of the touchpad, that triggers circular scrolling.
Q_SCRIPTABLE void setCircularScrollingTrigger (CircularScrollingTrigger trigger)
 Set the trigger for circular scrolling.
Q_SCRIPTABLE float circularScrollingDistance () const
 Return the move angle of the finger to generate a scroll event in circular scrolling mode.
Q_SCRIPTABLE void setCircularScrollingDistance (float angle)
 Set the move angle of the finger to generate a scroll event in circular scrolling mode.
Q_SCRIPTABLE bool horizontalTwoFingerScrolling () const
 Is horizontal two-finger scrolling enabled?
Q_SCRIPTABLE void setHorizontalTwoFingerScrolling (bool enabled)
 Enable or disable horizontal two-finger scrolling.
Q_SCRIPTABLE bool verticalTwoFingerScrolling () const
 Is vertical two-finger scrolling enabled?
Q_SCRIPTABLE void setVerticalTwoFingerScrolling (bool enabled)
 Enable or disable vertical two-finger scrolling.
Q_SCRIPTABLE bool horizontalEdgeScrolling () const
 Is horizontal scrolling at the bottom edge enabled?
Q_SCRIPTABLE void setHorizontalEdgeScrolling (bool enabled)
 Enable or disable horizontal scrolling at the bottom edge.
Q_SCRIPTABLE bool verticalEdgeScrolling () const
 Is vertical scrolling at the right edge enabled?
Q_SCRIPTABLE void setVerticalEdgeScrolling (bool enabled)
 Enable or disable vertical scrolling at the right edge.
Q_SCRIPTABLE bool cornerCoasting () const
 Is corner coasting enabled?
Q_SCRIPTABLE void setCornerCoasting (bool enabled)
 Enable or disable corner coasting.
Q_SCRIPTABLE float coastingSpeed () const
 Get the coasting speed.
Q_SCRIPTABLE void setCoastingSpeed (float speed)
 Set the coasting speed.
Q_SCRIPTABLE int horizontalScrollingDistance () const
 Return the move distance of the finger to generate a horizontal scroll event.
Q_SCRIPTABLE void setHorizontalScrollingDistance (int distance)
 Set the move distance of the finger to generate a horizontal scroll event.
Q_SCRIPTABLE int verticalScrollingDistance () const
 Return the move distance of the finger to generate a vertical scroll event.
Q_SCRIPTABLE void setVerticalScrollingDistance (int distance)
 Set the move distance of the finger to generate a vertical scroll event.
Q_SCRIPTABLE QByteArray cornerButtons () const
 Query the mouse buttons triggered by tapping the touchpad corners.
Q_SCRIPTABLE void setCornerButtons (const QByteArray &buttons)
 Set the mouse buttons triggered by tapping the touchpad corners.
Q_SCRIPTABLE QByteArray fingerButtons () const
 Query the mouse buttons triggered by tapping the touchpad.
Q_SCRIPTABLE void setFingerButtons (const QByteArray &buttons)
 Set the mouse buttons triggered by tapping the touchpad.
Q_SCRIPTABLE bool fastTaps () const
 Whether fast taps are enabled.
Q_SCRIPTABLE void setFastTaps (bool enabled)
 Enable or disable fast taps.
Q_SCRIPTABLE bool circularTouchpad () const
 Whether the touchpad is considered as circular touchpad.
Q_SCRIPTABLE void setCircularTouchpad (bool circular)
 Configure, if the touchpad is circular or not.
Capabilities capabilities () const
 Query the touchpad capabilities.
Q_SCRIPTABLE bool hasLeftButton () const
 Does the touchpad have a left button?
Q_SCRIPTABLE bool hasMiddleButton () const
 Does the touchpad have a middle button?
Q_SCRIPTABLE bool hasRightButton () const
 Does the touchpad have a right button?
Q_SCRIPTABLE int fingerDetection () const
 How many fingers are detected by this touchpad?

Public Member Functions

 ~Touchpad ()

Static Public Member Functions

static TouchpadfindTouchpad (QObject *parent=0)
 Find the touchpad on this system.
static bool isSupported ()
 Check, whether device properties are supported.

Properties

QString name
 The touchpad name.
bool on
 Is the touchpad on?
float minimumSpeed
 The minimum speed of cursor motion.
float maximumSpeed
 The maximum speed of cursor motion.
float accelerationFactor
 The scaling between minimumSpeed and maximumSpeed.
bool edgeMotionAlways
 Use edge motion always.
bool tapAndDragGesture
 Enable or disable the tap-and-drag gesture.
bool lockedDrags
 Continue a tap-and-drag gesture after releasing the finger.
int lockedDragsTimeout
 The timeout of locked drag mode in milliseconds.
bool circularScrolling
 Whether circular scrolling is enabled or not.
CircularScrollingTrigger circularScrollingTrigger
 The touchpad area, which triggers circular scrolling.
float circularScrollingDistance
 Move angle in radians of the finger to generate a scrolling event in circular scrolling mode.
bool horizontalTwoFingerScrolling
 Whether horizontal scrolling with two fingres is enabled or not.
bool verticalTwoFingerScrolling
 Whether vertical scrolling with two fingres is enabled or not.
bool horizontalEdgeScrolling
 Whether horizontal scrolling at the bottom edge of the touchpad is enabled or not.
bool verticalEdgeScrolling
 Whether vertical scrolling at the right edge of the touchpad is enabled or not.
bool cornerCoasting
 Whether corner coasting is enabled or not.
float coastingSpeed
 The threshold speed (in scrolling events per second) for conventional coasting.
int horizontalScrollingDistance
 The speed of horizontal scrolling.
int verticalScrollingDistance
 The speed of vertical scrolling.
QByteArray cornerButtons
 The mouse buttons triggered by tapping the touchpad corner.
QByteArray fingerButtons
 The mouse buttons triggered by tapping the touchpad with a given amount of fingers concurrently.
bool fastTaps
 Whether or not fast tapping is enabled.
bool circularTouchpad
 Whether or not the touchpad is considered as circular touchpad.
Capabilities capabilities
 The capabilities of the touchpad.
bool hasLeftButton
 Whether this touchpad provides a left mouse button.
bool hasMiddleButton
 Whether this touchpad provides a middle mouse button.
bool hasRightButton
 Whether this touchpad provides a right mouse button.
int fingerDetection
 How many fingers are detected by the touchpad.

Detailed Description

Control and configure a synaptics touchpad.

Usage

This class uses input device properties to access the touchpad, which are supported as of Xorg 1.6.

Usage is quite simple, just create an object of this class:

 Touchpad *touchpad = Touchpad::findTouchpad(parent);
 if (touchpad) {
     # a touchpad was found, use it
 }

If a touchpad was found, you can easily access and change its properties, but be sure to catch errors! The Touchpad class simply passes errors from QXDevice to the caller, so handle QXDeviceError and its subclasses:

 try {
     touchpad->setOn(true);
     touchpad->setCircularScrolling(true);
     kDebug() << "your touchpad supports" << touchpad->fingerDetection()
              << "fingers";
 } catch (const QXDeviceError &error) {
     kWarning() << error.toString();
 }

D-Bus

All members marked as Q_SCRIPTABLE (except properties, which are not exported) are exported on D-Bus on the interface org.kde.Touchpad. The adaptor catches all QXDeviceError exceptions and turns them into the D-Bus error org.kde.TouchpadError. The error message is the same as for QXDeviceError::toString().


Member Enumeration Documentation

The touchpad capabilities.

Enumerator:
LeftButtonCapability 

The touchpad has a left button

MiddleButtonCapability 

The touchpad has a middle button

RightButtonCapability 

The touchpad has a right button

TwoFingersCapability 

The touchpad can detect two fingers

ThreeFingersCapability 

The touchpad can detect three fingers

The touchpad areas, which trigger circular scrolling.

Enumerator:
AnyEdgeTrigger 

Any edge

TopEdgeTrigger 

Top edge

TopRightCornerTrigger 

Top right corner

RightEdgeTrigger 

Right edge

BottomRightCornerTrigger 

Bottom right corner

BottomEdgeTrigger 

Bottom edge

BottomLeftCornerTrigger 

Bottom left corner

LeftEdgeTrigger 

Left edge

TopLeftCornerTrigger 

Top left corner


Constructor & Destructor Documentation

Touchpad::~Touchpad (  ) 

Destroy this instance.


Member Function Documentation

Q_SCRIPTABLE float synaptiks::Touchpad::accelerationFactor (  )  const [slot]

Get the acceleration factor.

Returns:
the acceleration factor
See also:
accelerationFactor
Capabilities synaptiks::Touchpad::capabilities (  )  const [slot]

Query the touchpad capabilities.

The returns a combination of flags, which indicate the touchpad capabilities.

Returns:
the capabilities
Exceptions:
QXNoSuchPropertyError when used with synaptics 1.0, which does not report capabilities
Q_SCRIPTABLE bool synaptiks::Touchpad::circularScrolling (  )  const [slot]

Is circular scrolling enabled?

Returns:
true, if circular scrolling is enabled, false otherwise
See also:
circularScrolling
Q_SCRIPTABLE float synaptiks::Touchpad::circularScrollingDistance (  )  const [slot]

Return the move angle of the finger to generate a scroll event in circular scrolling mode.

Returns:
the move angle in radians
See also:
circularScrollingDistance
Q_SCRIPTABLE CircularScrollingTrigger synaptiks::Touchpad::circularScrollingTrigger (  )  const [slot]

Return the part of the touchpad, that triggers circular scrolling.

Returns:
the trigger
See also:
circularScrollingTrigger
Q_SCRIPTABLE bool synaptiks::Touchpad::circularTouchpad (  )  const [slot]

Whether the touchpad is considered as circular touchpad.

Returns:
true, if the touchpad is circular, false otherwise
See also:
circularTouchpad
Q_SCRIPTABLE float synaptiks::Touchpad::coastingSpeed (  )  const [slot]

Get the coasting speed.

If this returns 0, coasting is completely disabled, including corner coasting.

Returns:
the coasting speed in scroll events per second, or -1 in case of an error.
See also:
coastingSpeed
Q_SCRIPTABLE QByteArray synaptiks::Touchpad::cornerButtons (  )  const [slot]

Query the mouse buttons triggered by tapping the touchpad corners.

In case of an error the returned list is empty. Otherwise it is guaranteed to contain four items.

Returns:
a list of buttons, empty in case of error.
See also:
cornerButtons
Q_SCRIPTABLE bool synaptiks::Touchpad::cornerCoasting (  )  const [slot]

Is corner coasting enabled?

Returns:
true, if corner coasting is enabled, false otherwise
See also:
cornerCoasting
Q_SCRIPTABLE bool synaptiks::Touchpad::edgeMotionAlways (  )  const [slot]

Is edge motion always active, or only when dragging?

Returns:
true, if edge motion is always active, or false, if it is only active when dragging.
See also:
edgeMotionAlways
Q_SCRIPTABLE bool synaptiks::Touchpad::fastTaps (  )  const [slot]

Whether fast taps are enabled.

Returns:
true, if fast taps are enabled, false otherwise
See also:
fastTaps
Touchpad * Touchpad::findTouchpad ( QObject *  parent = 0  )  [static]

Find the touchpad on this system.

If the system doesn't provide a configurable touchpad, a null pointer is returned. This happens, if there is no physical touchpad on this system, if the touchpad is not controlled by the synaptics driver or if the driver is too old.

Parameters:
parent the parent object
Returns:
A synaptiks::Touchpad instance representing the installed touchpad or NULL, if there is no touchpad.
Q_SCRIPTABLE QByteArray synaptiks::Touchpad::fingerButtons (  )  const [slot]

Query the mouse buttons triggered by tapping the touchpad.

In case of an error the returned list is empty. Otherwise it is guaranteed to contain three items.

Returns:
a list of buttons, empty in case of error
See also:
fingerButtons
Q_SCRIPTABLE int synaptiks::Touchpad::fingerDetection (  )  const [slot]

How many fingers are detected by this touchpad?

Returns:
the amount of fingers, which can be detected
Exceptions:
QXNoSuchPropertyError when used with synaptics 1.0, which does not report capabilities
Q_SCRIPTABLE bool synaptiks::Touchpad::hasLeftButton (  )  const [slot]

Does the touchpad have a left button?

Returns:
true, if the touchpad has a left button, false otherwise
Exceptions:
QXNoSuchPropertyError when used with synaptics 1.0, which does not report capabilities
Q_SCRIPTABLE bool synaptiks::Touchpad::hasMiddleButton (  )  const [slot]

Does the touchpad have a middle button?

Returns:
true, if the touchpad has a middle button, false otherwise
Exceptions:
QXNoSuchPropertyError when used with synaptics 1.0, which does not report capabilities
Q_SCRIPTABLE bool synaptiks::Touchpad::hasRightButton (  )  const [slot]

Does the touchpad have a right button?

Returns:
true, if the touchpad has a right button, false otherwise
Exceptions:
QXNoSuchPropertyError when used with synaptics 1.0, which does not report capabilities
Q_SCRIPTABLE bool synaptiks::Touchpad::horizontalEdgeScrolling (  )  const [slot]

Is horizontal scrolling at the bottom edge enabled?

Returns:
true, if horizontal edge scrolling is enabled, false otherwise.
See also:
horizontalEdgeScrolling
Q_SCRIPTABLE int synaptiks::Touchpad::horizontalScrollingDistance (  )  const [slot]

Return the move distance of the finger to generate a horizontal scroll event.

Returns:
the move distance for a horizontal scroll event
See also:
horizontalScrollingDistance
Q_SCRIPTABLE bool synaptiks::Touchpad::horizontalTwoFingerScrolling (  )  const [slot]

Is horizontal two-finger scrolling enabled?

Returns:
true, if horizontal two-finger scrolling is enabled, false otherwise.
See also:
horizontalTwoFingerScrolling
bool Touchpad::isOn (  )  const [slot]

Is the touchpad on?

Returns:
true, if the touchpad is on, false otherwise
See also:
on
bool Touchpad::isSupported (  )  [static]

Check, whether device properties are supported.

This class will not work, if false is returned!

Returns:
true, if properties are supported, false otherwise
Q_SCRIPTABLE bool synaptiks::Touchpad::lockedDrags (  )  const [slot]

Are locked drags enabled?

Returns:
true, if locked drags are enabled, false otherwise
See also:
lockedDrags
Q_SCRIPTABLE int synaptiks::Touchpad::lockedDragsTimeout (  )  const [slot]

Get the timeout for a lock drag to expire.

Returns:
the timeout in milliseconds
See also:
lockedDragsTimeout
Q_SCRIPTABLE float synaptiks::Touchpad::maximumSpeed (  )  const [slot]

Return the maximum motion speed.

Returns:
the maximum motion speed
See also:
maximumSpeed
Q_SCRIPTABLE float synaptiks::Touchpad::minimumSpeed (  )  const [slot]

Return the minimum motion speed.

Returns:
the minimum motion speed
See also:
minimumSpeed
Q_SCRIPTABLE QString synaptiks::Touchpad::name (  )  const [slot]

Return the human-readable name of this touchpad.

Returns:
the product name of the touchpad
See also:
name
void Touchpad::setAccelerationFactor ( float  accel  )  [slot]

Set the acceleration factor.

Parameters:
accel the acceleration factor
See also:
accelerationFactor
void Touchpad::setCircularScrolling ( bool  enabled  )  [slot]

Enabled or disable circular scrolling.

Parameters:
enabled if true, enable circular scrolling, otherwise disable it.
Returns:
true, if successful, false otherwise
See also:
circularScrolling
void Touchpad::setCircularScrollingDistance ( float  angle  )  [slot]

Set the move angle of the finger to generate a scroll event in circular scrolling mode.

Parameters:
angle the move angle in radians
See also:
circularScrollingDistance
void Touchpad::setCircularScrollingTrigger ( CircularScrollingTrigger  trigger  )  [slot]

Set the trigger for circular scrolling.

Parameters:
trigger the trigger
Returns:
true, if successful, false otherwise
See also:
circularScrollingTrigger
void Touchpad::setCircularTouchpad ( bool  circular  )  [slot]

Configure, if the touchpad is circular or not.

Parameters:
circular if true, the touchpad is considered as circular touchpad by the driver, if false, the touchpad is considered as rectangular touchpad.
See also:
circularTouchpad
void Touchpad::setCoastingSpeed ( float  speed  )  [slot]

Set the coasting speed.

Parameters:
speed the coasting speed in scroll events per second
Returns:
true, if successful, false otherwise.
See also:
coastingSpeed
void Touchpad::setCornerButtons ( const QByteArray &  buttons  )  [slot]

Set the mouse buttons triggered by tapping the touchpad corners.

The list of buttons must have at least four elements, less elements cause an error, more elements are silently ignored.

Parameters:
buttons the list of buttons
Returns:
true, if successful, false otherwise.
See also:
cornerButtons
void Touchpad::setCornerCoasting ( bool  enabled  )  [slot]

Enable or disable corner coasting.

Parameters:
enabled if true, enable corner coasting, otherwise disable it
Returns:
true, if successful, false otherwise.
See also:
cornerCoasting
void Touchpad::setEdgeMotionAlways ( bool  enabled  )  [slot]

Enable edge motion for all movements.

Parameters:
enabled if true, edge motion will always be active, if false, edge motion is only used when dragging
See also:
edgeMotionAlways
void Touchpad::setFastTaps ( bool  enabled  )  [slot]

Enable or disable fast taps.

Parameters:
enabled If true, enable fast taps, otherwise disable them.
See also:
fastTaps
void Touchpad::setFingerButtons ( const QByteArray &  buttons  )  [slot]

Set the mouse buttons triggered by tapping the touchpad.

The list of buttons must have at least three elements, less elements cause an error, more elements are silently ignored.

Parameters:
buttons the list of buttons
Returns:
true, if successful, false otherwise.
See also:
fingerButtons
void Touchpad::setHorizontalEdgeScrolling ( bool  enabled  )  [slot]

Enable or disable horizontal scrolling at the bottom edge.

Parameters:
enabled if true, enable horizontal edge scrolling, otherweise disable it.
Returns:
true, if successful, false otherwise.
See also:
horizontalEdgeScrolling
void Touchpad::setHorizontalScrollingDistance ( int  distance  )  [slot]

Set the move distance of the finger to generate a horizontal scroll event.

Parameters:
distance the move distance for a horizontal scroll event
See also:
horizontalScrollingDistance
void Touchpad::setHorizontalTwoFingerScrolling ( bool  enabled  )  [slot]

Enable or disable horizontal two-finger scrolling.

Parameters:
enabled if true, enable horizontal two-finger scrolling, otherwise disable it
See also:
horizontalTwoFingerScrolling
void Touchpad::setLockedDrags ( bool  enabled  )  [slot]

Enable or disable locked drags.

Parameters:
enabled if true, enable locked drags, otherwise disable them
See also:
lockedDrags
void Touchpad::setLockedDragsTimeout ( int  timeout  )  [slot]

Set the timeout for a locked drag to expire.

Parameters:
timeout the timeout in milliseconds
See also:
lockedDragsTimeout
void Touchpad::setMaximumSpeed ( float  speed  )  [slot]

Set the maximum motion speed.

Parameters:
speed the speed value
See also:
maximumSpeed
void Touchpad::setMinimumSpeed ( float  speed  )  [slot]

Set the minimum motion speed.

Parameters:
speed the speed value
See also:
minimumSpeed
void Touchpad::setOn ( bool  on  )  [slot]

Switch the touchpad according to the given parameter.

Parameters:
on if true, switch the touchpad on, otherwise switch it off.
Returns:
true, if successful, false otherwise
See also:
on
void Touchpad::setTapAndDragGesture ( bool  enabled  )  [slot]

Enable or disable the tap-and-drag gesture.

Parameters:
enabled if true, enable the gesture, otherwise disable it
See also:
tapAndDragGesture
void Touchpad::setVerticalEdgeScrolling ( bool  enabled  )  [slot]

Enable or disable vertical scrolling at the right edge.

Parameters:
enabled if true, enable vertical edge scrolling, otherweise disable it.
Returns:
true, if successful, false otherwise.
See also:
verticalEdgeScrolling
void Touchpad::setVerticalScrollingDistance ( int  distance  )  [slot]

Set the move distance of the finger to generate a vertical scroll event.

Parameters:
distance the move distance for a vertical scroll event
See also:
verticalScrollingDistance
void Touchpad::setVerticalTwoFingerScrolling ( bool  enabled  )  [slot]

Enable or disable vertical two-finger scrolling.

Parameters:
enabled if true, enable vertical two-finger scrolling, otherwise disable it
See also:
verticalTwoFingerScrolling
Q_SCRIPTABLE bool synaptiks::Touchpad::tapAndDragGesture (  )  const [slot]

Is the tap-and-drag gesture enabled?

Returns:
true, if the tap-and-drag gesture is enabled, false otherwise
See also:
tapAndDragGesture
Q_SCRIPTABLE bool synaptiks::Touchpad::verticalEdgeScrolling (  )  const [slot]

Is vertical scrolling at the right edge enabled?

Returns:
true, if vertical edge scrolling is enabled, false otherwise.
See also:
verticalEdgeScrolling
Q_SCRIPTABLE int synaptiks::Touchpad::verticalScrollingDistance (  )  const [slot]

Return the move distance of the finger to generate a vertical scroll event.

Returns:
the move distance for a vertical scroll event
See also:
verticalScrollingDistance
Q_SCRIPTABLE bool synaptiks::Touchpad::verticalTwoFingerScrolling (  )  const [slot]

Is vertical two-finger scrolling enabled?

Returns:
true, if vertical two-finger scrolling is enabled, false otherwise.
See also:
verticalTwoFingerScrolling

Property Documentation

float Touchpad::accelerationFactor [read, write]

The scaling between minimumSpeed and maximumSpeed.

This property defines, how the pointer is accelerated between minimumSpeed and maximumSpeed as the finger speed increases on the touchpad.

If minimumSpeed and maximumSpeed have the same value, acceleration is disabled, and this property has no effect.

See also:
setAccelerationFactor(float)
accelerationFactor() const
minimumSpeed
maximumSpeed
Touchpad::Capabilities Touchpad::capabilities [read]

The capabilities of the touchpad.

This property provides a combination of Capability flags, which indicate the capabilities of this touchpad.

Warning:

synaptics supports capabilities reporting as of 1.1. With synaptics 1.0 access to this property raises QXNoSuchPropertyError.

See also:
capabilities() const
hasLeftButton
hasMiddleButton
hasRightButton
fingerDetection
bool Touchpad::circularScrolling [read, write]

Whether circular scrolling is enabled or not.

If circular scrolling is enabled, the user can scroll by moving the finger in circles over the touchpad.

See also:
setCircularScrolling(bool)
circularScrolling() const
circularScrollingTrigger
circularScrollingDistance
float Touchpad::circularScrollingDistance [read, write]

Move angle in radians of the finger to generate a scrolling event in circular scrolling mode.

This property defines, by which angle the finger needs to move in circular scrolling mode for a scroll event to be generated. The smaller this value is, the more scroll events are generated for a specific move angle of the finger and the faster circular scrolling gets.

See also:
setCircularScrollingDistance(float)
circularScrollingDistance() const
circularScrolling
circularScrollingTrigger
Touchpad::CircularScrollingTrigger Touchpad::circularScrollingTrigger [read, write]

The touchpad area, which triggers circular scrolling.

To avoid interference with normal movements, circular movements of across the touchpad don't result in any scrolling, even is circularScrolling is true. Instead, the user has to move his finger into a certain touchpad area to trigger circular scrolling.

See also:
setCircularScrollingTrigger(CircularScrollingTrigger)
circularScrollingTrigger() const
circularScrolling
circularScrollingDistance
bool Touchpad::circularTouchpad [read, write]

Whether or not the touchpad is considered as circular touchpad.

If this property is true, the touchpad drivers considered the touchpad as circular pad and adjusts edges and coordinates accordingly.

The driver does not detect circular touchpads automatically, therefore this property must be set manually, if a circular touchpad is present.

See also:
setCircularTouchpad(bool)
circularTouchpad() const
float Touchpad::coastingSpeed [read, write]

The threshold speed (in scrolling events per second) for conventional coasting.

Setting this to a non-zero positive value enables coasting. Coasting comes in two different flavors:

Conventional coasting is used, if cornerCoasting is false. In this case, edge scrolling continues with the current scrolling speed, if the finger leaves the touchpad, while the current scrolling speed is above the value of this property. If the finger touches the touchpad again, scrolling is stopped.

However, if cornerCoasting is true, corner coasting is used. See cornerCoasting for a description of corner coasting.

If this property is 0, coasting is completely disabled, regardless of the value of cornerCoasting.

See also:
setCoastingSpeed(float)
coastingSpeed() const
verticalEdgeScrolling
horizontalEdgeScrolling
cornerCoasting
QByteArray Touchpad::cornerButtons [read, write]

The mouse buttons triggered by tapping the touchpad corner.

This property has four elements, interpreted as follows:

  • index 0: Top right corner
  • index 1: Bottom right corner
  • index 2: Top left corner
  • index 3: Bottom left corner

Each element is a numeric value of a mouse button. These are excatly the same the xserver sends to client applications, and that you can monitor with tools like xev. The following values are the most interesting:

  • value 1: Left mouse button
  • value 2: Middle mouse button
  • value 3: Right mouse button

A value of 0 disables any special button set for the corresponding corner. Tapping this corner will be interpreted according to the fingerButtons setting.

For instance, the list (3, 0, 2, 0) will have the following effects:

  • Tapping the top right corner is like pressing the right mouse button.
  • Tapping the top left corner is like pressing the middle mouse button
  • When tapping any of the bottom corners, nothing special will happen.
See also:
setCornerButtons(const QByteArray&)
cornerButtons() const
fingerButtons
bool Touchpad::cornerCoasting [read, write]

Whether corner coasting is enabled or not.

If corner coasting is enabled, edge scrolling will continue as long as the finger remains in an edge corner.

Note:

Setting this to true doesn't mean, that the user can really use corner coasting. The driver only really enables corner coasting, if this property is true and coastingSpeed is not 0.

See also:
setCornerCoasting(bool)
cornerCoasting() const
verticalEdgeScrolling
horizontalEdgeScrolling
coastingSpeed
bool Touchpad::edgeMotionAlways [read, write]

Use edge motion always.

Cursor movement continues, if the finger hits the touchpad edge. This feature is called "edge motion". By default, it is only active when dragging. If this property is set to true, edge motion is always active, even for normal movement.

See also:
setEdgeMotionAlways(bool)
edgeMotionAlways() const
bool Touchpad::fastTaps [read, write]

Whether or not fast tapping is enabled.

Fast tapping makes the driver react faster on single taps, but slower to double clicks caused by tapping.

See also:
setFastTaps(bool)
fastTaps() const
QByteArray Touchpad::fingerButtons [read, write]

The mouse buttons triggered by tapping the touchpad with a given amount of fingers concurrently.

The list has three elements, interpreted as follows:

  • index 0: Tapping the touchpad with one finger
  • index 1: Tapping the touchpad with two fingers
  • index 2: Tapping the touchpad with three fingers

Each element is a numeric value of a mouse button. These are excatly the same the xserver sends to client applications, and that you can monitor with tools like xev. The following values are the most interesting:

  • value 1: Left mouse button
  • value 2: Middle mouse button
  • value 3: Right mouse button

A value of 0 disables taps with the corresponding amount of fingers.

For instance, the list (1, 3, 0) will have the following effects:

  • Tapping with one finger is like pressing the left mouse button.
  • Tapping with two fingers is like pressing the right mouse button.
  • When tapping the touchpad with three fingers, nothing will happen.
Note:

Multiple finger taps require special hardware support, which is not provided by all touchpads. Use capabilities or fingerDetection to check, how well the touchpad support multiple finger taps.

See also:
setFingerButtons(const QByteArray&)
fingerButtons() const
capabilities
fingerDetection
cornerButtons
int Touchpad::fingerDetection [read]

How many fingers are detected by the touchpad.

Some touchpads provide support for detecting taps with multiple fingers. If such a touchpad is used, this property provides the amount of fingers, which are detected. Otherwise this property just returns 1.

Warning:

synaptics supports capabilities reporting as of 1.1. With synaptics 1.0 access to this property raises QXNoSuchPropertyError.

See also:
fingerDetection() const
capabilities
bool Touchpad::hasLeftButton [read]

Whether this touchpad provides a left mouse button.

Warning:

synaptics supports capabilities reporting as of 1.1. With synaptics 1.0 access to this property raises QXNoSuchPropertyError.

See also:
hasLeftButton() const
hasMiddleButton
hasRightButton
capabilities
bool Touchpad::hasMiddleButton [read]

Whether this touchpad provides a middle mouse button.

Note:

synaptics supports capabilities reporting as of 1.1. With synaptics 1.0 access to this property causes an error.

See also:
hasMiddleButton() const
hasLeftButton
hasRightButton
capabilities
bool Touchpad::hasRightButton [read]

Whether this touchpad provides a right mouse button.

Warning:

synaptics supports capabilities reporting as of 1.1. With synaptics 1.0 access to this property raises QXNoSuchPropertyError.

See also:
hasRightButton() const
hasLeftButton
hasMiddleButton
capabilities
bool Touchpad::horizontalEdgeScrolling [read, write]

Whether horizontal scrolling at the bottom edge of the touchpad is enabled or not.

See also:
setHorizontalEdgeScrolling(bool)
horizontalEdgeScrolling() const
verticalEdgeScrolling
cornerCoasting
coastingSpeed
int Touchpad::horizontalScrollingDistance [read, write]

The speed of horizontal scrolling.

This property holds the move distance of the finger to generate a single horizontal scroll event.

See also:
setHorizontalScrollingDistance(int)
horizontalScrollingDistance() const
horizontalEdgeScrolling
horizontalTwoFingerScrolling
bool Touchpad::horizontalTwoFingerScrolling [read, write]

Whether horizontal scrolling with two fingres is enabled or not.

If this property is true, one can scroll horizontally by dragging with two fingers anywhere on the touchpad.

See also:
setHorizontalTwoFingerScrolling(bool)
horizontalTwoFingerScrolling() const
verticalTwoFingerScrolling
bool Touchpad::lockedDrags [read, write]

Continue a tap-and-drag gesture after releasing the finger.

If this property is false, a tap-and-drag gesture ends, when the finger is released from the touchpad (just like drags end, when the mouse button is released). By setting this property to true, the gesture continues even after releasing the finger until the touchpad is tapped again or lockedDragsTimeout expires.

See also:
setLockedDrags(bool)
lockedDrags() const
tapAndDragGesture
lockedDragsTimeout
int Touchpad::lockedDragsTimeout [read, write]

The timeout of locked drag mode in milliseconds.

If this timeout expires in locked drag mode, the tap-and-drag gesture will automatically end, even if the touchpad was not yet tapped.

If lockedDrags is false, this property has no effect.

See also:
setLockedDragsTimeout(int)
lockedDragsTimeout() const
tapAndDragGesture
lockedDrags
float Touchpad::maximumSpeed [read, write]

The maximum speed of cursor motion.

This property defines the scaling between touchpad coordinates and screen coordinates at fast finger movement. In other words, if the finger is moved very fast across the touchpad, this value will be used to scale touchpad coordinates to screen coordinates.

See also:
setMaximumSpeed(float)
maximumSpeed() const
minimumSpeed
accelerationFactor
float Touchpad::minimumSpeed [read, write]

The minimum speed of cursor motion.

This property defines the scaling between touchpad coordinates and screen coordinates at slow finger movement. In other words, if the finger is moved very slow across the touchpad, this value will be used to scale touchpad coordinates to screen coordinates.

See also:
setMinimumSpeed(float)
minimumSpeed() const
maximumSpeed
accelerationFactor
QString Touchpad::name [read]

The touchpad name.

See also:
name() const
bool synaptiks::Touchpad::on [read, write]

Is the touchpad on?

See also:
setOn(bool)
isOn() const
bool Touchpad::tapAndDragGesture [read, write]

Enable or disable the tap-and-drag gesture.

The tap-and-drag gesture provides an alternative way of dragging. A tap-and-drag gesture is performed by tapping the touchpad, and then immediately touching the touchpad and moving the finger on it. With this gesture, items can be dragged by tapping only, without using the mouse buttons of the touchpad.

See also:
setTapAndDragGesture(bool)
tapAndDragGesture() const
lockedDrags
lockedDragsTimeout
bool Touchpad::verticalEdgeScrolling [read, write]

Whether vertical scrolling at the right edge of the touchpad is enabled or not.

See also:
setVerticalEdgeScrolling(bool)
verticalEdgeScrolling() const
horizontalEdgeScrolling
cornerCoasting
coastingSpeed
int Touchpad::verticalScrollingDistance [read, write]

The speed of vertical scrolling.

This property holds the move distance of the finger to generate a single vertical scroll event.

See also:
setVerticalScrollingDistance(int)
verticalScrollingDistance() const
verticalEdgeScrolling
verticalTwoFingerScrolling
bool Touchpad::verticalTwoFingerScrolling [read, write]

Whether vertical scrolling with two fingres is enabled or not.

If this property is true, one can scroll vertically by dragging with two fingers anywhere on the touchpad.

See also:
setVerticalTwoFingerScrolling(bool)
verticalTwoFingerScrolling() const
horizontalTwoFingerScrolling

The documentation for this class was generated from the following files:
 All Classes Files Functions Typedefs Enumerations Enumerator Properties
Generated on Tue Apr 20 13:25:22 2010 for synaptiks by  doxygen 1.6.3