#include <path.h>
Public Member Functions | |
| void | setFontPath (const QString &) |
| void | addFontPath (const QString &) |
| void | removeFontPath (const QString &) |
| void | setLoadableModule (const QString &) |
| void | addLoadableModule (const QString &) |
| void | removeLoadableModule (const QString &) |
| void | setServerFlag (const QString &) |
| void | addServerFlag (const QString &) |
| void | removeServerFlag (const QString &) |
| QList< QString > | getFontPaths (void) |
| QList< QString > | getModules (void) |
| QList< QString > | getServerFlags (void) |
| SaXManipulatePath (SaXImport *, int=0) | |
The path manipulator requires one import object (Path) to become created. Once created the manipulator object is able to get/set information related to server-flags server-modules and search paths. The following example demonstrates how to add a server flag to the configuration. The DontVTSwitch server flag disallows the use of the Ctrl+Alt+Fn sequence (where Fn refers to one of the numbered function keys). That sequence is normally used to switch to another "virtual terminal" on operating systems that have this feature. When this option is enabled, that key sequence has no special meaning and is passed to clients.
#include <sax/sax.h> int main (void) { SaXException().setDebug (true); QDict<SaXImport> section; printf ("Importing data...\n"); SaXConfig* config = new SaXConfig; SaXImport* import = new SaXImport ( SAX_PATH ); import->setSource ( SAX_SYSTEM_CONFIG ); import->doImport(); config->addImport (import); section.insert ( import->getSectionName(),import ); printf ("Disable VT switching...\n"); SaXManipulatePath mPath ( section["Path"] ); mPath.addServerFlag ("DontVTSwitch"); 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 112 of file path.h.
| SaX::SaXManipulatePath::SaXManipulatePath | ( | SaXImport * | in, | |
| int | path = 0 | |||
| ) |
An object of this type is used to configure the Files,Module and ServerFlags specifications including path descriptions for Fonts loadable module settings and server flags
Definition at line 27 of file path.cpp.
References SaX::SaXException::errorString(), SaX::SaXException::excNullPointerArgument(), SaX::SaXException::excPathImportBindFailed(), and SaX::SaXImport::getSectionID().
| void SaX::SaXManipulatePath::setFontPath | ( | const QString & | path | ) | [virtual] |
set global FontPath for this configuration. Using this function will overwrite the current FontPath setting
Implements SaX::SaXManipulatePathIF.
| void SaX::SaXManipulatePath::addFontPath | ( | const QString & | path | ) | [virtual] |
add FontPath to the current list of font pathes. The comma separator is used for each item
Implements SaX::SaXManipulatePathIF.
| void SaX::SaXManipulatePath::removeFontPath | ( | const QString & | path | ) | [virtual] |
remove the given font path (path) from the current list of font pathes. If the path doesn't exist nothing will be changed
Implements SaX::SaXManipulatePathIF.
| void SaX::SaXManipulatePath::setLoadableModule | ( | const QString & | module | ) | [virtual] |
set global module to load for this configuration. Using this function will overwrite the current module list
Implements SaX::SaXManipulatePathIF.
| void SaX::SaXManipulatePath::addLoadableModule | ( | const QString & | module | ) | [virtual] |
add module name to the current list of modules. The comma separator is used for each item
Implements SaX::SaXManipulatePathIF.
Definition at line 119 of file path.cpp.
Referenced by SaX::SaXManipulateDesktop::enable3D(), and SaX::SaXManipulateVNC::enableVNC().
| void SaX::SaXManipulatePath::removeLoadableModule | ( | const QString & | module | ) | [virtual] |
remove the given module (module) from the current list of modules. If the module doesn't exist nothing will be changed
Implements SaX::SaXManipulatePathIF.
Definition at line 139 of file path.cpp.
Referenced by SaX::SaXManipulateDesktop::disable3D(), SaX::SaXManipulateVNC::disableVNC(), SaX::SaXManipulateDesktop::enable3D(), and SaX::SaXManipulateVNC::enableVNC().
| void SaX::SaXManipulatePath::setServerFlag | ( | const QString & | flag | ) | [virtual] |
set global server flag for this configuration. Using this function will overwrite the current flag list
Implements SaX::SaXManipulatePathIF.
| void SaX::SaXManipulatePath::addServerFlag | ( | const QString & | flag | ) | [virtual] |
add server flag to the current list of flags. The comma separator is used for each item
Implements SaX::SaXManipulatePathIF.
| void SaX::SaXManipulatePath::removeServerFlag | ( | const QString & | flag | ) | [virtual] |
remove the given flag (flag) from the current list of flags. If the flag doesn't exist nothing will be changed
Implements SaX::SaXManipulatePathIF.
| QList< QString > SaX::SaXManipulatePath::getFontPaths | ( | void | ) | [virtual] |
return a list of server font paths defined for this X11 configuration
Implements SaX::SaXManipulatePathIF.
| QList< QString > SaX::SaXManipulatePath::getModules | ( | void | ) | [virtual] |
return a list of server modules defined for this X11 configuration
Implements SaX::SaXManipulatePathIF.
Definition at line 226 of file path.cpp.
Referenced by SaX::SaXManipulateDesktop::is3DEnabled().
| QList< QString > SaX::SaXManipulatePath::getServerFlags | ( | void | ) | [virtual] |
return a list of server flags defined for this X11 configuration
Implements SaX::SaXManipulatePathIF.
1.5.3