#include <pointers.h>
Inheritance diagram for SaX::SaXManipulateTablets:
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 | removePen (int) |
QString | getName (void) |
QString | getVendor (void) |
QString | getType (void) |
QString | getMode (void) |
bool | isTablet (void) |
bool | isPen (void) |
bool | isEraser (void) |
SaXManipulateTablets (SaXImport *, SaXImport *, int=1) |
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 355 of file pointers.h.
|
An object of this type is used to configure tablet pointer devices including pens and erasers Definition at line 781 of file pointers.cpp. |
|
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 1282 of file pointers.cpp. References addPen(). Here is the call graph for this function: ![]() |
|
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 1210 of file pointers.cpp. References SaX::SaXException::errorString(), and SaX::SaXException::excCDBRecordNotFound(). Referenced by addPen(). Here is the call graph for this function: ![]() |
|
return the mode of this pointer device which can be either Absolute or Relative Implements SaX::SaXManipulateTabletsIF. Definition at line 920 of file pointers.cpp. References SaX::SaXManipulatePointers::mImport. |
|
return the CDB model name of this tablet Implements SaX::SaXManipulateTabletsIF. Definition at line 880 of file pointers.cpp. References SaX::SaXManipulatePointers::mImport. |
|
return the pen data dictionary associated with the given vendor and model name. Implements SaX::SaXManipulateTabletsIF. Definition at line 1120 of file pointers.cpp. References getPenData(). Here is the call graph for this function: ![]() |
|
return the pen data dictionary associated with the given CDB group name. Implements SaX::SaXManipulateTabletsIF. Definition at line 1096 of file pointers.cpp. Referenced by getPenData(). |
|
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 1133 of file pointers.cpp. |
|
return the tablet data dictionary associated with the given vendor and model name. Implements SaX::SaXManipulateTabletsIF. Definition at line 1083 of file pointers.cpp. References getTabletData(). Here is the call graph for this function: ![]() |
|
return the tablet data dictionary associated with the given CDB group name. Implements SaX::SaXManipulateTabletsIF. Definition at line 1059 of file pointers.cpp. Referenced by getTabletData(). |
|
retrieve a list of supported tablet modules from the TabletModules file Implements SaX::SaXManipulateTabletsIF. Definition at line 934 of file pointers.cpp. References SaX::SaXStorage::getTablePointerCDB(). Here is the call graph for this function: ![]() |
|
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 984 of file pointers.cpp. Referenced by getTabletModelList(), and getTabletVendorList(). |
|
retrieve a list of supported tablet model names Implements SaX::SaXManipulateTabletsIF. Definition at line 1035 of file pointers.cpp. References getTabletList(). Here is the call graph for this function: ![]() |
|
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 955 of file pointers.cpp. References SaX::SaXException::errorString(), and SaX::SaXException::excCDBRecordNotFound(). Here is the call graph for this function: ![]() |
|
retrieve a list of supported tablet vendor names Implements SaX::SaXManipulateTabletsIF. Definition at line 1006 of file pointers.cpp. References getTabletList(). Here is the call graph for this function: ![]() |
|
return the type of this pointer device which can be: cursor,stylus or eraser Implements SaX::SaXManipulateTabletsIF. Definition at line 906 of file pointers.cpp. References SaX::SaXManipulatePointers::mImport. |
|
return the CDB vendor name of this tablet Implements SaX::SaXManipulateTabletsIF. Definition at line 893 of file pointers.cpp. References SaX::SaXManipulatePointers::mImport. |
|
check if the current device is a tablet eraser. This is done by checking the InputFashion parameter. Implements SaX::SaXManipulateTabletsIF. Definition at line 861 of file pointers.cpp. References SaX::SaXManipulatePointers::mImport. |
|
check if the current device is a tablet pen. This is done by checking the InputFashion parameter. Implements SaX::SaXManipulateTabletsIF. Definition at line 843 of file pointers.cpp. References SaX::SaXManipulatePointers::mImport. |
|
check if the current device is a tablet. This is done by checking the InputFashion parameter. Implements SaX::SaXManipulateTabletsIF. Definition at line 825 of file pointers.cpp. References SaX::SaXManipulatePointers::mImport. |
|
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 1297 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: ![]() |
|
set the tablet mode for the currently selected pointer device Implements SaX::SaXManipulateTabletsIF. Definition at line 811 of file pointers.cpp. References SaX::SaXManipulatePointers::mImport. |
|
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 1155 of file pointers.cpp. References SaX::SaXManipulatePointers::mPointer. |
|
set all tablet data associated with the given vendor and model name to the current pointer data. Implements SaX::SaXManipulateTabletsIF. Definition at line 1197 of file pointers.cpp. |
|
set the tablet type for the currently selected pointer device Implements SaX::SaXManipulateTabletsIF. Definition at line 797 of file pointers.cpp. References SaX::SaXManipulatePointers::mImport. |