feat(gui): add unified origin commands for PLM operations (#14)
Some checks are pending
Build and Test / build (push) Has started running
Some checks are pending
Build and Test / build (push) Has started running
- Create CommandOrigin.cpp with Origin_Commit, Origin_Pull, Origin_Push, Origin_Info, Origin_BOM commands - Commands delegate to current origin's extended operations - Commands auto-disable based on origin capabilities (supportsRevisions, supportsBOM, supportsPartNumbers) - Add 'Origin Tools' toolbar with PLM operations - Add origin commands to File menu - Register commands via CreateOriginCommands() in Application startup This implements Issue #14: Dynamic toolbar extension for Silo commands
This commit is contained in:
@@ -682,7 +682,10 @@ MenuItem* StdWorkbench::setupMenuBar() const
|
||||
file->setCommand("&File");
|
||||
*file << "Std_New" << "Std_Open" << "Std_RecentFiles" << "Separator" << "Std_CloseActiveWindow"
|
||||
<< "Std_CloseAllWindows" << "Separator" << "Std_Save" << "Std_SaveAs"
|
||||
<< "Std_SaveCopy" << "Std_SaveAll" << "Std_Revert" << "Separator" << "Std_Import"
|
||||
<< "Std_SaveCopy" << "Std_SaveAll" << "Std_Revert"
|
||||
<< "Separator" << "Origin_Commit" << "Origin_Pull" << "Origin_Push"
|
||||
<< "Origin_Info" << "Origin_BOM"
|
||||
<< "Separator" << "Std_Import"
|
||||
<< "Std_Export" << "Std_MergeProjects" << "Std_ProjectInfo"
|
||||
<< "Separator" << "Std_Print" << "Std_PrintPreview" << "Std_PrintPdf"
|
||||
<< "Separator" << "Std_Quit";
|
||||
@@ -836,6 +839,12 @@ ToolBarItem* StdWorkbench::setupToolBars() const
|
||||
file->setCommand("File");
|
||||
*file << "Std_Origin" << "Std_New" << "Std_Open" << "Std_Save";
|
||||
|
||||
// Origin Tools (PLM operations - commands auto-disable when not applicable)
|
||||
auto originTools = new ToolBarItem(root);
|
||||
originTools->setCommand("Origin Tools");
|
||||
*originTools << "Origin_Commit" << "Origin_Pull" << "Origin_Push"
|
||||
<< "Separator" << "Origin_Info" << "Origin_BOM";
|
||||
|
||||
// Edit
|
||||
auto edit = new ToolBarItem(root);
|
||||
edit->setCommand("Edit");
|
||||
|
||||
Reference in New Issue
Block a user