Gui::Workbench Class Reference

This is the base class for the workbench facility. More...

#include <Workbench.h>

Inheritance diagram for Gui::Workbench:
Base::BaseClass Gui::BlankWorkbench Gui::StdWorkbench AssemblyGui::Workbench CamGui::Workbench CompleteGui::Workbench DrawingGui::Workbench FemGui::Workbench Gui::NoneWorkbench Gui::PythonWorkbench Gui::TestWorkbench ImageGui::Workbench ImportGui::Workbench InspectionGui::Workbench MeshGui::Workbench MeshPartGui::Workbench PartDesignGui::Workbench PartGui::Workbench PointsGui::Workbench RaytracingGui::Workbench ReverseEngineeringGui::Workbench RobotGui::Workbench SandboxGui::Workbench SketcherGui::Workbench StartGui::Workbench WebGui::Workbench

List of all members.

Public Member Functions

bool activate ()
 Activates the workbench and adds/removes GUI elements.
virtual void activated ()
 Run some actions when the workbench gets activated.
void addTaskWatcher (std::vector< Gui::TaskView::TaskWatcher * > &Watcher)
 helper to add TaskWatcher to the TaskView
virtual void createMainWindowPopupMenu (MenuItem *) const
 Sets up the contextmenu for the main window for this workbench.
virtual void deactivated ()
 Run some actions when the workbench gets deactivated.
PyObjectgetPyObject ()
 The default implementation returns an instance of WorkbenchPy.
virtual Base::Type getTypeId (void) const
std::string name () const
 Returns the name of the workbench object.
void removeTaskWatcher (void)
 remove the added TaskWatcher
void retranslate () const
 Translates the window titles of all menus, toolbars and dock windows.
void setName (const std::string &)
 Set the name to the workbench object.
virtual void setupContextMenu (const char *recipient, MenuItem *) const
 Sets up the contextmenu for this workbench.
 Workbench ()
 Constructs a workbench object.
virtual ~Workbench ()

Static Public Member Functions

static void * create (void)
static Base::Type getClassTypeId (void)
static void init (void)

Protected Member Functions

virtual ToolBarItemsetupCommandBars () const =0
 Returns a ToolBarItem tree structure of command bars for this workbench.
virtual DockWindowItemssetupDockWindows () const =0
 Returns a DockWindowItems structure of dock windows this workbench.
virtual MenuItemsetupMenuBar () const =0
 Returns a MenuItem tree structure of menus for this workbench.
virtual ToolBarItemsetupToolBars () const =0
 Returns a ToolBarItem tree structure of toolbars for this workbench.

Detailed Description

This is the base class for the workbench facility.

Each FreeCAD module can provide its own workbench implementation. The workbench defines which GUI elements (such as toolbars, menus, dockable windows, ...) are added to the mainwindow and which gets removed or hidden. When a workbench object gets activated the first time the module - it stands for - gets loaded into RAM.

Author:
Werner Mayer

Definition at line 51 of file Gui/Workbench.h.


Constructor & Destructor Documentation

Workbench::Workbench (  ) 
Workbench::~Workbench (  )  [virtual]

Member Function Documentation

bool Workbench::activate ( void   ) 
void Workbench::activated (  )  [virtual]

Run some actions when the workbench gets activated.

Reimplemented in Gui::BlankWorkbench, PartDesignGui::Workbench, RobotGui::Workbench, and StartGui::Workbench.

Definition at line 298 of file Gui/Workbench.cpp.

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

void Workbench::addTaskWatcher ( std::vector< Gui::TaskView::TaskWatcher * > &  Watcher  ) 
void * Workbench::create ( void   )  [static]
void Workbench::createMainWindowPopupMenu ( MenuItem  )  const [virtual]

Sets up the contextmenu for the main window for this workbench.

The default implementation does nothing.

Reimplemented in Gui::StdWorkbench.

Definition at line 294 of file Gui/Workbench.cpp.

Referenced by Gui::MainWindow::createPopupMenu().

void Workbench::deactivated (  )  [virtual]

Run some actions when the workbench gets deactivated.

Reimplemented in Gui::BlankWorkbench, PartDesignGui::Workbench, and RobotGui::Workbench.

Definition at line 302 of file Gui/Workbench.cpp.

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

Base::Type Workbench::getClassTypeId ( void   )  [static]
PyObject * Workbench::getPyObject ( void   )  [virtual]

The default implementation returns an instance of WorkbenchPy.

Reimplemented from Base::BaseClass.

Reimplemented in Gui::PythonWorkbench.

Definition at line 339 of file Gui/Workbench.cpp.

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

Base::Type Workbench::getTypeId ( void   )  const [virtual]
void Workbench::init ( void   )  [static]
std::string Workbench::name (  )  const
void Workbench::removeTaskWatcher ( void   ) 
void Workbench::retranslate (  )  const
void Workbench::setName ( const std::string &  name  ) 

Set the name to the workbench object.

Definition at line 217 of file Gui/Workbench.cpp.

Referenced by Gui::WorkbenchManager::createWorkbench(), and Gui::WorkbenchFactoryInst::createWorkbench().

virtual ToolBarItem* Gui::Workbench::setupCommandBars (  )  const [protected, pure virtual]
void Workbench::setupContextMenu ( const char *  recipient,
MenuItem item 
) const [virtual]

Sets up the contextmenu for this workbench.

The default implementation does nothing.

Reimplemented in Gui::StdWorkbench, Gui::BlankWorkbench, Gui::NoneWorkbench, Gui::PythonWorkbench, CompleteGui::Workbench, MeshGui::Workbench, StartGui::Workbench, and WebGui::Workbench.

Definition at line 290 of file Gui/Workbench.cpp.

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

virtual DockWindowItems* Gui::Workbench::setupDockWindows (  )  const [protected, pure virtual]

Returns a DockWindowItems structure of dock windows this workbench.

Implemented in Gui::StdWorkbench, Gui::BlankWorkbench, Gui::NoneWorkbench, CompleteGui::Workbench, StartGui::Workbench, and WebGui::Workbench.

Referenced by activate().

virtual MenuItem* Gui::Workbench::setupMenuBar (  )  const [protected, pure virtual]
virtual ToolBarItem* Gui::Workbench::setupToolBars (  )  const [protected, pure virtual]

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

Generated on Wed Nov 23 19:02:05 2011 for FreeCAD by  doxygen 1.6.1