Gui: implement the methods of WorkbenchManipulatorPython

This commit is contained in:
wmayer
2023-10-05 19:47:21 +02:00
committed by Yorik van Havre
parent 823a8d593f
commit 70cce0d65b
2 changed files with 273 additions and 31 deletions

View File

@@ -48,23 +48,22 @@ protected:
* \brief modifyMenuBar
* Method to manipulate the menu structure of a workbench.
*/
void modifyMenuBar([[maybe_unused]] MenuItem* menuBar) override;
void modifyMenuBar(MenuItem* menuBar) override;
/*!
* \brief modifyContextMenu
* Method to manipulate the contextmenu structure of a workbench.
*/
void modifyContextMenu([[maybe_unused]] const char* recipient,
[[maybe_unused]] MenuItem* menuBar) override;
void modifyContextMenu(const char* recipient, MenuItem* menuBar) override;
/*!
* \brief modifyToolBars
* Method to manipulate the toolbar structure of a workbench
*/
void modifyToolBars([[maybe_unused]] ToolBarItem* toolBar) override;
void modifyToolBars(ToolBarItem* toolBar) override;
/*!
* \brief modifyDockWindows
* Method to manipulate the dock window structure of a workbench
*/
void modifyDockWindows([[maybe_unused]] DockWindowItems* dockWindow) override;
void modifyDockWindows(DockWindowItems* dockWindow) override;
public:
WorkbenchManipulatorPython(const WorkbenchManipulatorPython&) = delete;
@@ -72,6 +71,16 @@ public:
WorkbenchManipulatorPython& operator = (const WorkbenchManipulatorPython&) = delete;
WorkbenchManipulatorPython& operator = (WorkbenchManipulatorPython&&) = delete;
private:
void tryModifyMenuBar(MenuItem* menuBar);
void tryModifyMenuBar(const Py::Dict& dict, MenuItem* menuBar);
void tryModifyContextMenu(const char* recipient, MenuItem* menuBar);
void tryModifyContextMenu(const Py::Dict& dict, MenuItem* menuBar);
void tryModifyToolBar(ToolBarItem* toolBar);
void tryModifyToolBar(const Py::Dict& dict, ToolBarItem* toolBar);
void tryModifyDockWindows(DockWindowItems* menuBar);
void tryModifyDockWindows(const Py::Dict& dict, DockWindowItems* dockWindow);
private:
Py::Object object;
};