From bab75bbcb7f48730c19c97c803c8ad8b7574acd6 Mon Sep 17 00:00:00 2001 From: triplus Date: Sun, 6 Aug 2017 20:47:09 +0200 Subject: [PATCH] PDN - what's this and command names improvements --- src/Mod/PartDesign/Gui/Command.cpp | 30 +++++++++---------- src/Mod/PartDesign/Gui/CommandBody.cpp | 14 ++++----- src/Mod/PartDesign/Gui/CommandPrimitive.cpp | 32 +++++++++++++++++++++ 3 files changed, 54 insertions(+), 22 deletions(-) diff --git a/src/Mod/PartDesign/Gui/Command.cpp b/src/Mod/PartDesign/Gui/Command.cpp index 0bb1d2ae70..4617dfe3e7 100644 --- a/src/Mod/PartDesign/Gui/Command.cpp +++ b/src/Mod/PartDesign/Gui/Command.cpp @@ -154,7 +154,7 @@ CmdPartDesignPlane::CmdPartDesignPlane() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Create a datum plane"); sToolTipText = QT_TR_NOOP("Create a new datum plane"); - sWhatsThis = sToolTipText; + sWhatsThis = "PartDesign_Plane"; sStatusTip = sToolTipText; sPixmap = "PartDesign_Plane"; } @@ -182,7 +182,7 @@ CmdPartDesignLine::CmdPartDesignLine() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Create a datum line"); sToolTipText = QT_TR_NOOP("Create a new datum line"); - sWhatsThis = sToolTipText; + sWhatsThis = "PartDesign_Line"; sStatusTip = sToolTipText; sPixmap = "PartDesign_Line"; } @@ -210,7 +210,7 @@ CmdPartDesignPoint::CmdPartDesignPoint() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Create a datum point"); sToolTipText = QT_TR_NOOP("Create a new datum point"); - sWhatsThis = sToolTipText; + sWhatsThis = "PartDesign_Point"; sStatusTip = sToolTipText; sPixmap = "PartDesign_Point"; } @@ -242,7 +242,7 @@ CmdPartDesignShapeBinder::CmdPartDesignShapeBinder() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Create a shape binder"); sToolTipText = QT_TR_NOOP("Create a new shape binder"); - sWhatsThis = sToolTipText; + sWhatsThis = "PartDesign_ShapeBinder"; sStatusTip = sToolTipText; sPixmap = "PartDesign_ShapeBinder"; } @@ -310,7 +310,7 @@ CmdPartDesignNewSketch::CmdPartDesignNewSketch() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Create sketch"); sToolTipText = QT_TR_NOOP("Create a new sketch"); - sWhatsThis = sToolTipText; + sWhatsThis = "PartDesign_NewSketch"; sStatusTip = sToolTipText; sPixmap = "Sketcher_NewSketch"; } @@ -1003,7 +1003,7 @@ CmdPartDesignPocket::CmdPartDesignPocket() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Pocket"); sToolTipText = QT_TR_NOOP("Create a pocket with the selected sketch"); - sWhatsThis = sToolTipText; + sWhatsThis = "PartDesign_Pocket"; sStatusTip = sToolTipText; sPixmap = "PartDesign_Pocket"; } @@ -1050,7 +1050,7 @@ CmdPartDesignHole::CmdPartDesignHole() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Hole"); sToolTipText = QT_TR_NOOP("Create a hole with the selected sketch"); - sWhatsThis = sToolTipText; + sWhatsThis = "PartDesign_Hole"; sStatusTip = sToolTipText; sPixmap = "PartDesign_Hole"; } @@ -1216,7 +1216,7 @@ CmdPartDesignAdditivePipe::CmdPartDesignAdditivePipe() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Additive pipe"); sToolTipText = QT_TR_NOOP("Sweep a selected sketch along a path or to other profiles"); - sWhatsThis = "PartDesign_Additive_Pipe"; + sWhatsThis = "PartDesign_AdditivePipe"; sStatusTip = sToolTipText; sPixmap = "PartDesign_Additive_Pipe"; } @@ -1266,7 +1266,7 @@ CmdPartDesignSubtractivePipe::CmdPartDesignSubtractivePipe() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Subtractive pipe"); sToolTipText = QT_TR_NOOP("Sweep a selected sketch along a path or to other profiles and remove it from the body"); - sWhatsThis = "PartDesign_Subtractive_Pipe"; + sWhatsThis = "PartDesign_SubtractivePipe"; sStatusTip = sToolTipText; sPixmap = "PartDesign_Subtractive_Pipe"; } @@ -1316,7 +1316,7 @@ CmdPartDesignAdditiveLoft::CmdPartDesignAdditiveLoft() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Additive loft"); sToolTipText = QT_TR_NOOP("Loft a selected profile through other profile sections"); - sWhatsThis = "PartDesign_Additive_Loft"; + sWhatsThis = "PartDesign_AdditiveLoft"; sStatusTip = sToolTipText; sPixmap = "PartDesign_Additive_Loft"; } @@ -1366,7 +1366,7 @@ CmdPartDesignSubtractiveLoft::CmdPartDesignSubtractiveLoft() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Subtractive loft"); sToolTipText = QT_TR_NOOP("Loft a selected profile through other profile sections and remove it from the body"); - sWhatsThis = "PartDesign_Subtractive_Loft"; + sWhatsThis = "PartDesign_SubtractiveLoft"; sStatusTip = sToolTipText; sPixmap = "PartDesign_Subtractive_Loft"; } @@ -1519,7 +1519,7 @@ CmdPartDesignFillet::CmdPartDesignFillet() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Fillet"); sToolTipText = QT_TR_NOOP("Make a fillet on an edge, face or body"); - sWhatsThis = sToolTipText; + sWhatsThis = "PartDesign_Fillet"; sStatusTip = sToolTipText; sPixmap = "PartDesign_Fillet"; } @@ -1547,7 +1547,7 @@ CmdPartDesignChamfer::CmdPartDesignChamfer() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Chamfer"); sToolTipText = QT_TR_NOOP("Chamfer the selected edges of a shape"); - sWhatsThis = sToolTipText; + sWhatsThis = "PartDesign_Chamfer"; sStatusTip = sToolTipText; sPixmap = "PartDesign_Chamfer"; } @@ -1775,7 +1775,7 @@ CmdPartDesignMirrored::CmdPartDesignMirrored() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Mirrored"); sToolTipText = QT_TR_NOOP("Create a mirrored feature"); - sWhatsThis = sToolTipText; + sWhatsThis = "PartDesign_Mirrored"; sStatusTip = sToolTipText; sPixmap = "PartDesign_Mirrored"; } @@ -2124,7 +2124,7 @@ CmdPartDesignBoolean::CmdPartDesignBoolean() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Boolean operation"); sToolTipText = QT_TR_NOOP("Boolean operation with two or more bodies"); - sWhatsThis = sToolTipText; + sWhatsThis = "PartDesign_Boolean"; sStatusTip = sToolTipText; sPixmap = "PartDesign_Boolean"; } diff --git a/src/Mod/PartDesign/Gui/CommandBody.cpp b/src/Mod/PartDesign/Gui/CommandBody.cpp index d2bdc9f117..90df532da2 100644 --- a/src/Mod/PartDesign/Gui/CommandBody.cpp +++ b/src/Mod/PartDesign/Gui/CommandBody.cpp @@ -87,7 +87,7 @@ CmdPartDesignPart::CmdPartDesignPart() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Create part"); sToolTipText = QT_TR_NOOP("Create a new part and make it active"); - sWhatsThis = sToolTipText; + sWhatsThis = "PartDesign_Part"; sStatusTip = sToolTipText; sPixmap = "Tree_Annotation"; } @@ -130,7 +130,7 @@ CmdPartDesignBody::CmdPartDesignBody() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Create body"); sToolTipText = QT_TR_NOOP("Create a new body and make it active"); - sWhatsThis = sToolTipText; + sWhatsThis = "PartDesign_Body"; sStatusTip = sToolTipText; sPixmap = "PartDesign_Body_Create_New"; } @@ -258,7 +258,7 @@ CmdPartDesignMigrate::CmdPartDesignMigrate() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Migrate"); sToolTipText = QT_TR_NOOP("Migrate document to the modern partdesign workflow"); - sWhatsThis = sToolTipText; + sWhatsThis = "PartDesign_Migrate"; sStatusTip = sToolTipText; } @@ -472,7 +472,7 @@ CmdPartDesignMoveTip::CmdPartDesignMoveTip() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Set tip"); sToolTipText = QT_TR_NOOP("Move the tip of the body"); - sWhatsThis = sToolTipText; + sWhatsThis = "PartDesign_MoveTip"; sStatusTip = sToolTipText; sPixmap = "PartDesign_MoveTip"; } @@ -552,7 +552,7 @@ CmdPartDesignDuplicateSelection::CmdPartDesignDuplicateSelection() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Duplicate selected object"); sToolTipText = QT_TR_NOOP("Duplicates the selected object and adds it to the active body"); - sWhatsThis = sToolTipText; + sWhatsThis = "PartDesign_DuplicateSelection"; sStatusTip = sToolTipText; } @@ -608,7 +608,7 @@ CmdPartDesignMoveFeature::CmdPartDesignMoveFeature() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Move object to other body"); sToolTipText = QT_TR_NOOP("Moves the selected object to another body"); - sWhatsThis = sToolTipText; + sWhatsThis = "PartDesign_MoveFeature"; sStatusTip = sToolTipText; sPixmap = ""; } @@ -769,7 +769,7 @@ CmdPartDesignMoveFeatureInTree::CmdPartDesignMoveFeatureInTree() sGroup = QT_TR_NOOP("PartDesign"); sMenuText = QT_TR_NOOP("Move object after other object"); sToolTipText = QT_TR_NOOP("Moves the selected object and insert it after another object"); - sWhatsThis = sToolTipText; + sWhatsThis = "PartDesign_MoveFeatureInTree"; sStatusTip = sToolTipText; sPixmap = ""; } diff --git a/src/Mod/PartDesign/Gui/CommandPrimitive.cpp b/src/Mod/PartDesign/Gui/CommandPrimitive.cpp index 6ecc7d69c9..7314d40b03 100644 --- a/src/Mod/PartDesign/Gui/CommandPrimitive.cpp +++ b/src/Mod/PartDesign/Gui/CommandPrimitive.cpp @@ -129,20 +129,36 @@ Gui::Action * CmdPrimtiveCompAdditive::createAction(void) QAction* p1 = pcAction->addAction(QString()); p1->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Additive_Box")); + p1->setObjectName(QString::fromLatin1("PartDesign_AdditiveBox")); + p1->setWhatsThis(QString::fromLatin1("PartDesign_AdditiveBox")); QAction* p2 = pcAction->addAction(QString()); p2->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Additive_Cylinder")); + p2->setObjectName(QString::fromLatin1("PartDesign_AdditiveCylinder")); + p2->setWhatsThis(QString::fromLatin1("PartDesign_AdditiveCylinder")); QAction* p3 = pcAction->addAction(QString()); p3->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Additive_Sphere")); + p3->setObjectName(QString::fromLatin1("PartDesign_AdditiveSphere")); + p3->setWhatsThis(QString::fromLatin1("PartDesign_AdditiveSphere")); QAction* p4 = pcAction->addAction(QString()); p4->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Additive_Cone")); + p4->setObjectName(QString::fromLatin1("PartDesign_AdditiveCone")); + p4->setWhatsThis(QString::fromLatin1("PartDesign_AdditiveCone")); QAction* p5 = pcAction->addAction(QString()); p5->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Additive_Ellipsoid")); + p5->setObjectName(QString::fromLatin1("PartDesign_AdditiveEllipsoid")); + p5->setWhatsThis(QString::fromLatin1("PartDesign_AdditiveEllipsoid")); QAction* p6 = pcAction->addAction(QString()); p6->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Additive_Torus")); + p6->setObjectName(QString::fromLatin1("PartDesign_AdditiveTorus")); + p6->setWhatsThis(QString::fromLatin1("PartDesign_AdditiveTorus")); QAction* p7 = pcAction->addAction(QString()); p7->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Additive_Prism")); + p7->setObjectName(QString::fromLatin1("PartDesign_AdditivePrism")); + p7->setWhatsThis(QString::fromLatin1("PartDesign_AdditivePrism")); QAction* p8 = pcAction->addAction(QString()); p8->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Additive_Wedge")); + p8->setObjectName(QString::fromLatin1("PartDesign_AdditiveWedge")); + p8->setWhatsThis(QString::fromLatin1("PartDesign_AdditiveWedge")); _pcAction = pcAction; languageChange(); @@ -270,20 +286,36 @@ Gui::Action * CmdPrimtiveCompSubtractive::createAction(void) QAction* p1 = pcAction->addAction(QString()); p1->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Subtractive_Box")); + p1->setObjectName(QString::fromLatin1("PartDesign_SubtractiveBox")); + p1->setWhatsThis(QString::fromLatin1("PartDesign_SubtractiveBox")); QAction* p2 = pcAction->addAction(QString()); p2->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Subtractive_Cylinder")); + p2->setObjectName(QString::fromLatin1("PartDesign_SubtractiveCylinder")); + p2->setWhatsThis(QString::fromLatin1("PartDesign_SubtractiveCylinder")); QAction* p3 = pcAction->addAction(QString()); p3->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Subtractive_Sphere")); + p3->setObjectName(QString::fromLatin1("PartDesign_SubtractiveSphere")); + p3->setWhatsThis(QString::fromLatin1("PartDesign_SubtractiveSphere")); QAction* p4 = pcAction->addAction(QString()); p4->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Subtractive_Cone")); + p4->setObjectName(QString::fromLatin1("PartDesign_SubtractiveCone")); + p4->setWhatsThis(QString::fromLatin1("PartDesign_SubtractiveCone")); QAction* p5 = pcAction->addAction(QString()); p5->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Subtractive_Ellipsoid")); + p5->setObjectName(QString::fromLatin1("PartDesign_SubtractiveEllipsoid")); + p5->setWhatsThis(QString::fromLatin1("PartDesign_SubtractiveEllipsoid")); QAction* p6 = pcAction->addAction(QString()); p6->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Subtractive_Torus")); + p6->setObjectName(QString::fromLatin1("PartDesign_SubtractiveTorus")); + p6->setWhatsThis(QString::fromLatin1("PartDesign_SubtractiveTorus")); QAction* p7 = pcAction->addAction(QString()); p7->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Subtractive_Prism")); + p7->setObjectName(QString::fromLatin1("PartDesign_SubtractivePrism")); + p7->setWhatsThis(QString::fromLatin1("PartDesign_SubtractivePrism")); QAction* p8 = pcAction->addAction(QString()); p8->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Subtractive_Wedge")); + p8->setObjectName(QString::fromLatin1("PartDesign_SubtractiveWedge")); + p8->setWhatsThis(QString::fromLatin1("PartDesign_SubtractiveWedge")); _pcAction = pcAction; languageChange();