The StdWorkbench class defines the standard menus, toolbars, commandbars etc. More...
#include <Workbench.h>
Public Member Functions | |
virtual void | createMainWindowPopupMenu (MenuItem *) const |
Sets up the contextmenu for the main window for this workbench. More... | |
virtual void | setupContextMenu (const char *recipient, MenuItem *) const |
Defines the standard context menu. More... | |
StdWorkbench () | |
virtual | ~StdWorkbench () |
Public Member Functions inherited from Gui::Workbench | |
bool | activate () |
Activates the workbench and adds/removes GUI elements. More... | |
virtual void | activated () |
Run some actions when the workbench gets activated. More... | |
void | addTaskWatcher (const std::vector< Gui::TaskView::TaskWatcher * > &Watcher) |
helper to add TaskWatcher to the TaskView More... | |
virtual void | createMainWindowPopupMenu (MenuItem *) const |
Sets up the contextmenu for the main window for this workbench. More... | |
virtual void | deactivated () |
Run some actions when the workbench gets deactivated. More... | |
PyObject * | getPyObject () |
The default implementation returns an instance of WorkbenchPy. More... | |
std::list< std::pair< std::string, std::list< std::string > > > | getToolbarItems () const |
Shows a list of all toolbars and their commands. More... | |
std::list< std::string > | listCommandbars () const |
std::list< std::string > | listMenus () const |
std::list< std::string > | listToolbars () const |
std::string | name () const |
Returns the name of the workbench object. More... | |
void | removeTaskWatcher (void) |
remove the added TaskWatcher More... | |
void | retranslate () const |
Translates the window titles of all menus, toolbars and dock windows. More... | |
void | setName (const std::string &) |
Set the name to the workbench object. More... | |
virtual void | setupContextMenu (const char *recipient, MenuItem *) const |
Sets up the contextmenu for this workbench. More... | |
Workbench () | |
Constructs a workbench object. More... | |
virtual | ~Workbench () |
Public Member Functions inherited from Base::BaseClass | |
BaseClass () | |
Construction. More... | |
BaseClass (const BaseClass &)=default | |
virtual PyObject * | getPyObject () |
This method returns the Python wrapper for a C++ object. More... | |
virtual Type | getTypeId () const |
bool | isDerivedFrom (const Type type) const |
BaseClass & | operator= (const BaseClass &)=default |
virtual void | setPyObject (PyObject *) |
virtual | ~BaseClass () |
Destruction. More... | |
Protected Member Functions | |
virtual ToolBarItem * | setupCommandBars () const |
Defines the standard command bars. More... | |
virtual DockWindowItems * | setupDockWindows () const |
Returns a DockWindowItems structure of dock windows this workbench. More... | |
virtual MenuItem * | setupMenuBar () const |
Defines the standard menus. More... | |
virtual ToolBarItem * | setupToolBars () const |
Defines the standard toolbars. More... | |
Protected Member Functions inherited from Gui::Workbench | |
void | addPermanentMenuItems (MenuItem *) const |
Add permanent menu items to the structure. More... | |
virtual ToolBarItem * | setupCommandBars () const =0 |
Returns a ToolBarItem tree structure of command bars for this workbench. More... | |
virtual DockWindowItems * | setupDockWindows () const =0 |
Returns a DockWindowItems structure of dock windows this workbench. More... | |
virtual MenuItem * | setupMenuBar () const =0 |
Returns a MenuItem tree structure of menus for this workbench. More... | |
virtual ToolBarItem * | setupToolBars () const =0 |
Returns a ToolBarItem tree structure of toolbars for this workbench. More... | |
Friends | |
class | PythonWorkbench |
Additional Inherited Members | |
Static Public Member Functions inherited from Gui::Workbench | |
static void | addPermanentMenuItem (const std::string &cmd, const std::string &after) |
Add a permanent menu item cmd after an existing command after. More... | |
static void | createLinkMenu (MenuItem *) |
static void | removePermanentMenuItem (const std::string &cmd) |
Removes the command cmd from the permanent menu items. More... | |
Static Public Member Functions inherited from Base::BaseClass | |
static void * | create () |
static Type | getClassTypeId () |
static void | init () |
Static Protected Member Functions inherited from Base::BaseClass | |
static void | initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr) |
The StdWorkbench class defines the standard menus, toolbars, commandbars etc.
To define own workbenches you should inherit from StdWorkbench instead of Workbench to have defined the standard GUI elements.
StdWorkbench::StdWorkbench | ( | ) |
|
virtual |
|
virtual |
Sets up the contextmenu for the main window for this workbench.
The default implementation does nothing.
Reimplemented from Gui::Workbench.
Referenced by Gui::PythonWorkbench::createMainWindowPopupMenu().
|
protectedvirtual |
Defines the standard command bars.
Implements Gui::Workbench.
Reimplemented in Gui::NoneWorkbench, Gui::TestWorkbench, DrawingGui::Workbench, ImageGui::Workbench, ImportGui::Workbench, MeshGui::Workbench, MeshPartGui::Workbench, PartGui::Workbench, PartDesignGui::Workbench, PointsGui::Workbench, ReverseEngineeringGui::Workbench, SandboxGui::Workbench, SketcherGui::Workbench, SpreadsheetGui::Workbench, StartGui::Workbench, TechDrawGui::Workbench, and WebGui::Workbench.
References Gui::ToolBarItem::setCommand().
|
virtual |
Defines the standard context menu.
Reimplemented from Gui::Workbench.
Reimplemented in FemGui::Workbench, MeshGui::Workbench, PartDesignGui::Workbench, StartGui::Workbench, WebGui::Workbench, and Gui::NoneWorkbench.
References Gui::Workbench::createLinkMenu(), Base::Persistence::getClassTypeId(), Gui::Selection(), and Gui::MenuItem::setCommand().
Referenced by PartDesignGui::Workbench::setupContextMenu(), and Gui::PythonWorkbench::setupContextMenu().
|
protectedvirtual |
Returns a DockWindowItems structure of dock windows this workbench.
Implements Gui::Workbench.
Reimplemented in Gui::NoneWorkbench, SandboxGui::Workbench, StartGui::Workbench, and WebGui::Workbench.
References Gui::DockWindowItems::addDockWidget(), App::GetApplication(), ParameterGrp::GetBool(), ParameterGrp::GetGroup(), and App::Application::GetUserParameter().
Referenced by Gui::PythonWorkbench::setupDockWindows(), SandboxGui::Workbench::setupDockWindows(), StartGui::Workbench::setupDockWindows(), and WebGui::Workbench::setupDockWindows().
|
protectedvirtual |
Defines the standard menus.
Implements Gui::Workbench.
Reimplemented in Gui::NoneWorkbench, Gui::TestWorkbench, DrawingGui::Workbench, FemGui::Workbench, InspectionGui::Workbench, MeshGui::Workbench, PartGui::Workbench, PartDesignGui::Workbench, PointsGui::Workbench, RaytracingGui::Workbench, ReverseEngineeringGui::Workbench, RobotGui::Workbench, SandboxGui::Workbench, SketcherGui::Workbench, SpreadsheetGui::Workbench, StartGui::Workbench, SurfaceGui::Workbench, TechDrawGui::Workbench, and WebGui::Workbench.
References Gui::MenuItem::setCommand().
Referenced by Gui::PythonWorkbench::PythonWorkbench(), Gui::TestWorkbench::setupMenuBar(), StartGui::Workbench::setupMenuBar(), and WebGui::Workbench::setupMenuBar().
|
protectedvirtual |
Defines the standard toolbars.
Implements Gui::Workbench.
Reimplemented in Gui::NoneWorkbench, Gui::TestWorkbench, DrawingGui::Workbench, FemGui::Workbench, ImageGui::Workbench, ImportGui::Workbench, InspectionGui::Workbench, MeshGui::Workbench, MeshPartGui::Workbench, PartGui::Workbench, PartDesignGui::Workbench, PointsGui::Workbench, RaytracingGui::Workbench, ReverseEngineeringGui::Workbench, RobotGui::Workbench, SandboxGui::Workbench, SketcherGui::Workbench, SpreadsheetGui::Workbench, StartGui::Workbench, SurfaceGui::Workbench, TechDrawGui::Workbench, and WebGui::Workbench.
References Gui::ToolBarItem::setCommand().
Referenced by Gui::PythonWorkbench::PythonWorkbench().
|
friend |