Gui::WorkbenchManager Class Reference

The WorkbenchManager class manages all workbench objects. More...

#include <WorkbenchManager.h>

Public Member Functions

bool activate (const std::string &name, const std::string &className)
 Activates the workbench with name name. More...
 
Workbenchactive () const
 Returns the active workbench. More...
 
WorkbenchcreateWorkbench (const std::string &name, const std::string &className)
 Searches for and returns an existing workbench object with name name. More...
 
WorkbenchgetWorkbench (const std::string &name) const
 Returns an instance of the workbench with name name. More...
 
void removeWorkbench (const std::string &name)
 Removes the workbench with name name. More...
 
std::list< std::string > workbenches () const
 Returns a list of all created workbench objects. More...
 

Static Public Member Functions

static void destruct ()
 
static WorkbenchManagerinstance ()
 Creates the only instance of the WorkbenchManager. More...
 

Protected Member Functions

 WorkbenchManager ()
 
 ~WorkbenchManager ()
 

Detailed Description

The WorkbenchManager class manages all workbench objects.

Author
Werner Mayer

Constructor & Destructor Documentation

◆ WorkbenchManager()

WorkbenchManager::WorkbenchManager ( )
protected

Referenced by instance().

◆ ~WorkbenchManager()

WorkbenchManager::~WorkbenchManager ( )
protected

Member Function Documentation

◆ activate()

bool WorkbenchManager::activate ( const std::string &  name,
const std::string &  className 
)

◆ active()

◆ createWorkbench()

Workbench * WorkbenchManager::createWorkbench ( const std::string &  name,
const std::string &  className 
)

Searches for and returns an existing workbench object with name name.

If no such workbench exists then a workbench of class className gets created, if possible. If the workbench cannot be created 0 is returned.

References Base::BaseClass::getClassTypeId(), Base::Type::getTypeIfDerivedFrom(), getWorkbench(), and Gui::Workbench::setName().

Referenced by activate(), and Gui::Application::activateWorkbench().

◆ destruct()

void WorkbenchManager::destruct ( void  )
static

◆ getWorkbench()

Workbench * WorkbenchManager::getWorkbench ( const std::string &  name) const

Returns an instance of the workbench with name name.

If there is no such workbench 0 is returned.

Referenced by Gui::Application::activateWorkbench(), and createWorkbench().

◆ instance()

◆ removeWorkbench()

void WorkbenchManager::removeWorkbench ( const std::string &  name)

Removes the workbench with name name.

If there is no such workbench exists nothing happens.

Referenced by Gui::Application::sRemoveWorkbenchHandler().

◆ workbenches()

std::list< std::string > WorkbenchManager::workbenches ( void  ) const

Returns a list of all created workbench objects.


The documentation for this class was generated from the following files: