PartDesign: Use QStringLiteral
This commit is contained in:
@@ -143,36 +143,36 @@ Gui::Action * CmdPrimtiveCompAdditive::createAction()
|
||||
|
||||
QAction* p1 = pcAction->addAction(QString());
|
||||
p1->setIcon(Gui::BitmapFactory().iconFromTheme("PartDesign_AdditiveBox"));
|
||||
p1->setObjectName(QString::fromLatin1("PartDesign_AdditiveBox"));
|
||||
p1->setWhatsThis(QString::fromLatin1("PartDesign_AdditiveBox"));
|
||||
p1->setObjectName(QStringLiteral("PartDesign_AdditiveBox"));
|
||||
p1->setWhatsThis(QStringLiteral("PartDesign_AdditiveBox"));
|
||||
QAction* p2 = pcAction->addAction(QString());
|
||||
p2->setIcon(Gui::BitmapFactory().iconFromTheme("PartDesign_AdditiveCylinder"));
|
||||
p2->setObjectName(QString::fromLatin1("PartDesign_AdditiveCylinder"));
|
||||
p2->setWhatsThis(QString::fromLatin1("PartDesign_AdditiveCylinder"));
|
||||
p2->setObjectName(QStringLiteral("PartDesign_AdditiveCylinder"));
|
||||
p2->setWhatsThis(QStringLiteral("PartDesign_AdditiveCylinder"));
|
||||
QAction* p3 = pcAction->addAction(QString());
|
||||
p3->setIcon(Gui::BitmapFactory().iconFromTheme("PartDesign_AdditiveSphere"));
|
||||
p3->setObjectName(QString::fromLatin1("PartDesign_AdditiveSphere"));
|
||||
p3->setWhatsThis(QString::fromLatin1("PartDesign_AdditiveSphere"));
|
||||
p3->setObjectName(QStringLiteral("PartDesign_AdditiveSphere"));
|
||||
p3->setWhatsThis(QStringLiteral("PartDesign_AdditiveSphere"));
|
||||
QAction* p4 = pcAction->addAction(QString());
|
||||
p4->setIcon(Gui::BitmapFactory().iconFromTheme("PartDesign_AdditiveCone"));
|
||||
p4->setObjectName(QString::fromLatin1("PartDesign_AdditiveCone"));
|
||||
p4->setWhatsThis(QString::fromLatin1("PartDesign_AdditiveCone"));
|
||||
p4->setObjectName(QStringLiteral("PartDesign_AdditiveCone"));
|
||||
p4->setWhatsThis(QStringLiteral("PartDesign_AdditiveCone"));
|
||||
QAction* p5 = pcAction->addAction(QString());
|
||||
p5->setIcon(Gui::BitmapFactory().iconFromTheme("PartDesign_AdditiveEllipsoid"));
|
||||
p5->setObjectName(QString::fromLatin1("PartDesign_AdditiveEllipsoid"));
|
||||
p5->setWhatsThis(QString::fromLatin1("PartDesign_AdditiveEllipsoid"));
|
||||
p5->setObjectName(QStringLiteral("PartDesign_AdditiveEllipsoid"));
|
||||
p5->setWhatsThis(QStringLiteral("PartDesign_AdditiveEllipsoid"));
|
||||
QAction* p6 = pcAction->addAction(QString());
|
||||
p6->setIcon(Gui::BitmapFactory().iconFromTheme("PartDesign_AdditiveTorus"));
|
||||
p6->setObjectName(QString::fromLatin1("PartDesign_AdditiveTorus"));
|
||||
p6->setWhatsThis(QString::fromLatin1("PartDesign_AdditiveTorus"));
|
||||
p6->setObjectName(QStringLiteral("PartDesign_AdditiveTorus"));
|
||||
p6->setWhatsThis(QStringLiteral("PartDesign_AdditiveTorus"));
|
||||
QAction* p7 = pcAction->addAction(QString());
|
||||
p7->setIcon(Gui::BitmapFactory().iconFromTheme("PartDesign_AdditivePrism"));
|
||||
p7->setObjectName(QString::fromLatin1("PartDesign_AdditivePrism"));
|
||||
p7->setWhatsThis(QString::fromLatin1("PartDesign_AdditivePrism"));
|
||||
p7->setObjectName(QStringLiteral("PartDesign_AdditivePrism"));
|
||||
p7->setWhatsThis(QStringLiteral("PartDesign_AdditivePrism"));
|
||||
QAction* p8 = pcAction->addAction(QString());
|
||||
p8->setIcon(Gui::BitmapFactory().iconFromTheme("PartDesign_AdditiveWedge"));
|
||||
p8->setObjectName(QString::fromLatin1("PartDesign_AdditiveWedge"));
|
||||
p8->setWhatsThis(QString::fromLatin1("PartDesign_AdditiveWedge"));
|
||||
p8->setObjectName(QStringLiteral("PartDesign_AdditiveWedge"));
|
||||
p8->setWhatsThis(QStringLiteral("PartDesign_AdditiveWedge"));
|
||||
|
||||
_pcAction = pcAction;
|
||||
languageChange();
|
||||
@@ -295,36 +295,36 @@ Gui::Action * CmdPrimtiveCompSubtractive::createAction()
|
||||
|
||||
QAction* p1 = pcAction->addAction(QString());
|
||||
p1->setIcon(Gui::BitmapFactory().iconFromTheme("PartDesign_SubtractiveBox"));
|
||||
p1->setObjectName(QString::fromLatin1("PartDesign_SubtractiveBox"));
|
||||
p1->setWhatsThis(QString::fromLatin1("PartDesign_SubtractiveBox"));
|
||||
p1->setObjectName(QStringLiteral("PartDesign_SubtractiveBox"));
|
||||
p1->setWhatsThis(QStringLiteral("PartDesign_SubtractiveBox"));
|
||||
QAction* p2 = pcAction->addAction(QString());
|
||||
p2->setIcon(Gui::BitmapFactory().iconFromTheme("PartDesign_SubtractiveCylinder"));
|
||||
p2->setObjectName(QString::fromLatin1("PartDesign_SubtractiveCylinder"));
|
||||
p2->setWhatsThis(QString::fromLatin1("PartDesign_SubtractiveCylinder"));
|
||||
p2->setObjectName(QStringLiteral("PartDesign_SubtractiveCylinder"));
|
||||
p2->setWhatsThis(QStringLiteral("PartDesign_SubtractiveCylinder"));
|
||||
QAction* p3 = pcAction->addAction(QString());
|
||||
p3->setIcon(Gui::BitmapFactory().iconFromTheme("PartDesign_SubtractiveSphere"));
|
||||
p3->setObjectName(QString::fromLatin1("PartDesign_SubtractiveSphere"));
|
||||
p3->setWhatsThis(QString::fromLatin1("PartDesign_SubtractiveSphere"));
|
||||
p3->setObjectName(QStringLiteral("PartDesign_SubtractiveSphere"));
|
||||
p3->setWhatsThis(QStringLiteral("PartDesign_SubtractiveSphere"));
|
||||
QAction* p4 = pcAction->addAction(QString());
|
||||
p4->setIcon(Gui::BitmapFactory().iconFromTheme("PartDesign_SubtractiveCone"));
|
||||
p4->setObjectName(QString::fromLatin1("PartDesign_SubtractiveCone"));
|
||||
p4->setWhatsThis(QString::fromLatin1("PartDesign_SubtractiveCone"));
|
||||
p4->setObjectName(QStringLiteral("PartDesign_SubtractiveCone"));
|
||||
p4->setWhatsThis(QStringLiteral("PartDesign_SubtractiveCone"));
|
||||
QAction* p5 = pcAction->addAction(QString());
|
||||
p5->setIcon(Gui::BitmapFactory().iconFromTheme("PartDesign_SubtractiveEllipsoid"));
|
||||
p5->setObjectName(QString::fromLatin1("PartDesign_SubtractiveEllipsoid"));
|
||||
p5->setWhatsThis(QString::fromLatin1("PartDesign_SubtractiveEllipsoid"));
|
||||
p5->setObjectName(QStringLiteral("PartDesign_SubtractiveEllipsoid"));
|
||||
p5->setWhatsThis(QStringLiteral("PartDesign_SubtractiveEllipsoid"));
|
||||
QAction* p6 = pcAction->addAction(QString());
|
||||
p6->setIcon(Gui::BitmapFactory().iconFromTheme("PartDesign_SubtractiveTorus"));
|
||||
p6->setObjectName(QString::fromLatin1("PartDesign_SubtractiveTorus"));
|
||||
p6->setWhatsThis(QString::fromLatin1("PartDesign_SubtractiveTorus"));
|
||||
p6->setObjectName(QStringLiteral("PartDesign_SubtractiveTorus"));
|
||||
p6->setWhatsThis(QStringLiteral("PartDesign_SubtractiveTorus"));
|
||||
QAction* p7 = pcAction->addAction(QString());
|
||||
p7->setIcon(Gui::BitmapFactory().iconFromTheme("PartDesign_SubtractivePrism"));
|
||||
p7->setObjectName(QString::fromLatin1("PartDesign_SubtractivePrism"));
|
||||
p7->setWhatsThis(QString::fromLatin1("PartDesign_SubtractivePrism"));
|
||||
p7->setObjectName(QStringLiteral("PartDesign_SubtractivePrism"));
|
||||
p7->setWhatsThis(QStringLiteral("PartDesign_SubtractivePrism"));
|
||||
QAction* p8 = pcAction->addAction(QString());
|
||||
p8->setIcon(Gui::BitmapFactory().iconFromTheme("PartDesign_SubtractiveWedge"));
|
||||
p8->setObjectName(QString::fromLatin1("PartDesign_SubtractiveWedge"));
|
||||
p8->setWhatsThis(QString::fromLatin1("PartDesign_SubtractiveWedge"));
|
||||
p8->setObjectName(QStringLiteral("PartDesign_SubtractiveWedge"));
|
||||
p8->setWhatsThis(QStringLiteral("PartDesign_SubtractiveWedge"));
|
||||
|
||||
_pcAction = pcAction;
|
||||
languageChange();
|
||||
|
||||
@@ -52,7 +52,7 @@ DlgActiveBody::DlgActiveBody(QWidget *parent, App::Document*& doc, const QString
|
||||
this, &DlgActiveBody::accept);
|
||||
|
||||
if (!infoText.isEmpty()) {
|
||||
ui->label->setText(infoText + QString::fromUtf8("\n\n") + tr("Please select"));
|
||||
ui->label->setText(infoText + QStringLiteral("\n\n") + tr("Please select"));
|
||||
}
|
||||
|
||||
auto bodies = _doc->getObjectsOfType(PartDesign::Body::getClassTypeId());
|
||||
|
||||
@@ -78,7 +78,7 @@ FeaturePickDialog::FeaturePickDialog(std::vector<App::DocumentObject*>& objects,
|
||||
std::vector<featureStatus>::const_iterator st = status.begin();
|
||||
for (std::vector<App::DocumentObject*>::const_iterator o = objects.begin(); o != objects.end(); ++o) {
|
||||
QListWidgetItem* item = new QListWidgetItem(QString::fromLatin1((*o)->getNameInDocument()) +
|
||||
QString::fromLatin1(" (") + getFeatureStatusString(*st) + QString::fromLatin1(")"));
|
||||
QStringLiteral(" (") + getFeatureStatusString(*st) + QStringLiteral(")"));
|
||||
ui->listWidget->addItem(item);
|
||||
st++;
|
||||
}
|
||||
@@ -164,7 +164,7 @@ void FeaturePickDialog::accept()
|
||||
QListIterator<QListWidgetItem*> i(ui->listWidget->selectedItems());
|
||||
while (i.hasNext()) {
|
||||
QString t = i.next()->text();
|
||||
t = t.left(t.indexOf(QString::fromLatin1("(")) - 1);
|
||||
t = t.left(t.indexOf(QStringLiteral("(")) - 1);
|
||||
features.push_back(t);
|
||||
}
|
||||
|
||||
|
||||
@@ -348,7 +348,7 @@ QString getRefStr(const App::DocumentObject* obj, const std::vector<std::string>
|
||||
return QString::fromLatin1(obj->getNameInDocument());
|
||||
}
|
||||
else if (!sub.empty()) {
|
||||
return QString::fromLatin1(obj->getNameInDocument()) + QString::fromLatin1(":") +
|
||||
return QString::fromLatin1(obj->getNameInDocument()) + QStringLiteral(":") +
|
||||
QString::fromLatin1(sub.front().c_str());
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ using namespace Attacher;
|
||||
/* TRANSLATOR PartDesignGui::TaskDatumParameters */
|
||||
|
||||
TaskDatumParameters::TaskDatumParameters(ViewProviderDatum *ViewProvider,QWidget *parent)
|
||||
: PartGui::TaskAttacher(ViewProvider, parent, QString::fromLatin1("PartDesign_") + ViewProvider->datumType,
|
||||
: PartGui::TaskAttacher(ViewProvider, parent, QStringLiteral("PartDesign_") + ViewProvider->datumType,
|
||||
ViewProvider->datumMenuText)
|
||||
{
|
||||
Gui::Selection().addSelectionGate(new NoDependentsSelection(ViewProvider->getObject()));
|
||||
|
||||
@@ -291,7 +291,7 @@ void TaskDressUpParameters::createAddAllEdgesAction(QListWidget* parentList)
|
||||
// creates a context menu, a shortcut for it and connects it to a slot function
|
||||
|
||||
addAllEdgesAction = new QAction(tr("Add all edges"), this);
|
||||
addAllEdgesAction->setShortcut(QKeySequence(QString::fromLatin1("Ctrl+Shift+A")));
|
||||
addAllEdgesAction->setShortcut(QKeySequence(QStringLiteral("Ctrl+Shift+A")));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
// display shortcut behind the context menu entry
|
||||
addAllEdgesAction->setShortcutVisibleInContextMenu(true);
|
||||
|
||||
@@ -156,7 +156,7 @@ void TaskExtrudeParameters::setupDialog()
|
||||
}
|
||||
else if (obj && faceId >= 0) {
|
||||
ui->lineFaceName->setText(
|
||||
QString::fromLatin1("%1:%2%3").arg(QString::fromUtf8(obj->Label.getValue()),
|
||||
QStringLiteral("%1:%2%3").arg(QString::fromUtf8(obj->Label.getValue()),
|
||||
tr("Face"),
|
||||
QString::number(faceId)));
|
||||
ui->lineFaceName->setProperty("FeatureName", QByteArray(obj->getNameInDocument()));
|
||||
@@ -1023,7 +1023,7 @@ void TaskExtrudeParameters::onFaceName(const QString& text)
|
||||
QVariant name = objectNameByLabel(label, ui->lineFaceName->property("FeatureName"));
|
||||
if (name.isValid()) {
|
||||
parts[0] = name.toString();
|
||||
QString uptoface = parts.join(QString::fromLatin1(":"));
|
||||
QString uptoface = parts.join(QStringLiteral(":"));
|
||||
ui->lineFaceName->setProperty("FeatureName", name);
|
||||
ui->lineFaceName->setProperty("FaceName", setUpToFace(uptoface));
|
||||
}
|
||||
@@ -1049,7 +1049,7 @@ void TaskExtrudeParameters::translateFaceName()
|
||||
|
||||
if (ok) {
|
||||
ui->lineFaceName->setText(
|
||||
QString::fromLatin1("%1:%2%3").arg(parts[0], tr("Face")).arg(faceId));
|
||||
QStringLiteral("%1:%2%3").arg(parts[0], tr("Face")).arg(faceId));
|
||||
}
|
||||
else {
|
||||
ui->lineFaceName->setText(parts[0]);
|
||||
@@ -1118,7 +1118,7 @@ QString TaskExtrudeParameters::getFaceName() const
|
||||
return getFaceReference(featureName.toString(), faceName);
|
||||
}
|
||||
|
||||
return QString::fromLatin1("None");
|
||||
return QStringLiteral("None");
|
||||
}
|
||||
|
||||
void TaskExtrudeParameters::changeEvent(QEvent* e)
|
||||
|
||||
@@ -120,8 +120,8 @@ TaskFeaturePick::TaskFeaturePick(std::vector<App::DocumentObject*>& objects,
|
||||
bool attached = false;
|
||||
for (; statusIt != status.end(); ++statusIt, ++objIt) {
|
||||
QListWidgetItem* item = new QListWidgetItem(
|
||||
QString::fromLatin1("%1 (%2)").arg(QString::fromUtf8((*objIt)->Label.getValue()),
|
||||
getFeatureStatusString(*statusIt)));
|
||||
QStringLiteral("%1 (%2)").arg(QString::fromUtf8((*objIt)->Label.getValue()),
|
||||
getFeatureStatusString(*statusIt)));
|
||||
item->setData(Qt::UserRole, QString::fromLatin1((*objIt)->getNameInDocument()));
|
||||
ui->listWidget->addItem(item);
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ void TaskPadParameters::onModeChanged(int index)
|
||||
|
||||
void TaskPadParameters::apply()
|
||||
{
|
||||
QString facename = QString::fromLatin1("None");
|
||||
QString facename = QStringLiteral("None");
|
||||
if (static_cast<Mode>(getMode()) == Mode::ToFace) {
|
||||
facename = getFaceName();
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ void TaskPocketParameters::onModeChanged(int index)
|
||||
|
||||
void TaskPocketParameters::apply()
|
||||
{
|
||||
QString facename = QString::fromLatin1("None");
|
||||
QString facename = QStringLiteral("None");
|
||||
if (static_cast<Mode>(getMode()) == Mode::ToFace) {
|
||||
facename = getFaceName();
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ void TaskRevolutionParameters::setupDialog()
|
||||
ui->lineFaceName->setProperty("FeatureName", QByteArray(obj->getNameInDocument()));
|
||||
}
|
||||
else if (obj && faceId >= 0) {
|
||||
ui->lineFaceName->setText(QString::fromLatin1("%1:%2%3")
|
||||
ui->lineFaceName->setText(QStringLiteral("%1:%2%3")
|
||||
.arg(QString::fromUtf8(obj->Label.getValue()),
|
||||
tr("Face"),
|
||||
QString::number(faceId)));
|
||||
@@ -438,7 +438,7 @@ void TaskRevolutionParameters::onFaceName(const QString& text)
|
||||
QVariant name = objectNameByLabel(label, ui->lineFaceName->property("FeatureName"));
|
||||
if (name.isValid()) {
|
||||
parts[0] = name.toString();
|
||||
QString uptoface = parts.join(QString::fromLatin1(":"));
|
||||
QString uptoface = parts.join(QStringLiteral(":"));
|
||||
ui->lineFaceName->setProperty("FeatureName", name);
|
||||
ui->lineFaceName->setProperty("FaceName", setUpToFace(uptoface));
|
||||
}
|
||||
@@ -463,7 +463,7 @@ void TaskRevolutionParameters::translateFaceName()
|
||||
}
|
||||
|
||||
if (ok) {
|
||||
ui->lineFaceName->setText(QString::fromLatin1("%1:%2%3")
|
||||
ui->lineFaceName->setText(QStringLiteral("%1:%2%3")
|
||||
.arg(parts[0], tr("Face"))
|
||||
.arg(faceId));
|
||||
}
|
||||
@@ -481,7 +481,7 @@ QString TaskRevolutionParameters::getFaceName() const
|
||||
return getFaceReference(featureName.toString(), faceName);
|
||||
}
|
||||
|
||||
return QString::fromLatin1("None");
|
||||
return QStringLiteral("None");
|
||||
}
|
||||
|
||||
void TaskRevolutionParameters::clearFaceName()
|
||||
@@ -697,7 +697,7 @@ void TaskRevolutionParameters::apply()
|
||||
FCMD_OBJ_CMD(tobj, "Reversed = " << (getReversed() ? 1 : 0));
|
||||
int mode = ui->changeMode->currentIndex();
|
||||
FCMD_OBJ_CMD(tobj, "Type = " << mode);
|
||||
QString facename = QString::fromLatin1("None");
|
||||
QString facename = QStringLiteral("None");
|
||||
if (static_cast<PartDesign::Revolution::RevolMethod>(mode) == PartDesign::Revolution::RevolMethod::ToFace) {
|
||||
facename = getFaceName();
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ const QString TaskSketchBasedParameters::onAddSelection(const Gui::SelectionChan
|
||||
}
|
||||
else if (subname.size() > 4) {
|
||||
int faceId = std::atoi(&subname[4]);
|
||||
refStr = QString::fromLatin1(selObj->getNameInDocument()) + QString::fromLatin1(":") + QObject::tr("Face") + QString::number(faceId);
|
||||
refStr = QString::fromLatin1(selObj->getNameInDocument()) + QStringLiteral(":") + QObject::tr("Face") + QString::number(faceId);
|
||||
}
|
||||
|
||||
std::vector<std::string> upToFaces(1,subname);
|
||||
@@ -226,7 +226,7 @@ QString TaskSketchBasedParameters::getFaceReference(const QString& obj, const QS
|
||||
return {};
|
||||
}
|
||||
|
||||
QString o = obj.left(obj.indexOf(QString::fromLatin1(":")));
|
||||
QString o = obj.left(obj.indexOf(QStringLiteral(":")));
|
||||
if (o.isEmpty()) {
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -109,22 +109,22 @@ void ViewProviderDatum::attach(App::DocumentObject *obj)
|
||||
// TODO remove this field (2015-09-08, Fat-Zer)
|
||||
App::DocumentObject* o = getObject();
|
||||
if (o->is<PartDesign::Plane>()) {
|
||||
datumType = QString::fromLatin1("Plane");
|
||||
datumType = QStringLiteral("Plane");
|
||||
datumText = QObject::tr("Plane");
|
||||
datumMenuText = tr("Datum Plane parameters");
|
||||
}
|
||||
else if (o->is<PartDesign::Line>()) {
|
||||
datumType = QString::fromLatin1("Line");
|
||||
datumType = QStringLiteral("Line");
|
||||
datumText = QObject::tr("Line");
|
||||
datumMenuText = tr("Datum Line parameters");
|
||||
}
|
||||
else if (o->is<PartDesign::Point>()) {
|
||||
datumType = QString::fromLatin1("Point");
|
||||
datumType = QStringLiteral("Point");
|
||||
datumText = QObject::tr("Point");
|
||||
datumMenuText = tr("Datum Point parameters");
|
||||
}
|
||||
else if (o->is<PartDesign::CoordinateSystem>()) {
|
||||
datumType = QString::fromLatin1("CoordinateSystem");
|
||||
datumType = QStringLiteral("CoordinateSystem");
|
||||
datumText = QObject::tr("Coordinate System");
|
||||
datumMenuText = tr("Local Coordinate System parameters");
|
||||
}
|
||||
|
||||
@@ -58,14 +58,14 @@ TaskDlgFeatureParameters *ViewProviderHelix::getEditDialog()
|
||||
}
|
||||
|
||||
QIcon ViewProviderHelix::getIcon() const {
|
||||
QString str = QString::fromLatin1("PartDesign_");
|
||||
QString str = QStringLiteral("PartDesign_");
|
||||
auto* prim = getObject<PartDesign::Helix>();
|
||||
if(prim->getAddSubType() == PartDesign::FeatureAddSub::Additive)
|
||||
str += QString::fromLatin1("Additive");
|
||||
str += QStringLiteral("Additive");
|
||||
else
|
||||
str += QString::fromLatin1("Subtractive");
|
||||
str += QStringLiteral("Subtractive");
|
||||
|
||||
str += QString::fromLatin1("Helix.svg");
|
||||
str += QStringLiteral("Helix.svg");
|
||||
return PartDesignGui::ViewProvider::mergeGreyableOverlayIcons(Gui::BitmapFactory().pixmap(str.toStdString().c_str()));
|
||||
}
|
||||
|
||||
|
||||
@@ -170,14 +170,14 @@ void ViewProviderLoft::highlightReferences(Part::Feature* base, const std::vecto
|
||||
}
|
||||
|
||||
QIcon ViewProviderLoft::getIcon() const {
|
||||
QString str = QString::fromLatin1("PartDesign_");
|
||||
QString str = QStringLiteral("PartDesign_");
|
||||
auto* prim = getObject<PartDesign::Loft>();
|
||||
if(prim->getAddSubType() == PartDesign::FeatureAddSub::Additive)
|
||||
str += QString::fromLatin1("Additive");
|
||||
str += QStringLiteral("Additive");
|
||||
else
|
||||
str += QString::fromLatin1("Subtractive");
|
||||
str += QStringLiteral("Subtractive");
|
||||
|
||||
str += QString::fromLatin1("Loft.svg");
|
||||
str += QStringLiteral("Loft.svg");
|
||||
return PartDesignGui::ViewProvider::mergeGreyableOverlayIcons(Gui::BitmapFactory().pixmap(str.toStdString().c_str()));
|
||||
}
|
||||
|
||||
|
||||
@@ -171,14 +171,14 @@ void ViewProviderPipe::highlightReferences(Part::Feature* base, const std::vecto
|
||||
}
|
||||
|
||||
QIcon ViewProviderPipe::getIcon() const {
|
||||
QString str = QString::fromLatin1("PartDesign_");
|
||||
QString str = QStringLiteral("PartDesign_");
|
||||
auto* prim = getObject<PartDesign::Pipe>();
|
||||
if(prim->getAddSubType() == PartDesign::FeatureAddSub::Additive)
|
||||
str += QString::fromLatin1("Additive");
|
||||
str += QStringLiteral("Additive");
|
||||
else
|
||||
str += QString::fromLatin1("Subtractive");
|
||||
str += QStringLiteral("Subtractive");
|
||||
|
||||
str += QString::fromLatin1("Pipe.svg");
|
||||
str += QStringLiteral("Pipe.svg");
|
||||
return PartDesignGui::ViewProvider::mergeGreyableOverlayIcons(Gui::BitmapFactory().pixmap(str.toStdString().c_str()));
|
||||
}
|
||||
|
||||
|
||||
@@ -114,40 +114,40 @@ void ViewProviderPrimitive::updateData(const App::Property* p) {
|
||||
|
||||
QIcon ViewProviderPrimitive::getIcon() const {
|
||||
|
||||
QString str = QString::fromLatin1("PartDesign_");
|
||||
QString str = QStringLiteral("PartDesign_");
|
||||
auto* prim = getObject<PartDesign::FeaturePrimitive>();
|
||||
if(prim->getAddSubType() == PartDesign::FeatureAddSub::Additive)
|
||||
str += QString::fromLatin1("Additive");
|
||||
str += QStringLiteral("Additive");
|
||||
else
|
||||
str += QString::fromLatin1("Subtractive");
|
||||
str += QStringLiteral("Subtractive");
|
||||
|
||||
switch(prim->getPrimitiveType()) {
|
||||
case PartDesign::FeaturePrimitive::Box:
|
||||
str += QString::fromLatin1("Box");
|
||||
str += QStringLiteral("Box");
|
||||
break;
|
||||
case PartDesign::FeaturePrimitive::Cylinder:
|
||||
str += QString::fromLatin1("Cylinder");
|
||||
str += QStringLiteral("Cylinder");
|
||||
break;
|
||||
case PartDesign::FeaturePrimitive::Sphere:
|
||||
str += QString::fromLatin1("Sphere");
|
||||
str += QStringLiteral("Sphere");
|
||||
break;
|
||||
case PartDesign::FeaturePrimitive::Cone:
|
||||
str += QString::fromLatin1("Cone");
|
||||
str += QStringLiteral("Cone");
|
||||
break;
|
||||
case PartDesign::FeaturePrimitive::Ellipsoid:
|
||||
str += QString::fromLatin1("Ellipsoid");
|
||||
str += QStringLiteral("Ellipsoid");
|
||||
break;
|
||||
case PartDesign::FeaturePrimitive::Torus:
|
||||
str += QString::fromLatin1("Torus");
|
||||
str += QStringLiteral("Torus");
|
||||
break;
|
||||
case PartDesign::FeaturePrimitive::Prism:
|
||||
str += QString::fromLatin1("Prism");
|
||||
str += QStringLiteral("Prism");
|
||||
break;
|
||||
case PartDesign::FeaturePrimitive::Wedge:
|
||||
str += QString::fromLatin1("Wedge");
|
||||
str += QStringLiteral("Wedge");
|
||||
break;
|
||||
}
|
||||
|
||||
str += QString::fromLatin1(".svg");
|
||||
str += QStringLiteral(".svg");
|
||||
return PartDesignGui::ViewProvider::mergeGreyableOverlayIcons(Gui::BitmapFactory().pixmap(str.toStdString().c_str()));
|
||||
}
|
||||
|
||||
@@ -172,9 +172,9 @@ void ViewProviderTransformed::recomputeFeature(bool recompute)
|
||||
rejected++;
|
||||
}
|
||||
|
||||
QString msg = QString::fromLatin1("%1");
|
||||
QString msg = QStringLiteral("%1");
|
||||
if (rejected > 0) {
|
||||
msg = QString::fromLatin1("<font color='orange'>%1<br/></font>\r\n%2");
|
||||
msg = QStringLiteral("<font color='orange'>%1<br/></font>\r\n%2");
|
||||
if (rejected == 1)
|
||||
msg = msg.arg(QObject::tr("One transformed shape does not intersect the support"));
|
||||
else {
|
||||
@@ -184,10 +184,10 @@ void ViewProviderTransformed::recomputeFeature(bool recompute)
|
||||
}
|
||||
auto error = pcTransformed->getDocument()->getErrorDescription(pcTransformed);
|
||||
if (error) {
|
||||
msg = msg.arg(QString::fromLatin1("<font color='red'>%1<br/></font>"));
|
||||
msg = msg.arg(QStringLiteral("<font color='red'>%1<br/></font>"));
|
||||
msg = msg.arg(QString::fromUtf8(error));
|
||||
} else {
|
||||
msg = msg.arg(QString::fromLatin1("<font color='green'>%1<br/></font>"));
|
||||
msg = msg.arg(QStringLiteral("<font color='green'>%1<br/></font>"));
|
||||
msg = msg.arg(QObject::tr("Transformation succeeded"));
|
||||
}
|
||||
diagMessage = msg;
|
||||
|
||||
Reference in New Issue
Block a user