#include <pointers.h>
Public Member Functions | |
| QList< QString > | getPanelList (void) |
| QList< QString > | getPanelVendorList (void) |
| QList< QString > | getPanelModelList (const QString &) |
| Q3Dict< QString > | getPanelData (const QString &) |
| Q3Dict< QString > | getPanelData (const QString &, const QString &) |
| void | setTouchPanel (const QString &, const QString &) |
| void | setTouchPanel (const QString &) |
| bool | isTouchpanel (void) |
| QString | getName (void) |
| QString | getVendor (void) |
| QString | getType (void) |
| SaXManipulateTouchscreens (SaXImport *, int=1) | |
The touchscreen manipulator requires one import object (Pointers) to become created. Once created the manipulator object is able to transform a currently existing InputDevice into a touchpanel. In almost all cases it is needed to create this InputDevice first which means there is the need for the device manipulator as well. The following example demonstrate how to add a touch panel to the configuration.
#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 panelID = dev.addInputDevice (SAX_INPUT_TOUCHPANEL); printf ("ID: %d is [SAX_INPUT_TOUCHPANEL]: added\n",panelID); printf ("Setting up touchpanel data... "); SaXManipulateTouchscreens pointer ( section["Pointers"] ); if (pointer.selectPointer (panelID)) { QList<QString> panelList = pointer.getPanelList(); QString* myPanel = panelList.at(0); pointer.setTouchPanel( *myPanel ); printf ("TouchPanel: [%s] configured\n", myPanel->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 513 of file pointers.h.
| SaX::SaXManipulateTouchscreens::SaXManipulateTouchscreens | ( | SaXImport * | in, | |
| int | ptr = 1 | |||
| ) |
An object of this type is used to configure simple touchpanel pointer devices for predefined supported panels
Definition at line 1523 of file pointers.cpp.
| QList< QString > SaX::SaXManipulateTouchscreens::getPanelList | ( | void | ) | [virtual] |
retrieve a list of supported panel groups. Each item contains the vendor and the model in its name separated by a colon
Implements SaX::SaXManipulateTouchscreensIF.
Definition at line 1608 of file pointers.cpp.
Referenced by getPanelModelList(), and getPanelVendorList().
| QList< QString > SaX::SaXManipulateTouchscreens::getPanelVendorList | ( | void | ) | [virtual] |
retrieve a list of supported panel vendor names
Implements SaX::SaXManipulateTouchscreensIF.
Definition at line 1630 of file pointers.cpp.
References getPanelList().
| QList< QString > SaX::SaXManipulateTouchscreens::getPanelModelList | ( | const QString & | vendor | ) | [virtual] |
retrieve a list of supported panel model names
Implements SaX::SaXManipulateTouchscreensIF.
Definition at line 1659 of file pointers.cpp.
References getPanelList().
| Q3Dict< QString > SaX::SaXManipulateTouchscreens::getPanelData | ( | const QString & | group | ) | [virtual] |
return the touchers data dictionary associated with the given CDB group name.
Implements SaX::SaXManipulateTouchscreensIF.
Definition at line 1683 of file pointers.cpp.
Referenced by getPanelData().
| Q3Dict< QString > SaX::SaXManipulateTouchscreens::getPanelData | ( | const QString & | vendor, | |
| const QString & | name | |||
| ) | [virtual] |
return the touchers data dictionary associated with the given vendor and model name.
Implements SaX::SaXManipulateTouchscreensIF.
Definition at line 1709 of file pointers.cpp.
References getPanelData().
| void SaX::SaXManipulateTouchscreens::setTouchPanel | ( | const QString & | vendor, | |
| const QString & | model | |||
| ) | [virtual] |
set all panel data associated with the given vendor and model name to the current pointer data.
Implements SaX::SaXManipulateTouchscreensIF.
Definition at line 1767 of file pointers.cpp.
| void SaX::SaXManipulateTouchscreens::setTouchPanel | ( | const QString & | group | ) | [virtual] |
set all panel 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::SaXManipulateTouchscreensIF.
Definition at line 1722 of file pointers.cpp.
References SaX::SaXException::errorString(), SaX::SaXException::excCDBRecordNotFound(), and SaX::SaXManipulatePointers::setNamePair().
| bool SaX::SaXManipulateTouchscreens::isTouchpanel | ( | void | ) | [virtual] |
check if the current device is a touchpanel. This is done by checking the InputFashion parameter.
Implements SaX::SaXManipulateTouchscreensIF.
Definition at line 1537 of file pointers.cpp.
| QString SaX::SaXManipulateTouchscreens::getName | ( | void | ) | [virtual] |
return the model name of this touchscreen pointer device. The vendor and name is stored as one string separated by a semi-colon
Implements SaX::SaXManipulateTouchscreensIF.
Definition at line 1556 of file pointers.cpp.
| QString SaX::SaXManipulateTouchscreens::getVendor | ( | void | ) | [virtual] |
return the vendor name of this touchscreen pointer device. The vendor and name is stored as one string separated by a semi-colon
Implements SaX::SaXManipulateTouchscreensIF.
Definition at line 1574 of file pointers.cpp.
| QString SaX::SaXManipulateTouchscreens::getType | ( | void | ) | [virtual] |
return the type of this pointer device. Note the type parameter of a touchscreen or a tablet is handled with the same key: TabletType
Implements SaX::SaXManipulateTouchscreensIF.
Definition at line 1592 of file pointers.cpp.
1.5.5