SaX::SaXManipulateTablets Class Reference

SaX2 - Tablet manipulator class. More...

#include <pointers.h>

Inheritance diagram for SaX::SaXManipulateTablets:
[legend]

List of all members.

Public Member Functions

Q3Dict< QString > getTabletData (const QString &)
Q3Dict< QString > getTabletData (const QString &, const QString &)
Q3Dict< QString > getPenData (const QString &)
Q3Dict< QString > getPenData (const QString &, const QString &)
QList< QString > getTabletVendorList (void)
QList< QString > getTabletModelList (const QString &)
QList< QString > getTabletList (void)
QList< QString > getPenList (void)
QList< QString > getTabletDrivers (void)
Q3Dict< QString > getTabletOptions (const QString &)
void setTablet (const QString &, const QString &)
void setTablet (const QString &)
void setType (const QString &)
void setMode (const QString &)
int addPen (const QString &)
int addPen (const QString &, const QString &)
int addPad (const QString &)
int addPad (const QString &, const QString &)
int removePen (int)
int removeTouch (int)
int removePad (int)
QString getName (void)
QString getVendor (void)
QString getType (void)
QString getMode (void)
bool isTablet (void)
bool isPen (void)
bool isEraser (void)
bool isTouch (void)
bool isPad (void)
 SaXManipulateTablets (SaXImport *, SaXImport *, int=1)


Detailed Description

SaX2 - Tablet manipulator class.

