Merge pull request #10761 from Ondsel-Development/ui_view_toolbar
Toolbar View and Structure cleaning
This commit is contained in:
@@ -206,7 +206,12 @@ StdCmdLinkMake::StdCmdLinkMake()
|
||||
{
|
||||
sGroup = "Link";
|
||||
sMenuText = QT_TR_NOOP("Make link");
|
||||
sToolTipText = QT_TR_NOOP("Create a link to the selected object(s)");
|
||||
static std::string toolTip = std::string("<p>")
|
||||
+ QT_TR_NOOP("A Link is an object that references or links to another object in the same "
|
||||
"document, or in another document.Unlike Clones, Links reference the original Shape directly, "
|
||||
" making them more memory efficient which helps with the creation of complex assemblies.")
|
||||
+ "</p>";
|
||||
sToolTipText = toolTip.c_str();
|
||||
sWhatsThis = "Std_LinkMake";
|
||||
sStatusTip = sToolTipText;
|
||||
eType = AlterDoc;
|
||||
@@ -214,7 +219,7 @@ StdCmdLinkMake::StdCmdLinkMake()
|
||||
}
|
||||
|
||||
bool StdCmdLinkMake::isActive() {
|
||||
return !!App::GetApplication().getActiveDocument();
|
||||
return App::GetApplication().getActiveDocument();
|
||||
}
|
||||
|
||||
void StdCmdLinkMake::activated(int) {
|
||||
@@ -878,6 +883,7 @@ public:
|
||||
eType = AlterDoc;
|
||||
bCanLog = false;
|
||||
|
||||
addCommand(new StdCmdLinkMake());
|
||||
addCommand(new StdCmdLinkMakeRelative());
|
||||
addCommand(new StdCmdLinkReplace());
|
||||
addCommand(new StdCmdLinkUnlink());
|
||||
@@ -898,7 +904,6 @@ namespace Gui {
|
||||
void CreateLinkCommands()
|
||||
{
|
||||
CommandManager &rcCmdMgr = Application::Instance->commandManager();
|
||||
rcCmdMgr.addCommand(new StdCmdLinkMake());
|
||||
rcCmdMgr.addCommand(new StdCmdLinkActions());
|
||||
rcCmdMgr.addCommand(new StdCmdLinkMakeGroup());
|
||||
rcCmdMgr.addCommand(new StdCmdLinkSelectActions());
|
||||
|
||||
@@ -49,7 +49,13 @@ StdCmdPart::StdCmdPart()
|
||||
{
|
||||
sGroup = "Structure";
|
||||
sMenuText = QT_TR_NOOP("Create part");
|
||||
sToolTipText = QT_TR_NOOP("Create a new part and make it active");
|
||||
static std::string toolTip = std::string("<p>")
|
||||
+ QT_TR_NOOP("A Part is is a general purpose container to keep together a "
|
||||
"group of objects so that they act as a unit in the 3D view.\n"
|
||||
"It is meant to arrange objects that have a Part TopoShape, like Part Primitives, PartDesign"
|
||||
" Bodies, and other Parts.")
|
||||
+ "</p>";
|
||||
sToolTipText = toolTip.c_str();
|
||||
sWhatsThis = "Std_Part";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "Geofeaturegroup";
|
||||
@@ -90,7 +96,13 @@ StdCmdGroup::StdCmdGroup()
|
||||
{
|
||||
sGroup = "Structure";
|
||||
sMenuText = QT_TR_NOOP("Create group");
|
||||
sToolTipText = QT_TR_NOOP("Create a new group for ordering objects");
|
||||
static std::string toolTip = std::string("<p>")
|
||||
+ QT_TR_NOOP("A Group is a general purpose container to group objects in the "
|
||||
"Tree view, regardless of their data type. It is a simple folder to organize "
|
||||
"the objects in a model.")
|
||||
+ "</p>";
|
||||
|
||||
sToolTipText = toolTip.c_str();
|
||||
sWhatsThis = "Std_Group";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "folder";
|
||||
|
||||
@@ -3577,10 +3577,14 @@ StdCmdSelBack::StdCmdSelBack()
|
||||
:Command("Std_SelBack")
|
||||
{
|
||||
sGroup = "View";
|
||||
sMenuText = QT_TR_NOOP("&Back");
|
||||
sToolTipText = QT_TR_NOOP("Go back to previous selection");
|
||||
sMenuText = QT_TR_NOOP("Selection Back");
|
||||
static std::string toolTip = std::string("<p>")
|
||||
+ QT_TR_NOOP("Restore the previous Tree view selection. "
|
||||
"Only works if Tree RecordSelection mode is switched on.")
|
||||
+ "</p>";
|
||||
sToolTipText = toolTip.c_str();
|
||||
sWhatsThis = "Std_SelBack";
|
||||
sStatusTip = QT_TR_NOOP("Go back to previous selection");
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "sel-back";
|
||||
sAccel = "S, B";
|
||||
eType = AlterSelection;
|
||||
@@ -3607,10 +3611,14 @@ StdCmdSelForward::StdCmdSelForward()
|
||||
:Command("Std_SelForward")
|
||||
{
|
||||
sGroup = "View";
|
||||
sMenuText = QT_TR_NOOP("&Forward");
|
||||
sToolTipText = QT_TR_NOOP("Repeat the backed selection");
|
||||
sMenuText = QT_TR_NOOP("Selection Forward");
|
||||
static std::string toolTip = std::string("<p>")
|
||||
+ QT_TR_NOOP("Restore the next Tree view selection. "
|
||||
"Only works if Tree RecordSelection mode is switched on.")
|
||||
+ "</p>";
|
||||
sToolTipText = toolTip.c_str();
|
||||
sWhatsThis = "Std_SelForward";
|
||||
sStatusTip = QT_TR_NOOP("Repeat the backed selection");
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "sel-forward";
|
||||
sAccel = "S, F";
|
||||
eType = AlterSelection;
|
||||
@@ -3876,6 +3884,11 @@ public:
|
||||
|
||||
addCommand(new StdTreeDrag(),!cmds.empty());
|
||||
addCommand(new StdTreeSelection(),!cmds.empty());
|
||||
|
||||
addCommand();
|
||||
|
||||
addCommand(new StdCmdSelBack());
|
||||
addCommand(new StdCmdSelForward());
|
||||
}
|
||||
const char* className() const override {return "StdCmdTreeViewActions";}
|
||||
};
|
||||
|
||||
@@ -690,6 +690,7 @@ MenuItem* StdWorkbench::setupMenuBar() const
|
||||
<< "Std_ToggleNavigation"
|
||||
<< "Std_SetAppearance" << "Std_RandomColor" << "Separator"
|
||||
<< "Std_Workbench" << "Std_ToolBarMenu" << "Std_DockViewMenu" << "Separator"
|
||||
<< "Std_LinkSelectActions"
|
||||
<< "Std_TreeViewActions"
|
||||
<< "Std_ViewStatusBar";
|
||||
|
||||
@@ -791,16 +792,16 @@ ToolBarItem* StdWorkbench::setupToolBars() const
|
||||
// View
|
||||
auto view = new ToolBarItem( root );
|
||||
view->setCommand("View");
|
||||
*view << "Std_ViewFitAll" << "Std_ViewFitSelection" << "Std_DrawStyle" << "Std_SelBoundingBox"
|
||||
<< "Separator" << "Std_SelectFilter" << "Std_SelBack" << "Std_SelForward"
|
||||
<< "Std_LinkSelectActions"<< "Separator" << "Std_TreeViewActions" << "Std_ViewIsometric"
|
||||
<< "Std_ViewFront"<< "Std_ViewTop" << "Std_ViewRight" << "Separator" << "Std_ViewRear"
|
||||
<< "Separator" << "Std_ViewBottom"<< "Std_ViewLeft" << "Separator" << "Std_MeasureDistance";
|
||||
*view << "Std_ViewFitAll" << "Std_ViewFitSelection" << "Std_ViewIsometric"
|
||||
<< "Std_ViewFront"<< "Std_ViewTop" << "Std_ViewRight"
|
||||
<< "Std_ViewRear" << "Std_ViewBottom"<< "Std_ViewLeft"
|
||||
<< "Separator" << "Std_DrawStyle" << "Std_SelectFilter" << "Std_TreeViewActions"
|
||||
<< "Separator" << "Std_MeasureDistance";
|
||||
|
||||
// Structure
|
||||
auto structure = new ToolBarItem( root );
|
||||
structure->setCommand("Structure");
|
||||
*structure << "Std_Part" << "Std_Group" << "Std_LinkMake" << "Std_LinkActions";
|
||||
*structure << "Std_Part" << "Std_Group" << "Std_LinkActions";
|
||||
|
||||
// Help
|
||||
auto help = new ToolBarItem( root );
|
||||
|
||||
Reference in New Issue
Block a user