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...
 
Workbench * active () const
 Returns the active workbench. More...
 
Workbench * createWorkbench (const std::string &name, const std::string &className)
 Searches for and returns an existing workbench object with name name. More...
 
Workbench * getWorkbench (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 WorkbenchManager * instance ()
 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::Console(), Base::Type::createInstanceByName(), Base::BaseClass::getClassTypeId(), getWorkbench(), Base::ConsoleSingleton::Log(), and Gui::Workbench::setName().

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

◆ destruct()

void WorkbenchManager::destruct ( )
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 ( ) const

Returns a list of all created workbench objects.


The documentation for this class was generated from the following files:
  • src/Gui/WorkbenchManager.h
  • src/Gui/WorkbenchManager.cpp