SaX::SaXManipulateMice Class Reference

SaX2 - Mouse manipulator class. More...

#include <pointers.h>

Inheritance diagram for SaX::SaXManipulateMice:
[legend]

List of all members.

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 &)
Q3Dict< QString > getMouseData (const QString &)
Q3Dict< 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)


Detailed Description

SaX2 - Mouse manipulator class.

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.


Constructor & Destructor Documentation

SaX::SaXManipulateMice::SaXManipulateMice ( SaXImport in,
int  ptr = 1 
)

An object of this type is used to configure simple mouse pointer devices

Definition at line 316 of file pointers.cpp.


Member Function Documentation

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 751 of file pointers.cpp.

References SaX::SaXException::errorString(), and SaX::SaXException::excCDBRecordNotFound().

Referenced by setMouse().

Here is the call graph for this function:

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 794 of file pointers.cpp.

References setMouse().

Here is the call graph for this function:

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 329 of file pointers.cpp.

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 346 of file pointers.cpp.

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 361 of file pointers.cpp.

void SaX::SaXManipulateMice::disable3ButtonEmulation ( void   )  [virtual]

disable the emulation of the third mouse button

Implements SaX::SaXManipulateMiceIF.

Definition at line 376 of file pointers.cpp.

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 389 of file pointers.cpp.

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 405 of file pointers.cpp.

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 449 of file pointers.cpp.

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 421 of file pointers.cpp.

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 435 of file pointers.cpp.

void SaX::SaXManipulateMice::disableXAxisInvertation ( void   )  [virtual]

disable the mouse X axis invertation by removing the option InvX entry

Implements SaX::SaXManipulateMiceIF.

Definition at line 463 of file pointers.cpp.

void SaX::SaXManipulateMice::disableYAxisInvertation ( void   )  [virtual]

disable the mouse Y axis invertation by removing the option InvY entry

Implements SaX::SaXManipulateMiceIF.

Definition at line 477 of file pointers.cpp.

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 491 of file pointers.cpp.

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 505 of file pointers.cpp.

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 676 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 698 of file pointers.cpp.

References getMouseList().

Here is the call graph for this function:

QList< QString > SaX::SaXManipulateMice::getMouseModelList ( const QString &  vendor  )  [virtual]

retrieve a list of supported standard mouse model names

Implements SaX::SaXManipulateMiceIF.

Definition at line 727 of file pointers.cpp.

References getMouseList().

Here is the call graph for this function:

Q3Dict< 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 807 of file pointers.cpp.

Referenced by getMouseData().

Q3Dict< 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 833 of file pointers.cpp.

References getMouseData().

Here is the call graph for this function:

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 660 of file pointers.cpp.

References isWheelEmulated().

Here is the call graph for this function:

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 552 of file pointers.cpp.

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 624 of file pointers.cpp.

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 642 of file pointers.cpp.

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 588 of file pointers.cpp.

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 606 of file pointers.cpp.

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 570 of file pointers.cpp.

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 519 of file pointers.cpp.

References SaX::SaXManipulatePointers::getDriver().

Here is the call graph for this function:


The documentation for this class was generated from the following files:

Generated on Sat Jun 7 16:23:18 2008 for libsax by  doxygen 1.5.5