SaX::SaXManipulateLayout Class Reference

SaX2 - Layout class. More...

#include <layout.h>

Inheritance diagram for SaX::SaXManipulateLayout:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void setXOrgMultiheadMode (int)
bool setXOrgLayout (int, int, int, int, int)
bool setRelative (int, int, int, int)
bool removeRelative (int)
int getMultiheadMode (void)
QList< QString > getXOrgLayout (int)
QList< QString > getInputLayout (void)
void addInputLayout (int)
void removeInputLayout (int)
 SaXManipulateLayout (SaXImport *, SaXImport *)

Detailed Description

SaX2 - Layout class.

The layout manipulator requires two import objects (Layout and Card) to become created. Once created the manipulator object is able to get/set layout related information. The layout specifies the relationship and cooperation between the screens. The following example demonstrate how to check for the multihead mode currently used:

 #include <sax/sax.h>

 int main (void) {
     SaXException().setDebug (true);
     QDict<SaXImport> section;
     int importID[] = {
         SAX_LAYOUT,
         SAX_CARD
     };
     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 ("checking multihead mode... ");
     SaXManipulateLayout layout (
         section["Layout"],section["Card"]
     );
     switch (layout.getMultiheadMode()) {
         case SAX_SINGLE_HEAD:
             printf ("single head mode\n");
         break;
         case SAX_XINERAMA:
             printf ("Xorg Xinerama mode\n");
         break;
         case SAX_TRADITIONAL:
             printf ("Xorg traditional multihead\n");
         break;
         case SAX_CLONE:
             printf ("Xorg cloned multihead\n");
         break;
         case SAX_TWINVIEW:
             printf ("Nvidia Twinview mode\n");
         break;
         case SAX_TWINVIEW_CLONE:
             printf ("Nvidia Twinview clone mode\n");
         break;
         default:
             printf ("unknown mode\n");
         break;
     }
     return (0);
 }

Definition at line 132 of file layout.h.


Constructor & Destructor Documentation

SaX::SaXManipulateLayout::SaXManipulateLayout ( SaXImport ,
SaXImport  
)

Definition at line 27 of file layout.cpp.

References SaX::SaXException::errorString(), SaX::SaXException::excCardImportBindFailed(), SaX::SaXException::excLayoutImportBindFailed(), SaX::SaXException::excNullPointerArgument(), and SaX::SaXImport::getSectionID().

Here is the call graph for this function:


Member Function Documentation

void SaX::SaXManipulateLayout::setXOrgMultiheadMode ( int   )  [virtual]

Implements SaX::SaXManipulateLayoutIF.

Definition at line 57 of file layout.cpp.

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

Here is the call graph for this function:

bool SaX::SaXManipulateLayout::setXOrgLayout ( int  ,
int  ,
int  ,
int  ,
int   
) [virtual]

Implements SaX::SaXManipulateLayoutIF.

Definition at line 145 of file layout.cpp.

References SaX::SaXManipulateCard::selectCard().

Here is the call graph for this function:

bool SaX::SaXManipulateLayout::setRelative ( int  ,
int  ,
int  ,
int   
) [virtual]

Implements SaX::SaXManipulateLayoutIF.

Definition at line 86 of file layout.cpp.

References SaX::SaXManipulateCard::selectCard().

Here is the call graph for this function:

bool SaX::SaXManipulateLayout::removeRelative ( int   )  [virtual]

Implements SaX::SaXManipulateLayoutIF.

Definition at line 127 of file layout.cpp.

References SaX::SaXManipulateCard::selectCard().

Here is the call graph for this function:

int SaX::SaXManipulateLayout::getMultiheadMode ( void   )  [virtual]

Implements SaX::SaXManipulateLayoutIF.

Definition at line 185 of file layout.cpp.

References SaX::SaXStorage::getCount().

Here is the call graph for this function:

QList< QString > SaX::SaXManipulateLayout::getXOrgLayout ( int   )  [virtual]

Implements SaX::SaXManipulateLayoutIF.

Definition at line 274 of file layout.cpp.

References SaX::SaXException::errorString(), SaX::SaXException::excGetScreenLayoutFailed(), and SaX::SaXManipulateCard::selectCard().

Here is the call graph for this function:

QList< QString > SaX::SaXManipulateLayout::getInputLayout ( void   )  [virtual]

Implements SaX::SaXManipulateLayoutIF.

Definition at line 308 of file layout.cpp.

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

Here is the call graph for this function:

void SaX::SaXManipulateLayout::addInputLayout ( int   )  [virtual]

Implements SaX::SaXManipulateLayoutIF.

Definition at line 339 of file layout.cpp.

void SaX::SaXManipulateLayout::removeInputLayout ( int   )  [virtual]

Implements SaX::SaXManipulateLayoutIF.

Definition at line 357 of file layout.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Nov 28 19:09:38 2006 for libsax by  doxygen 1.5.0