SaX::SaXManipulateTouchscreens Class Reference

SaX2 - Touchscreen manipulator class. More...

#include <pointers.h>

Inheritance diagram for SaX::SaXManipulateTouchscreens:

Inheritance graph
[legend]
List of all members.

Public Member Functions

QList< QString > getPanelList (void)
QList< QString > getPanelVendorList (void)
QList< QString > getPanelModelList (const QString &)
QDict< QString > getPanelData (const QString &)
QDict< 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)

Detailed Description

SaX2 - Touchscreen manipulator class.

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 496 of file pointers.h.


Constructor & Destructor Documentation

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


Member Function Documentation

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

References SaX::SaXManipulatePointers::mImport.

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

References getPanelData().

Here is the call graph for this function:

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

Referenced by getPanelData().

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

Referenced by getPanelModelList(), and getPanelVendorList().

QList< QString > SaX::SaXManipulateTouchscreens::getPanelModelList const QString &  vendor  )  [virtual]
 

retrieve a list of supported panel model names

Implements SaX::SaXManipulateTouchscreensIF.

Definition at line 1457 of file pointers.cpp.

References getPanelList().

Here is the call graph for this function:

QList< QString > SaX::SaXManipulateTouchscreens::getPanelVendorList void   )  [virtual]
 

retrieve a list of supported panel vendor names

Implements SaX::SaXManipulateTouchscreensIF.

Definition at line 1428 of file pointers.cpp.

References getPanelList().

Here is the call graph for this function:

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

References SaX::SaXManipulatePointers::mImport.

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

References SaX::SaXManipulatePointers::mImport.

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

References SaX::SaXManipulatePointers::mImport.

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

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

Here is the call graph for this function:

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


The documentation for this class was generated from the following files:
Generated on Mon Jan 7 17:42:06 2008 for libsax by  doxygen 1.4.6