The tablet manipulator requires two import object (Pointers and Layout) to become created. Once created the manipulator object is able to get/set tablet configuration information. To set up a tablet a new input device needs to created first which get transformed into a tablet using the setTablet() method. Based on this tablet device the manipulator is able to add additional input devices using the addPen() method which results in a stylus or an eraser pointer for this tablet. The following example demonstrate how to add a tablet with one stylus-pen applied

 #include <sax/sax.h>

 int main (void) {
     SaXException().setDebug (true);
     QDict<SaXImport> section;
     int importID[] = {
         SAX_POINTERS,
         SAX_LAYOUT
     };
     printf ("Importing data...\n");
     SaXConfig* config = new SaXConfig;
     for (int id=0; id<2; id++) {
         SaXImport* import = new SaXImport ( importID[id] );
         import->setSource ( SAX_SYSTEM_CONFIG );
         import->doImport();
         config->addImport (import);
         section.insert (
             import->getSectionName(),import
         );
     }
     printf ("Adding new pointer device... ");
     SaXManipulateDevices dev (
         section["Pointers"],section["Layout"]
     );
     int tabletID = dev.addInputDevice (SAX_INPUT_TABLET);
     printf ("ID: %d is [SAX_INPUT_TABLET]: added\n",tabletID);
 
     printf ("Setting up tablet data... ");
     SaXManipulateTablets pointer (
         section["Pointers"],section["Layout"]
     );
     if (pointer.selectPointer (tabletID)) {
         QList<QString> tabletList = pointer.getTabletList();
         QList<QString> penList = pointer.getPenList();
        QString* myTablet = tabletList.at (3);
         QString* myPen = penList.at(3);
         pointer.setTablet( *myTablet );
         pointer.addPen ( *myPen );
         printf ("Tablet: [%s] with pen: [%s] configured\n",
             myTablet->ascii(),myPen->ascii()
         );
     }
     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 368 of file pointers.h.


Constructor & Destructor Documentation

SaX::SaXManipulateTablets::SaXManipulateTablets ( SaXImport pointer,
SaXImport layout,
int  id = 1 
)

An object of this type is used to configure tablet pointer devices including pens and erasers

Definition at line 849 of file pointers.cpp.


Member Function Documentation

Q3Dict< QString > SaX::SaXManipulateTablets::getTabletData ( const QString &  group  )  [virtual]

return the tablet data dictionary associated with the given CDB group name.

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1170 of file pointers.cpp.

Referenced by getTabletData().

Q3Dict< QString > SaX::SaXManipulateTablets::getTabletData ( const QString &  vendor,
const QString &  name 
) [virtual]

return the tablet data dictionary associated with the given vendor and model name.

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1194 of file pointers.cpp.

References getTabletData().

Here is the call graph for this function:

Q3Dict< QString > SaX::SaXManipulateTablets::getPenData ( const QString &  group  )  [virtual]

return the pen data dictionary associated with the given CDB group name.

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1207 of file pointers.cpp.

Referenced by getPenData().

Q3Dict< QString > SaX::SaXManipulateTablets::getPenData ( const QString &  vendor,
const QString &  name 
) [virtual]

return the pen data dictionary associated with the given vendor and model name.

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1231 of file pointers.cpp.

References getPenData().

Here is the call graph for this function:

QList< QString > SaX::SaXManipulateTablets::getTabletVendorList ( void   )  [virtual]

retrieve a list of supported tablet vendor names

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1117 of file pointers.cpp.

References getTabletList().

Here is the call graph for this function:

QList< QString > SaX::SaXManipulateTablets::getTabletModelList ( const QString &  vendor  )  [virtual]

retrieve a list of supported tablet model names

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1146 of file pointers.cpp.

References getTabletList().

Here is the call graph for this function:

QList< QString > SaX::SaXManipulateTablets::getTabletList ( void   )  [virtual]

retrieve a list of supported tablet groups. Each item contains the vendor and the model in its name separated by a colon

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1095 of file pointers.cpp.

Referenced by getTabletModelList(), and getTabletVendorList().

QList< QString > SaX::SaXManipulateTablets::getPenList ( void   )  [virtual]

retrieve a list of supported Pen/Eraser groups. Each item contains the vendor and the model in its name separated by a colon

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1244 of file pointers.cpp.

QList< QString > SaX::SaXManipulateTablets::getTabletDrivers ( void   )  [virtual]

retrieve a list of supported tablet modules from the TabletModules file

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1044 of file pointers.cpp.

References SaX::SaXStorage::getTablePointerCDB().

Here is the call graph for this function:

Q3Dict< QString > SaX::SaXManipulateTablets::getTabletOptions ( const QString &  driver  )  [virtual]

retrieve a list of tablet options refering to the tablet driver specified by (driver). The result is a dictionary saving the option name as key and the optional value as value. the value specify the type of the option (bool,any,string) and may contain additional information if type=string

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1065 of file pointers.cpp.

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

Here is the call graph for this function:

void SaX::SaXManipulateTablets::setTablet ( const QString &  vendor,
const QString &  model 
) [virtual]

set all tablet data associated with the given vendor and model name to the current pointer data.

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1308 of file pointers.cpp.

void SaX::SaXManipulateTablets::setTablet ( const QString &  group  )  [virtual]

set all tablet 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::SaXManipulateTabletsIF.

Definition at line 1266 of file pointers.cpp.

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

Here is the call graph for this function:

void SaX::SaXManipulateTablets::setType ( const QString &  type  )  [virtual]

set the tablet type for the currently selected pointer device

Implements SaX::SaXManipulateTabletsIF.

Definition at line 866 of file pointers.cpp.

void SaX::SaXManipulateTablets::setMode ( const QString &  mode  )  [virtual]

set the tablet mode for the currently selected pointer device

Implements SaX::SaXManipulateTabletsIF.

Definition at line 880 of file pointers.cpp.

int SaX::SaXManipulateTablets::addPen ( const QString &  group  )  [virtual]

add a new Pen or Eraser 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. The contents of the data record will set the InputFashion type for this addon pointer device

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1406 of file pointers.cpp.

References SaX::SaXManipulateDevices::addInputDevice(), SaX::SaXException::errorString(), SaX::SaXException::excCDBRecordNotFound(), SaX::SaXException::excPointerFashionTypeFailed(), and SaX::SaXManipulatePointers::selectPointer().

Referenced by addPen().

Here is the call graph for this function:

int SaX::SaXManipulateTablets::addPen ( const QString &  vendor,
const QString &  model 
) [virtual]

add a new Pen or Eraser associated with the given vendor and model name to the current pointer data. The contents of the data record will set the InputFashion type for this addon pointer device

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1481 of file pointers.cpp.

References addPen().

Here is the call graph for this function:

int SaX::SaXManipulateTablets::addPad ( const QString &  group  )  [virtual]

add a new Pad 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. The contents of the data record will set the InputFashion type for this addon pointer device

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1321 of file pointers.cpp.

References SaX::SaXManipulateDevices::addInputDevice(), SaX::SaXException::errorString(), SaX::SaXException::excCDBRecordNotFound(), SaX::SaXException::excPointerFashionTypeFailed(), and SaX::SaXManipulatePointers::selectPointer().

Referenced by addPad().

Here is the call graph for this function:

int SaX::SaXManipulateTablets::addPad ( const QString &  vendor,
const QString &  model 
) [virtual]

add a new Pad 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. The contents of the data record will set the InputFashion type for this addon pointer device

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1390 of file pointers.cpp.

References addPad().

Here is the call graph for this function:

int SaX::SaXManipulateTablets::removePen ( int  id  )  [virtual]

remove the Pen or Eraser located at section ID (id) If the InputFashion type is a valid SAX_INPUT_PEN or SAX_INPUT_ERASER the method will remove the pointer device and return the new current ID

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1496 of file pointers.cpp.

References SaX::SaXException::errorString(), SaX::SaXException::excPointerFashionTypeFailed(), SaX::SaXStorage::getItem(), SaX::SaXManipulateDevices::removeInputDevice(), and SaX::SaXManipulatePointers::selectPointer().

Here is the call graph for this function:

int SaX::SaXManipulateTablets::removeTouch ( int  id  ) 

remove the Touch located at section ID (id) If the InputFashion type is a valid SAX_INPUT_TOUCH the method will remove the pointer device and return the new current ID

Definition at line 1523 of file pointers.cpp.

References SaX::SaXException::errorString(), SaX::SaXException::excPointerFashionTypeFailed(), SaX::SaXStorage::getItem(), SaX::SaXManipulateDevices::removeInputDevice(), and SaX::SaXManipulatePointers::selectPointer().

Here is the call graph for this function:

int SaX::SaXManipulateTablets::removePad ( int  id  )  [virtual]

remove the Pad located at section ID (id) If the InputFashion type is a valid SAX_INPUT_PAD the method will remove the pointer device and return the new current ID

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1547 of file pointers.cpp.

References SaX::SaXException::errorString(), SaX::SaXException::excPointerFashionTypeFailed(), SaX::SaXStorage::getItem(), SaX::SaXManipulateDevices::removeInputDevice(), and SaX::SaXManipulatePointers::selectPointer().

Here is the call graph for this function:

QString SaX::SaXManipulateTablets::getName ( void   )  [virtual]

return the CDB model name of this tablet

Implements SaX::SaXManipulateTabletsIF.

Definition at line 986 of file pointers.cpp.

QString SaX::SaXManipulateTablets::getVendor ( void   )  [virtual]

return the CDB vendor name of this tablet

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1000 of file pointers.cpp.

QString SaX::SaXManipulateTablets::getType ( void   )  [virtual]

return the type of this pointer device which can be: cursor,stylus or eraser

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1014 of file pointers.cpp.

QString SaX::SaXManipulateTablets::getMode ( void   )  [virtual]

return the mode of this pointer device which can be either Absolute or Relative

Implements SaX::SaXManipulateTabletsIF.

Definition at line 1029 of file pointers.cpp.

bool SaX::SaXManipulateTablets::isTablet ( void   )  [virtual]

check if the current device is a tablet. This is done by checking the InputFashion parameter.

Implements SaX::SaXManipulateTabletsIF.

Definition at line 894 of file pointers.cpp.

bool SaX::SaXManipulateTablets::isPen ( void   )  [virtual]

check if the current device is a tablet pen. This is done by checking the InputFashion parameter.

Implements SaX::SaXManipulateTabletsIF.

Definition at line 912 of file pointers.cpp.

bool SaX::SaXManipulateTablets::isEraser ( void   )  [virtual]

check if the current device is a tablet eraser. This is done by checking the InputFashion parameter.

Implements SaX::SaXManipulateTabletsIF.

Definition at line 930 of file pointers.cpp.

bool SaX::SaXManipulateTablets::isTouch ( void   )  [virtual]

check if the current device is a tablet touch device. This is done by checking the InputFashion parameter.

Implements SaX::SaXManipulateTabletsIF.

Definition at line 949 of file pointers.cpp.

bool SaX::SaXManipulateTablets::isPad ( void   )  [virtual]

check if the current device is a tablet pad. This is done by checking the InputFashion parameter.

Implements SaX::SaXManipulateTabletsIF.

Definition at line 968 of file pointers.cpp.


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

Generated on Sat Jun 27 14:39:50 2009 for libsax by  doxygen 1.5.6