Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

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)
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 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 194 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 401 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::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.

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 672 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 646 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 515 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 566 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 537 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 499 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 481 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 415 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 463 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 445 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 633 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 590 of file pointers.cpp.

References SaX::SaXException::errorString(), SaX::SaXException::excCDBRecordNotFound(), SaX::SaXManipulatePointers::mImport, and SaX::SaXManipulatePointers::mPointer.

Referenced by setMouse().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Sep 14 10:27:42 2005 for libsax by  doxygen 1.4.4