ViewModeInterface Class Reference

Define View Modes using this interface. More...

#include <OpenFlipper/BasePlugin/ViewModeInterface.hh>

List of all members.

Signals

virtual void defineViewModeToolboxes (QString, QStringList)
 Defines a ViewMode for the Toolboxes.
virtual void defineViewModeToolbars (QString, QStringList)
 Defines a ViewMode for the Toolbars.
virtual void defineViewModeContextMenus (QString, QStringList)
 Defines a ViewMode for the Toolbars.
virtual void defineViewModeIcon (QString, QString)
 Defines an Icon for a ViewMode.

Public Member Functions

virtual ~ViewModeInterface ()
 Destructor.

Detailed Description

Define View Modes using this interface.

This Interface can be used to configure visible widgets in the viewer. A given view mode contains a list of toolbars, toolboxes and context menus which should be visible if the mode is active. Therefore you can define a subset of the full interface for special tasks.

Example using custom view modes

OpenFlipper comes along with a lot of plugins each offering a wide variety of GUI elements such as toolboxes and toolbars. In order to constrain OpenFlipper's interface to a certain number of toolboxes and/or toolbar elements, the ViewModeInterface offers means to filter these elements.

So, for example, if we only wanted the toolboxes of the Data Control and the Selection plugin to be visible, we have to emit signal defineViewModeToolboxes(QString, QStringList) in order to hide out everything else:

 void ExampleViewModePlugin::pluginsInitialized() {

     QStringList toolBoxes = QString("Data Control,Selection").split(",");

     emit defineViewModeToolboxes("My Custom View Mode", toolBoxes);
 }

When the user selects "My Custom View Mode" out of the view modes menu, all toolboxes except for Data Control and Selection will disappear. This works analogously for toolbar elements via the signal defineViewModeToolbars(QString, QStringList). Additionally, if we wanted the "My Custom View Mode" entry in the view modes menu to appear with a fancy icon, we just have to call defineViewModeIcon(QString, QString):

 emit defineViewModeIcon("My Custom View Mode", "myIconFile.png");

Definition at line 101 of file ViewModeInterface.hh.


Member Function Documentation

virtual void ViewModeInterface::defineViewModeContextMenus ( QString  ,
QStringList   
) [inline, virtual, signal]

Defines a ViewMode for the Toolbars.

With this function you can define a set of context menus which should be visible for the specified view mode.

Parameters:
_mode name of the ViewMode
_usedWidgets list of used context menus

Definition at line 140 of file ViewModeInterface.hh.

virtual void ViewModeInterface::defineViewModeIcon ( QString  ,
QString   
) [inline, virtual, signal]

Defines an Icon for a ViewMode.

With this function you can define an Icon associated with this view mode The Icon will be taken from the standard Icon path or in the OpenFlipper home directory.
The Icon should have a size of 150x150 pixels.

Parameters:
_mode name of the ViewMode
_iconName Name of the Icon used for this view mode

Definition at line 152 of file ViewModeInterface.hh.

virtual void ViewModeInterface::defineViewModeToolbars ( QString  ,
QStringList   
) [inline, virtual, signal]

Defines a ViewMode for the Toolbars.

With this function you can define a set of toolbars which should be visible for the specified view mode.

Parameters:
_mode name of the ViewMode
_usedWidgets list of used toolbars

Definition at line 130 of file ViewModeInterface.hh.

virtual void ViewModeInterface::defineViewModeToolboxes ( QString  ,
QStringList   
) [inline, virtual, signal]

Defines a ViewMode for the Toolboxes.

With this function you can define a set of toolboxes which should be visible for the specified view mode.

Parameters:
_mode name of the ViewMode
_usedWidgets list of used Widgets names

Definition at line 120 of file ViewModeInterface.hh.


The documentation for this class was generated from the following file:
Generated on Wed Jun 23 11:36:08 2010 for DeveloperDocumentation by  doxygen 1.6.3