Create a toolbar command group for default views.

Optional toolbar for all individual views is available.
This commit is contained in:
Max Wilfinger
2024-03-11 16:04:18 +01:00
parent c2df0bb75e
commit 560509bfe1
2 changed files with 51 additions and 6 deletions

View File

@@ -1633,6 +1633,40 @@ bool StdCmdViewFitSelection::isActive()
return getGuiApplication()->sendHasMsgToActiveView("ViewSelection");
}
//===========================================================================
// Std_ViewCommandGroup
//===========================================================================
class StdCmdViewGroup: public Gui::GroupCommand
{
public:
StdCmdViewGroup()
: GroupCommand("Std_ViewGroup")
{
sGroup = "Standard-View";
sMenuText = QT_TR_NOOP("Standard views");
sToolTipText = QT_TR_NOOP("Change to a standard view");
sStatusTip = QT_TR_NOOP("Change to a standard view");
sWhatsThis = "Std_ViewGroup";
sPixmap = "view-isometric";
eType = Alter3DView;
setCheckable(false);
setRememberLast(true);
addCommand("Std_ViewIsometric");
addCommand("Std_ViewFront");
addCommand("Std_ViewRight");
addCommand("Std_ViewRear");
addCommand("Std_ViewBottom");
addCommand("Std_ViewLeft");
}
const char* className() const override
{
return "StdCmdViewGroup";
}
};
//===========================================================================
// Std_ViewDock
//===========================================================================
@@ -4180,6 +4214,7 @@ void CreateViewStdCommands()
rcCmdMgr.addCommand(new StdCmdViewRotateRight());
rcCmdMgr.addCommand(new StdStoreWorkingView());
rcCmdMgr.addCommand(new StdRecallWorkingView());
rcCmdMgr.addCommand(new StdCmdViewGroup());
rcCmdMgr.addCommand(new StdCmdViewExample1());
rcCmdMgr.addCommand(new StdCmdViewExample2());