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

QDict< QString > getTabletData (const QString &)
QDict< QString > getTabletData (const QString &, const QString &)
QDict< QString > getPenData (const QString &)
QDict< 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)
QDict< 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 removePad (int)
QString getName (void)
QString getVendor (void)
QString getType (void)
QString getMode (void)
bool isTablet (void)
bool isPen (void)
bool isEraser (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 367 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 843 of file pointers.cpp.


Member Function Documentation

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

Referenced by getTabletData().

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

References getTabletData().

Here is the call graph for this function:

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

Referenced by getPenData().

QDict< 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 1201 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 1087 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 1116 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 1065 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 1214 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 1015 of file pointers.cpp.

References SaX::SaXStorage::getTablePointerCDB().

Here is the call graph for this function:

QDict< 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 1036 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 1278 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 1236 of file pointers.cpp.

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

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

References SaX::SaXManipulatePointers::mImport.

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

set the tablet mode for the currently selected pointer device

Implements SaX::SaXManipulateTabletsIF.

Definition at line 874 of file pointers.cpp.

References SaX::SaXManipulatePointers::mImport.

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

References SaX::SaXManipulateDevices::addInputDevice(), SaX::SaXException::errorString(), SaX::SaXException::excCDBRecordNotFound(), SaX::SaXException::excPointerFashionTypeFailed(), SaX::SaXManipulatePointers::mImport, SaX::SaXManipulatePointers::mPointer, 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 1448 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 1291 of file pointers.cpp.

References SaX::SaXManipulateDevices::addInputDevice(), SaX::SaXException::errorString(), SaX::SaXException::excCDBRecordNotFound(), SaX::SaXException::excPointerFashionTypeFailed(), SaX::SaXManipulatePointers::mImport, SaX::SaXManipulatePointers::mPointer, 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 1360 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 1463 of file pointers.cpp.

References SaX::SaXException::errorString(), SaX::SaXException::excPointerFashionTypeFailed(), SaX::SaXStorage::getItem(), SaX::SaXManipulatePointers::mImport, 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 1490 of file pointers.cpp.

References SaX::SaXException::errorString(), SaX::SaXException::excPointerFashionTypeFailed(), SaX::SaXStorage::getItem(), SaX::SaXManipulatePointers::mImport, 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 961 of file pointers.cpp.

References SaX::SaXManipulatePointers::mImport.

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

return the CDB vendor name of this tablet

Implements SaX::SaXManipulateTabletsIF.

Definition at line 974 of file pointers.cpp.

References SaX::SaXManipulatePointers::mImport.

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

References SaX::SaXManipulatePointers::mImport.

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

References SaX::SaXManipulatePointers::mImport.

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

References SaX::SaXManipulatePointers::mImport.

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

References SaX::SaXManipulatePointers::mImport.

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

References SaX::SaXManipulatePointers::mImport.

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

References SaX::SaXManipulatePointers::mImport.


The documentation for this class was generated from the following files:
Generated on Tue Sep 25 20:18:19 2007 for libsax by  doxygen 1.5.3