[PartDesign] Fix and expose ViewProvider strings to translation
Closes https://github.com/FreeCAD/FreeCAD-translations/issues/24
This commit is contained in:
committed by
Chris Hennes
parent
2c7fce704f
commit
901a1c1915
@@ -56,7 +56,7 @@ using namespace Gui;
|
||||
|
||||
TaskDressUpParameters::TaskDressUpParameters(ViewProviderDressUp *DressUpView, bool selectEdges, bool selectFaces, QWidget *parent)
|
||||
: TaskBox(Gui::BitmapFactory().pixmap((std::string("PartDesign_") + DressUpView->featureName()).c_str()),
|
||||
QString::fromLatin1((DressUpView->featureName() + " parameters").c_str()),
|
||||
DressUpView->menuName,
|
||||
true,
|
||||
parent)
|
||||
, proxy(nullptr)
|
||||
|
||||
@@ -54,7 +54,7 @@ using namespace Gui;
|
||||
|
||||
TaskTransformedParameters::TaskTransformedParameters(ViewProviderTransformed *TransformedView, QWidget *parent)
|
||||
: TaskBox(Gui::BitmapFactory().pixmap((std::string("PartDesign_") + TransformedView->featureName).c_str()),
|
||||
QString::fromLatin1((TransformedView->featureName + " parameters").c_str()), true, parent)
|
||||
TransformedView->menuName, true, parent)
|
||||
, proxy(nullptr)
|
||||
, TransformedView(TransformedView)
|
||||
, parentTask(nullptr)
|
||||
|
||||
@@ -36,7 +36,8 @@ class PartDesignGuiExport ViewProviderChamfer : public ViewProviderDressUp
|
||||
public:
|
||||
/// constructor
|
||||
ViewProviderChamfer()
|
||||
{ sPixmap = "PartDesign_Chamfer.svg"; }
|
||||
{ sPixmap = "PartDesign_Chamfer.svg";
|
||||
menuName = QObject::tr("Chamfer parameters");}
|
||||
|
||||
/// return "Chamfer"
|
||||
virtual const std::string & featureName() const;
|
||||
|
||||
@@ -37,7 +37,8 @@ class PartDesignGuiExport ViewProviderDraft : public ViewProviderDressUp
|
||||
public:
|
||||
/// constructor
|
||||
ViewProviderDraft()
|
||||
{ sPixmap = "PartDesign_Draft.svg"; }
|
||||
{ sPixmap = "PartDesign_Draft.svg";
|
||||
menuName = QObject::tr("Draft parameters"); }
|
||||
|
||||
/// return "Draft"
|
||||
virtual const std::string & featureName() const;
|
||||
|
||||
@@ -55,6 +55,7 @@ public:
|
||||
* Should be reimplemented in the successor.
|
||||
*/
|
||||
virtual const std::string & featureName() const;
|
||||
QString menuName;
|
||||
|
||||
protected:
|
||||
virtual bool setEdit(int ModNum);
|
||||
|
||||
@@ -36,7 +36,8 @@ class PartDesignGuiExport ViewProviderFillet : public ViewProviderDressUp
|
||||
public:
|
||||
/// constructor
|
||||
ViewProviderFillet()
|
||||
{ sPixmap = "PartDesign_Fillet.svg"; }
|
||||
{ sPixmap = "PartDesign_Fillet.svg";
|
||||
menuName = QObject::tr("Fillet parrameters"); }
|
||||
|
||||
/// return "Fillet"
|
||||
virtual const std::string & featureName() const;
|
||||
|
||||
@@ -34,6 +34,7 @@ class PartDesignGuiExport ViewProviderLinearPattern : public ViewProviderTransfo
|
||||
public:
|
||||
ViewProviderLinearPattern()
|
||||
{ featureName = std::string("LinearPattern");
|
||||
menuName = QObject::tr("LinearPattern parameters");
|
||||
sPixmap = "PartDesign_LinearPattern.svg"; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -34,6 +34,7 @@ class PartDesignGuiExport ViewProviderMirrored : public ViewProviderTransformed
|
||||
public:
|
||||
ViewProviderMirrored() {
|
||||
featureName = std::string("Mirrored");
|
||||
menuName = QObject::tr("Mirrored parameters");
|
||||
sPixmap = "PartDesign_Mirrored.svg";
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ class PartDesignGuiExport ViewProviderMultiTransform : public ViewProviderTransf
|
||||
public:
|
||||
ViewProviderMultiTransform() {
|
||||
featureName = std::string("MultiTransform");
|
||||
menuName = QObject::tr("MultiTransform parameters");
|
||||
sPixmap = "PartDesign_MultiTransform.svg";
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ class PartDesignGuiExport ViewProviderPolarPattern : public ViewProviderTransfor
|
||||
public:
|
||||
ViewProviderPolarPattern() {
|
||||
featureName = std::string("PolarPattern");
|
||||
menuName = QObject::tr("PolarPattern parameters");
|
||||
sPixmap = "PartDesign_PolarPattern.svg";
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ class PartDesignGuiExport ViewProviderScaled : public ViewProviderTransformed
|
||||
public:
|
||||
ViewProviderScaled() {
|
||||
featureName = std::string("Scaled");
|
||||
menuName = QObject::tr("Scaled parameters");
|
||||
sPixmap = "PartDesign_Scaled.svg";
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,8 @@ class PartDesignGuiExport ViewProviderThickness : public ViewProviderDressUp
|
||||
public:
|
||||
/// constructor
|
||||
ViewProviderThickness()
|
||||
{ sPixmap = "PartDesign_Thickness.svg"; }
|
||||
{ sPixmap = "PartDesign_Thickness.svg";
|
||||
menuName = QObject::tr("Thickness parameters"); }
|
||||
|
||||
/// return "Thickness"
|
||||
virtual const std::string & featureName() const;
|
||||
|
||||
@@ -51,6 +51,8 @@ public:
|
||||
|
||||
// The feature name of the subclass
|
||||
std::string featureName;
|
||||
// Name of menu dialog
|
||||
QString menuName;
|
||||
|
||||
virtual Gui::ViewProvider *startEditing(int ModNum=0) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user