#include <pointers.h>
Public Member Functions | |
| void | setMouse (const QString &) |
| void | setMouse (const QString &, const QString &) |
| void | enableWheelEmulation (int) |
| void | disableWheelEmulation (void) |
| void | enable3ButtonEmulation (void) |
| void | disable3ButtonEmulation (void) |
| void | enableWheel (void) |
| void | enableWheelOn (int, int) |
| void | disableWheel (void) |
| void | enableXAxisInvertation (void) |
| void | enableYAxisInvertation (void) |
| void | disableXAxisInvertation (void) |
| void | disableYAxisInvertation (void) |
| void | enableLeftHandMapping (void) |
| void | disableLeftHandMapping (void) |
| QList< QString > | getMouseList (void) |
| QList< QString > | getMouseVendorList (void) |
| QList< QString > | getMouseModelList (const QString &) |
| QDict< QString > | getMouseData (const QString &) |
| QDict< QString > | getMouseData (const QString &, const QString &) |
| int | getWheelEmulatedButton (void) |
| bool | isWheelEnabled (void) |
| bool | isWheelEmulated (void) |
| bool | isButtonEmulated (void) |
| bool | isXAxisInverted (void) |
| bool | isYAxisInverted (void) |
| bool | isLeftHandEnabled (void) |
| bool | isMouse (void) |
| SaXManipulateMice (SaXImport *, int=1) | |
The mice manipulator requires one import object (Pointers) to become created. Once created the manipulator object is able to get/set standard mouse configuration information like wheel and button handling. The following example demonstrate how to disable the mouse wheel.
#include <sax/sax.h> int main (void) { SaXException().setDebug (true); QDict<SaXImport> section; printf ("Importing data...\n"); SaXConfig* config = new SaXConfig; SaXImport* import = new SaXImport ( SAX_POINTERS ); import->setSource ( SAX_SYSTEM_CONFIG ); import->doImport(); config->addImport (import); section.insert ( import->getSectionName(),import ); printf ("Disable core pointer mouse wheel...\n"); SaXManipulateMice mMouse ( section["Pointers"] ); if (mMouse.selectPointer (SAX_CORE_POINTER)) { if (mMouse.wheelEnabled()) { mMouse.disableWheel(); } } printf ("Writing configuration\n"); config->setMode (SAX_MERGE); if ( ! config->createConfiguration() ) { printf ("%s\n",config->errorString().ascii()); printf ("%s\n",config->getParseErrorValue().ascii()); return 1; } return 0; }
Definition at line 204 of file pointers.h.
| SaX::SaXManipulateMice::SaXManipulateMice | ( | SaXImport * | in, | |
| int | ptr = 1 | |||
| ) |
An object of this type is used to configure simple mouse pointer devices
Definition at line 312 of file pointers.cpp.
| void SaX::SaXManipulateMice::setMouse | ( | const QString & | group | ) | [virtual] |
set all mouse data associated with the given group name to the current pointer data. The group name consists of the vendor and model name separated by a colon
Implements SaX::SaXManipulateMiceIF.
Definition at line 747 of file pointers.cpp.
References SaX::SaXException::errorString(), SaX::SaXException::excCDBRecordNotFound(), SaX::SaXManipulatePointers::mImport, and SaX::SaXManipulatePointers::mPointer.
Referenced by setMouse().
| void SaX::SaXManipulateMice::setMouse | ( | const QString & | vendor, | |
| const QString & | model | |||
| ) | [virtual] |
set all mouse data associated with the given vendor and model name to the current pointer data.
Implements SaX::SaXManipulateMiceIF.
Definition at line 790 of file pointers.cpp.
References setMouse().
| void SaX::SaXManipulateMice::enableWheelEmulation | ( | int | btn | ) | [virtual] |
for mice without a wheel one button can be set to emulate a wheel while pressed. This method will setup the wheel emulation on button (btn)
Implements SaX::SaXManipulateMiceIF.
Definition at line 325 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
| void SaX::SaXManipulateMice::disableWheelEmulation | ( | void | ) | [virtual] |
release the wheel emulation button used for emulating a wheel. This is done by removing the EmulateWheel item completely
Implements SaX::SaXManipulateMiceIF.
Definition at line 342 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
| void SaX::SaXManipulateMice::enable3ButtonEmulation | ( | void | ) | [virtual] |
for mice with only two buttons the third button can be emulated by pressing both the left and right button simultaneously
Implements SaX::SaXManipulateMiceIF.
Definition at line 357 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
| void SaX::SaXManipulateMice::disable3ButtonEmulation | ( | void | ) | [virtual] |
disable the emulation of the third mouse button
Implements SaX::SaXManipulateMiceIF.
Definition at line 372 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
| void SaX::SaXManipulateMice::enableWheel | ( | void | ) | [virtual] |
enable the mouse wheel. This function assumes that the wheel is mapped to the buttons 4 and 5 which is in almost all cases true even for mice with more than 3 buttons
Implements SaX::SaXManipulateMiceIF.
Definition at line 385 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
| void SaX::SaXManipulateMice::enableWheelOn | ( | int | b1, | |
| int | b2 | |||
| ) | [virtual] |
enable the mouse wheel. This function uses b1 and b2 as buttons to map the wheel on
Implements SaX::SaXManipulateMiceIF.
Definition at line 401 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
| void SaX::SaXManipulateMice::disableWheel | ( | void | ) | [virtual] |
disable the mouse wheel. The X-Server will report the events as button events without a Z-axs
Implements SaX::SaXManipulateMiceIF.
Definition at line 445 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
| void SaX::SaXManipulateMice::enableXAxisInvertation | ( | void | ) | [virtual] |
enable the mouse X axis invertation by setting the option InvX entry to on
Implements SaX::SaXManipulateMiceIF.
Definition at line 417 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
| void SaX::SaXManipulateMice::enableYAxisInvertation | ( | void | ) | [virtual] |
enable the mouse Y axis invertation by setting the option InvY entry to on
Implements SaX::SaXManipulateMiceIF.
Definition at line 431 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
| void SaX::SaXManipulateMice::disableXAxisInvertation | ( | void | ) | [virtual] |
disable the mouse X axis invertation by removing the option InvX entry
Implements SaX::SaXManipulateMiceIF.
Definition at line 459 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
| void SaX::SaXManipulateMice::disableYAxisInvertation | ( | void | ) | [virtual] |
disable the mouse Y axis invertation by removing the option InvY entry
Implements SaX::SaXManipulateMiceIF.
Definition at line 473 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
| void SaX::SaXManipulateMice::enableLeftHandMapping | ( | void | ) | [virtual] |
Activate the left hand button mapping for the core pointer This is done by adding the option ButtonMapping
Implements SaX::SaXManipulateMiceIF.
Definition at line 487 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
| void SaX::SaXManipulateMice::disableLeftHandMapping | ( | void | ) | [virtual] |
Deactivate the left hand button mapping for the core pointer This is done by removing the ButtonMapping option
Implements SaX::SaXManipulateMiceIF.
Definition at line 501 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
| QList< QString > SaX::SaXManipulateMice::getMouseList | ( | void | ) | [virtual] |
retrieve a list of supported standard mouse groups. Each item contains the vendor and the model in its name separated by a colon
Implements SaX::SaXManipulateMiceIF.
Definition at line 672 of file pointers.cpp.
Referenced by getMouseModelList(), and getMouseVendorList().
| QList< QString > SaX::SaXManipulateMice::getMouseVendorList | ( | void | ) | [virtual] |
retrieve a list of supported standard mouse vendor names
Implements SaX::SaXManipulateMiceIF.
Definition at line 694 of file pointers.cpp.
References getMouseList().
| QList< QString > SaX::SaXManipulateMice::getMouseModelList | ( | const QString & | vendor | ) | [virtual] |
retrieve a list of supported standard mouse model names
Implements SaX::SaXManipulateMiceIF.
Definition at line 723 of file pointers.cpp.
References getMouseList().
| QDict< QString > SaX::SaXManipulateMice::getMouseData | ( | const QString & | group | ) | [virtual] |
return the mouse data dictionary associated with the given CDB group name.
Implements SaX::SaXManipulateMiceIF.
Definition at line 803 of file pointers.cpp.
Referenced by getMouseData().
| QDict< QString > SaX::SaXManipulateMice::getMouseData | ( | const QString & | vendor, | |
| const QString & | name | |||
| ) | [virtual] |
return the mouse data dictionary associated with the given vendor and model name.
Implements SaX::SaXManipulateMiceIF.
Definition at line 829 of file pointers.cpp.
References getMouseData().
| int SaX::SaXManipulateMice::getWheelEmulatedButton | ( | void | ) | [virtual] |
check if the wheel functions are emulated using a special button which enables the emulation and return the number of this button
Implements SaX::SaXManipulateMiceIF.
Definition at line 656 of file pointers.cpp.
References isWheelEmulated(), and SaX::SaXManipulatePointers::mImport.
| bool SaX::SaXManipulateMice::isWheelEnabled | ( | void | ) | [virtual] |
check if the wheel functions are active. This is done by checking the ZAxisMapping keyword
Implements SaX::SaXManipulateMiceIF.
Definition at line 548 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
| bool SaX::SaXManipulateMice::isWheelEmulated | ( | void | ) | [virtual] |
check if the wheel functions are emulated using a special button which enables the emulation
Implements SaX::SaXManipulateMiceIF.
Definition at line 620 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
Referenced by getWheelEmulatedButton().
| bool SaX::SaXManipulateMice::isButtonEmulated | ( | void | ) | [virtual] |
check if the third button emulation has been activated. This is done by checking the Emulate3Buttons keyword
Implements SaX::SaXManipulateMiceIF.
Definition at line 638 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
| bool SaX::SaXManipulateMice::isXAxisInverted | ( | void | ) | [virtual] |
check if the mouse X axis has been inverted. This is done by checking the InvX keyword
Implements SaX::SaXManipulateMiceIF.
Definition at line 584 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
| bool SaX::SaXManipulateMice::isYAxisInverted | ( | void | ) | [virtual] |
check if the mouse Y axis has been inverted. This is done by checking the InvY keyword
Implements SaX::SaXManipulateMiceIF.
Definition at line 602 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
| bool SaX::SaXManipulateMice::isLeftHandEnabled | ( | void | ) | [virtual] |
check if the left hand mapping is active. This is done by checking the ButtonMapping keyword
Implements SaX::SaXManipulateMiceIF.
Definition at line 566 of file pointers.cpp.
References SaX::SaXManipulatePointers::mImport.
| bool SaX::SaXManipulateMice::isMouse | ( | void | ) | [virtual] |
check if the current device is a simply mouse. this is done by checking the driver name. If the driver "mouse" is used it is a simple device. Any other input devices will set the InputFashion parameter to become checked
Implements SaX::SaXManipulateMiceIF.
Definition at line 515 of file pointers.cpp.
References SaX::SaXManipulatePointers::getDriver(), and SaX::SaXManipulatePointers::mImport.
1.5.3