SaX::SaXManipulateMice Class Reference

SaX2 - Mouse manipulator class. More...

#include <pointers.h>

Inheritance diagram for SaX::SaXManipulateMice:

Inheritance graph
[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 disableWheel (void)
void enableXAxisInvertation (void)
void enableYAxisInvertation (void)
void disableXAxisInvertation (void)
void disableYAxisInvertation (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 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 200 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 312 of file pointers.cpp.


Member Function Documentation

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::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 429 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::disableXAxisInvertation void   )  [virtual]
 

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

Implements SaX::SaXManipulateMiceIF.

Definition at line 443 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 457 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::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::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::enableXAxisInvertation void   )  [virtual]
 

enable the mouse X axis invertation by setting the option InvX entry to on

Implements SaX::SaXManipulateMiceIF.

Definition at line 401 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 415 of file pointers.cpp.

References SaX::SaXManipulatePointers::mImport.

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

References getMouseData().

Here is the call graph for this function:

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

Referenced by getMouseData().

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

Referenced by getMouseModelList(), and getMouseVendorList().

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

retrieve a list of supported standard mouse model names

Implements SaX::SaXManipulateMiceIF.

Definition at line 661 of file pointers.cpp.

References getMouseList().

Here is the call graph for this function:

QList< QString > SaX::SaXManipulateMice::getMouseVendorList void   )  [virtual]
 

retrieve a list of supported standard mouse vendor names

Implements SaX::SaXManipulateMiceIF.

Definition at line 632 of file pointers.cpp.

References getMouseList().

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

References isWheelEmulated(), and SaX::SaXManipulatePointers::mImport.

Here is the call graph for this function:

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

References SaX::SaXManipulatePointers::getDriver(), and SaX::SaXManipulatePointers::mImport.

Here is the call graph for this function:

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

References SaX::SaXManipulatePointers::mImport.

Referenced by getWheelEmulatedButton().

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 504 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 522 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 540 of file pointers.cpp.

References SaX::SaXManipulatePointers::mImport.

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

References setMouse().

Here is the call graph for this function:

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

References SaX::SaXManipulatePointers::mPointer.

Referenced by setMouse().


The documentation for this class was generated from the following files:
Generated on Mon Jan 7 17:40:13 2008 for libsax by  doxygen 1.4.6