ReverseEngineering: Issue #0004473: Expose openCommand() to translation
Continuing the work to expose the undo/redo functionality to translation. This commit does so for the ReverseEngineering Wb. Ticket: https://tracker.freecadweb.org/view.php?id=4473
This commit is contained in:
@@ -187,7 +187,7 @@ void CmdApproxPlane::activated(int)
|
||||
<< "Base.Vector(" << base.x << "," << base.y << "," << base.z << "),"
|
||||
<< "Base.Rotation(" << q0 << "," << q1 << "," << q2 << "," << q3 << "))" << std::endl;
|
||||
|
||||
openCommand("Fit plane");
|
||||
openCommand(QT_TRANSLATE_NOOP("Command", "Fit plane"));
|
||||
runCommand(Gui::Command::Doc, str.str().c_str());
|
||||
commitCommand();
|
||||
updateActive();
|
||||
@@ -218,7 +218,7 @@ CmdApproxCylinder::CmdApproxCylinder()
|
||||
void CmdApproxCylinder::activated(int)
|
||||
{
|
||||
std::vector<Mesh::Feature*> sel = getSelection().getObjectsOfType<Mesh::Feature>();
|
||||
openCommand("Fit cylinder");
|
||||
openCommand(QT_TRANSLATE_NOOP("Command", "Fit cylinder"));
|
||||
for (auto it : sel) {
|
||||
const Mesh::MeshObject& mesh = it->Mesh.getValue();
|
||||
const MeshCore::MeshKernel& kernel = mesh.getKernel();
|
||||
@@ -284,7 +284,7 @@ CmdApproxSphere::CmdApproxSphere()
|
||||
void CmdApproxSphere::activated(int)
|
||||
{
|
||||
std::vector<Mesh::Feature*> sel = getSelection().getObjectsOfType<Mesh::Feature>();
|
||||
openCommand("Fit sphere");
|
||||
openCommand(QT_TRANSLATE_NOOP("Command", "Fit sphere"));
|
||||
for (auto it : sel) {
|
||||
const Mesh::MeshObject& mesh = it->Mesh.getValue();
|
||||
const MeshCore::MeshKernel& kernel = mesh.getKernel();
|
||||
@@ -332,7 +332,7 @@ void CmdApproxPolynomial::activated(int)
|
||||
{
|
||||
std::vector<Mesh::Feature*> sel = getSelection().getObjectsOfType<Mesh::Feature>();
|
||||
App::Document* doc = App::GetApplication().getActiveDocument();
|
||||
openCommand("Fit polynomial surface");
|
||||
openCommand(QT_TRANSLATE_NOOP("Command", "Fit polynomial surface"));
|
||||
for (auto it : sel) {
|
||||
const Mesh::MeshObject& mesh = it->Mesh.getValue();
|
||||
const MeshCore::MeshKernel& kernel = mesh.getKernel();
|
||||
@@ -598,7 +598,7 @@ void CmdViewTriangulation::activated(int)
|
||||
{
|
||||
std::vector<App::DocumentObject*> obj = Gui::Selection().getObjectsOfType(Points::Structured::getClassTypeId());
|
||||
addModule(App,"ReverseEngineering");
|
||||
openCommand("View triangulation");
|
||||
openCommand(QT_TRANSLATE_NOOP("Command", "View triangulation"));
|
||||
try {
|
||||
for (std::vector<App::DocumentObject*>::iterator it = obj.begin(); it != obj.end(); ++it) {
|
||||
App::DocumentObjectT objT(*it);
|
||||
|
||||
@@ -153,7 +153,7 @@ void FitBSplineSurfaceWidget::on_makePlacement_clicked()
|
||||
QString command = QString::fromLatin1("%1.addObject(\"App::Placement\", \"Placement\").Placement = %2")
|
||||
.arg(document, argument);
|
||||
|
||||
Gui::Command::openCommand("Placement");
|
||||
Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Placement"));
|
||||
Gui::Command::runCommand(Gui::Command::Doc, "from FreeCAD import Base");
|
||||
Gui::Command::runCommand(Gui::Command::Doc, command.toLatin1());
|
||||
Gui::Command::commitCommand();
|
||||
@@ -225,7 +225,7 @@ bool FitBSplineSurfaceWidget::accept()
|
||||
|
||||
Gui::WaitCursor wc;
|
||||
Gui::Command::addModule(Gui::Command::App, "ReverseEngineering");
|
||||
Gui::Command::openCommand("Fit B-Spline");
|
||||
Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Fit B-Spline"));
|
||||
Gui::Command::runCommand(Gui::Command::Doc, command.toLatin1());
|
||||
Gui::Command::commitCommand();
|
||||
Gui::Command::updateActive();
|
||||
|
||||
@@ -98,7 +98,7 @@ bool PoissonWidget::accept()
|
||||
|
||||
Gui::WaitCursor wc;
|
||||
Gui::Command::addModule(Gui::Command::App, "ReverseEngineering");
|
||||
Gui::Command::openCommand("Poisson reconstruction");
|
||||
Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Poisson reconstruction"));
|
||||
Gui::Command::runCommand(Gui::Command::Doc, command.toLatin1());
|
||||
Gui::Command::commitCommand();
|
||||
Gui::Command::updateActive();
|
||||
|
||||
@@ -231,7 +231,7 @@ void SegmentationManual::createSegment()
|
||||
return;
|
||||
// delete all selected faces
|
||||
App::Document* adoc = gdoc->getDocument();
|
||||
gdoc->openCommand("Segmentation");
|
||||
gdoc->openCommand(QT_TRANSLATE_NOOP("Command", "Segmentation"));
|
||||
|
||||
std::vector<Mesh::Feature*> meshes = adoc->getObjectsOfType<Mesh::Feature>();
|
||||
bool selected = false;
|
||||
|
||||
Reference in New Issue
Block a user