Merge branch 'main' into main
This commit is contained in:
@@ -62,6 +62,7 @@ jobs:
|
||||
title: "Update translations from Crowdin"
|
||||
body: "Automatic Crowdin update."
|
||||
labels: "translations, automated"
|
||||
token: ${{ secrets.GH_TOKEN_FOR_CROWDIN_SYNC }}
|
||||
delete-branch: true
|
||||
add-paths: |
|
||||
src
|
||||
|
||||
@@ -13,6 +13,7 @@ jobs:
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: releases/FreeCAD-1-1
|
||||
|
||||
- name: Install Qt ≥ 6.8
|
||||
uses: jurplel/install-qt-action@d325aaf2a8baeeda41ad0b5d39f84a6af9bcf005
|
||||
|
||||
@@ -51,7 +51,7 @@ endif()
|
||||
project(FreeCAD)
|
||||
|
||||
set(PACKAGE_VERSION_MAJOR "1")
|
||||
set(PACKAGE_VERSION_MINOR "1")
|
||||
set(PACKAGE_VERSION_MINOR "2")
|
||||
set(PACKAGE_VERSION_PATCH "0") # number of patch release (e.g. "4" for the 0.18.4 release)
|
||||
set(PACKAGE_VERSION_SUFFIX "dev") # either "dev" for development snapshot or "" (empty string)
|
||||
set(PACKAGE_BUILD_VERSION "0") # used when the same FreeCAD version will be re-released (for example using an updated LibPack)
|
||||
|
||||
@@ -65,11 +65,7 @@ using namespace std;
|
||||
Base::XMLReader::XMLReader(const char* FileName, std::istream& str)
|
||||
: _File(FileName)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
str.imbue(std::locale::empty());
|
||||
#else
|
||||
str.imbue(std::locale::classic());
|
||||
#endif
|
||||
|
||||
// create the parser
|
||||
parser = XMLReaderFactory::createXMLReader(); // NOLINT
|
||||
|
||||
@@ -318,11 +318,7 @@ void Writer::putNextEntry(const char* file, const char* obj)
|
||||
ZipWriter::ZipWriter(const char* FileName)
|
||||
: ZipStream(FileName)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
ZipStream.imbue(std::locale::empty());
|
||||
#else
|
||||
ZipStream.imbue(std::locale::classic());
|
||||
#endif
|
||||
ZipStream.precision(std::numeric_limits<double>::digits10 + 1);
|
||||
ZipStream.setf(std::ios::fixed, std::ios::floatfield);
|
||||
}
|
||||
@@ -330,11 +326,7 @@ ZipWriter::ZipWriter(const char* FileName)
|
||||
ZipWriter::ZipWriter(std::ostream& os)
|
||||
: ZipStream(os)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
ZipStream.imbue(std::locale::empty());
|
||||
#else
|
||||
ZipStream.imbue(std::locale::classic());
|
||||
#endif
|
||||
ZipStream.precision(std::numeric_limits<double>::digits10 + 1);
|
||||
ZipStream.setf(std::ios::fixed, std::ios::floatfield);
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ void StdCmdOpen::activated(int iMsg)
|
||||
QString selectedFilter;
|
||||
QStringList fileList = FileDialog::getOpenFileNames(
|
||||
getMainWindow(),
|
||||
QObject::tr("Open document"),
|
||||
QObject::tr("Open Document"),
|
||||
QString(),
|
||||
formatList,
|
||||
&selectedFilter
|
||||
@@ -150,7 +150,7 @@ void StdCmdOpen::activated(int iMsg)
|
||||
if (dict.isEmpty()) {
|
||||
QMessageBox::critical(
|
||||
getMainWindow(),
|
||||
qApp->translate("StdCmdOpen", "Cannot open file"),
|
||||
qApp->translate("StdCmdOpen", "Cannot Open File"),
|
||||
qApp->translate("StdCmdOpen", "Loading the file %1 is not supported").arg(fileList.front())
|
||||
);
|
||||
}
|
||||
@@ -233,7 +233,7 @@ void StdCmdImport::activated(int iMsg)
|
||||
QString selectedFilter = QString::fromStdString(hPath->GetASCII("FileImportFilter"));
|
||||
QStringList fileList = FileDialog::getOpenFileNames(
|
||||
getMainWindow(),
|
||||
QObject::tr("Import file"),
|
||||
QObject::tr("Import File"),
|
||||
QString(),
|
||||
formatList,
|
||||
&selectedFilter
|
||||
@@ -431,7 +431,7 @@ void StdCmdExport::activated(int iMsg)
|
||||
if (selection.empty()) {
|
||||
QMessageBox::warning(
|
||||
Gui::getMainWindow(),
|
||||
QCoreApplication::translate("StdCmdExport", "No selection"),
|
||||
QCoreApplication::translate("StdCmdExport", "No Selection"),
|
||||
QCoreApplication::translate(
|
||||
"StdCmdExport",
|
||||
"Select objects to export before using the Export command."
|
||||
@@ -515,7 +515,7 @@ void StdCmdExport::activated(int iMsg)
|
||||
// Launch the file selection modal dialog
|
||||
QString filename = FileDialog::getSaveFileName(
|
||||
getMainWindow(),
|
||||
QObject::tr("Export file"),
|
||||
QObject::tr("Export File"),
|
||||
defaultFilename,
|
||||
formatList,
|
||||
&selectedFilter
|
||||
@@ -581,7 +581,7 @@ void StdCmdMergeProjects::activated(int iMsg)
|
||||
QString exe = qApp->applicationName();
|
||||
QString project = FileDialog::getOpenFileName(
|
||||
Gui::getMainWindow(),
|
||||
QString::fromUtf8(QT_TR_NOOP("Merge document")),
|
||||
QString::fromUtf8(QT_TR_NOOP("Merge Document")),
|
||||
FileDialog::getWorkingDirectory(),
|
||||
QString::fromUtf8(QT_TR_NOOP("%1 document (*.FCStd)")).arg(exe)
|
||||
);
|
||||
@@ -593,7 +593,7 @@ void StdCmdMergeProjects::activated(int iMsg)
|
||||
if (proj == info) {
|
||||
QMessageBox::critical(
|
||||
Gui::getMainWindow(),
|
||||
QString::fromUtf8(QT_TR_NOOP("Merge document")),
|
||||
QString::fromUtf8(QT_TR_NOOP("Merge Document")),
|
||||
QString::fromUtf8(QT_TR_NOOP("Cannot merge document with itself."))
|
||||
);
|
||||
return;
|
||||
@@ -658,7 +658,7 @@ StdCmdExportDependencyGraph::StdCmdExportDependencyGraph()
|
||||
: Command("Std_ExportDependencyGraph")
|
||||
{
|
||||
sGroup = "Tools";
|
||||
sMenuText = QT_TR_NOOP("Export Dependency &Graph");
|
||||
sMenuText = QT_TR_NOOP("Export Dependency &Graph…");
|
||||
sToolTipText = QT_TR_NOOP("Exports the dependency graph as a Graphviz (.gv) file");
|
||||
sStatusTip = sToolTipText;
|
||||
sWhatsThis = "Std_ExportDependencyGraph";
|
||||
@@ -673,7 +673,7 @@ void StdCmdExportDependencyGraph::activated(int iMsg)
|
||||
QString format = QStringLiteral("%1 (*.gv)").arg(Gui::GraphvizView::tr("Graphviz format"));
|
||||
QString fn = Gui::FileDialog::getSaveFileName(
|
||||
Gui::getMainWindow(),
|
||||
Gui::GraphvizView::tr("Export graph"),
|
||||
Gui::GraphvizView::tr("Export Graph"),
|
||||
QString(),
|
||||
format
|
||||
);
|
||||
@@ -1319,7 +1319,7 @@ void StdCmdDuplicateSelection::activated(int iMsg)
|
||||
if (!unsaved.empty()) {
|
||||
QMessageBox::critical(
|
||||
getMainWindow(),
|
||||
QObject::tr("Unsaved document"),
|
||||
QObject::tr("Unsaved Document"),
|
||||
QObject::tr(
|
||||
"The exported object contains an external link. Save the document."
|
||||
"at least once before exporting."
|
||||
@@ -1341,7 +1341,7 @@ void StdCmdDuplicateSelection::activated(int iMsg)
|
||||
if (hasXLink && !doc->isSaved()) {
|
||||
auto ret = QMessageBox::question(
|
||||
getMainWindow(),
|
||||
qApp->translate("Std_DuplicateSelection", "Object dependencies"),
|
||||
qApp->translate("Std_DuplicateSelection", "Object Dependencies"),
|
||||
qApp->translate(
|
||||
"Std_DuplicateSelection",
|
||||
"To link to external objects, the document must be saved at least once.\n"
|
||||
@@ -1531,7 +1531,7 @@ void StdCmdDelete::activated(int iMsg)
|
||||
|
||||
auto ret = QMessageBox::warning(
|
||||
Gui::getMainWindow(),
|
||||
qApp->translate("Std_Delete", "Object dependencies"),
|
||||
qApp->translate("Std_Delete", "Object Dependencies"),
|
||||
bodyMessage,
|
||||
QMessageBox::Yes,
|
||||
QMessageBox::No
|
||||
@@ -1574,7 +1574,7 @@ void StdCmdDelete::activated(int iMsg)
|
||||
catch (const Base::Exception& e) {
|
||||
QMessageBox::critical(
|
||||
getMainWindow(),
|
||||
QObject::tr("Delete failed"),
|
||||
QObject::tr("Delete Failed"),
|
||||
QString::fromLatin1(e.what())
|
||||
);
|
||||
e.reportException();
|
||||
@@ -1582,7 +1582,7 @@ void StdCmdDelete::activated(int iMsg)
|
||||
catch (...) {
|
||||
QMessageBox::critical(
|
||||
getMainWindow(),
|
||||
QObject::tr("Delete failed"),
|
||||
QObject::tr("Delete Failed"),
|
||||
QStringLiteral("Unknown error")
|
||||
);
|
||||
}
|
||||
@@ -1639,7 +1639,7 @@ void StdCmdRefresh::activated([[maybe_unused]] int iMsg)
|
||||
catch (Base::Exception& /*e*/) {
|
||||
auto ret = QMessageBox::warning(
|
||||
getMainWindow(),
|
||||
QObject::tr("Dependency error"),
|
||||
QObject::tr("Dependency Error"),
|
||||
qApp->translate(
|
||||
"Std_Refresh",
|
||||
"The document contains dependency cycles.\n"
|
||||
@@ -2121,7 +2121,7 @@ protected:
|
||||
if (failed) {
|
||||
QMessageBox::critical(
|
||||
getMainWindow(),
|
||||
QObject::tr("Expression error"),
|
||||
QObject::tr("Expression Error"),
|
||||
QObject::tr(
|
||||
"Failed to parse some of the expressions.\n"
|
||||
"Check the report view for more details."
|
||||
@@ -2155,7 +2155,7 @@ protected:
|
||||
abortCommand();
|
||||
QMessageBox::critical(
|
||||
getMainWindow(),
|
||||
QObject::tr("Failed to paste expressions"),
|
||||
QObject::tr("Failed to Paste Expressions"),
|
||||
QString::fromLatin1(e.what())
|
||||
);
|
||||
e.reportException();
|
||||
|
||||
@@ -64,7 +64,7 @@ void StdCmdDlgMacroRecord::activated(int iMsg)
|
||||
if (cDlg.exec() && getAction()) {
|
||||
getAction()->setIcon(Gui::BitmapFactory().iconFromTheme("media-playback-stop"));
|
||||
getAction()->setText(
|
||||
QCoreApplication::translate("StdCmdDlgMacroRecord", "S&top macro recording")
|
||||
QCoreApplication::translate("StdCmdDlgMacroRecord", "S&top Macro Recording")
|
||||
);
|
||||
getAction()->setToolTip(
|
||||
QCoreApplication::translate("StdCmdDlgMacroRecord", "Stop the macro recording session")
|
||||
|
||||
@@ -457,7 +457,7 @@ StdCmdDlgCustomize::StdCmdDlgCustomize()
|
||||
: Command("Std_DlgCustomize")
|
||||
{
|
||||
sGroup = "Tools";
|
||||
sMenuText = QT_TR_NOOP("Cu&stomize…");
|
||||
sMenuText = QT_TR_NOOP("Cu&stomize");
|
||||
sToolTipText = QT_TR_NOOP("Opens a dialog to edit toolbars, shortcuts, and macros");
|
||||
sWhatsThis = "Std_DlgCustomize";
|
||||
sStatusTip = sToolTipText;
|
||||
|
||||
@@ -401,7 +401,7 @@ void StdCmdFreezeViews::activated(int iMsg)
|
||||
for (QList<QAction*>::Iterator it = acts.begin() + offset; it != acts.end(); ++it, index++) {
|
||||
if (!(*it)->isVisible()) {
|
||||
savedViews++;
|
||||
QString viewnr = QString(QObject::tr("Restore view &%1")).arg(index);
|
||||
QString viewnr = QString(QObject::tr("Restore View &%1")).arg(index);
|
||||
(*it)->setText(viewnr);
|
||||
(*it)->setToolTip(QString::fromLatin1(ppReturn));
|
||||
(*it)->setVisible(true);
|
||||
@@ -433,7 +433,7 @@ void StdCmdFreezeViews::onSaveViews()
|
||||
// Save the views to an XML file
|
||||
QString fn = FileDialog::getSaveFileName(
|
||||
getMainWindow(),
|
||||
QObject::tr("Save frozen views"),
|
||||
QObject::tr("Save Frozen Views"),
|
||||
QString(),
|
||||
QStringLiteral("%1 (*.cam)").arg(QObject::tr("Frozen views"))
|
||||
);
|
||||
@@ -479,7 +479,7 @@ void StdCmdFreezeViews::onRestoreViews()
|
||||
if (savedViews > 0) {
|
||||
auto ret = QMessageBox::question(
|
||||
getMainWindow(),
|
||||
QObject::tr("Restore views"),
|
||||
QObject::tr("Restore Views"),
|
||||
QObject::tr(
|
||||
"Importing the restored views would clear the already stored views.\n"
|
||||
"Continue?"
|
||||
@@ -495,7 +495,7 @@ void StdCmdFreezeViews::onRestoreViews()
|
||||
// Restore the views from an XML file
|
||||
QString fn = FileDialog::getOpenFileName(
|
||||
getMainWindow(),
|
||||
QObject::tr("Restore frozen views"),
|
||||
QObject::tr("Restore Frozen Views"),
|
||||
QString(),
|
||||
QStringLiteral("%1 (*.cam)").arg(QObject::tr("Frozen views"))
|
||||
);
|
||||
@@ -506,7 +506,7 @@ void StdCmdFreezeViews::onRestoreViews()
|
||||
if (!file.open(QFile::ReadOnly)) {
|
||||
QMessageBox::critical(
|
||||
getMainWindow(),
|
||||
QObject::tr("Restore views"),
|
||||
QObject::tr("Restore Views"),
|
||||
QObject::tr("Cannot open file '%1'.").arg(fn)
|
||||
);
|
||||
return;
|
||||
@@ -573,7 +573,7 @@ void StdCmdFreezeViews::onRestoreViews()
|
||||
}
|
||||
for (int i = 0; i < numRestoredViews; i++) {
|
||||
QString setting = cameras[i];
|
||||
QString viewnr = QString(QObject::tr("Restore view &%1")).arg(i + 1);
|
||||
QString viewnr = QString(QObject::tr("Restore View &%1")).arg(i + 1);
|
||||
acts[i + offset]->setText(viewnr);
|
||||
acts[i + offset]->setToolTip(setting);
|
||||
acts[i + offset]->setVisible(true);
|
||||
@@ -776,7 +776,7 @@ void StdCmdDrawStyle::languageChange()
|
||||
auto pcAction = qobject_cast<Gui::ActionGroup*>(_pcAction);
|
||||
QList<QAction*> a = pcAction->actions();
|
||||
|
||||
a[0]->setText(QCoreApplication::translate("Std_DrawStyle", "&1 As is"));
|
||||
a[0]->setText(QCoreApplication::translate("Std_DrawStyle", "&1 As Is"));
|
||||
a[0]->setToolTip(QCoreApplication::translate("Std_DrawStyle", "Normal mode"));
|
||||
|
||||
a[1]->setText(QCoreApplication::translate("Std_DrawStyle", "&2 Points"));
|
||||
@@ -785,16 +785,16 @@ void StdCmdDrawStyle::languageChange()
|
||||
a[2]->setText(QCoreApplication::translate("Std_DrawStyle", "&3 Wireframe"));
|
||||
a[2]->setToolTip(QCoreApplication::translate("Std_DrawStyle", "Wireframe mode"));
|
||||
|
||||
a[3]->setText(QCoreApplication::translate("Std_DrawStyle", "&4 Hidden line"));
|
||||
a[3]->setText(QCoreApplication::translate("Std_DrawStyle", "&4 Hidden Line"));
|
||||
a[3]->setToolTip(QCoreApplication::translate("Std_DrawStyle", "Hidden line mode"));
|
||||
|
||||
a[4]->setText(QCoreApplication::translate("Std_DrawStyle", "&5 No shading"));
|
||||
a[4]->setText(QCoreApplication::translate("Std_DrawStyle", "&5 No Shading"));
|
||||
a[4]->setToolTip(QCoreApplication::translate("Std_DrawStyle", "No shading mode"));
|
||||
|
||||
a[5]->setText(QCoreApplication::translate("Std_DrawStyle", "&6 Shaded"));
|
||||
a[5]->setToolTip(QCoreApplication::translate("Std_DrawStyle", "Shaded mode"));
|
||||
|
||||
a[6]->setText(QCoreApplication::translate("Std_DrawStyle", "&7 Flat lines"));
|
||||
a[6]->setText(QCoreApplication::translate("Std_DrawStyle", "&7 Flat Lines"));
|
||||
a[6]->setToolTip(QCoreApplication::translate("Std_DrawStyle", "Flat lines mode"));
|
||||
}
|
||||
|
||||
|
||||
@@ -540,7 +540,7 @@ void ParameterGroup::onDeleteSelectedItem()
|
||||
if (sel && sel->isSelected() && sel->parent()) {
|
||||
if (QMessageBox::question(
|
||||
this,
|
||||
tr("Remove group"),
|
||||
tr("Remove Group"),
|
||||
tr("Remove this parameter group?"),
|
||||
QMessageBox::Yes | QMessageBox::No,
|
||||
QMessageBox::No
|
||||
@@ -579,7 +579,7 @@ void ParameterGroup::onCreateSubgroup()
|
||||
bool ok;
|
||||
QString name = QInputDialog::getText(
|
||||
this,
|
||||
QObject::tr("New sub-group"),
|
||||
QObject::tr("New Sub-Group"),
|
||||
QObject::tr("Enter the name:"),
|
||||
QLineEdit::Normal,
|
||||
QString(),
|
||||
@@ -596,7 +596,7 @@ void ParameterGroup::onCreateSubgroup()
|
||||
if (hGrp->HasGroup(name.toLatin1())) {
|
||||
QMessageBox::critical(
|
||||
this,
|
||||
tr("Existing sub-group"),
|
||||
tr("Existing Sub-Group"),
|
||||
tr("The sub-group '%1' already exists.").arg(name)
|
||||
);
|
||||
return;
|
||||
@@ -613,7 +613,7 @@ void ParameterGroup::onExportToFile()
|
||||
{
|
||||
QString file = FileDialog::getSaveFileName(
|
||||
this,
|
||||
tr("Export parameter to file"),
|
||||
tr("Export Parameter to File"),
|
||||
QString(),
|
||||
QStringLiteral("XML (*.FCParam)")
|
||||
);
|
||||
@@ -631,7 +631,7 @@ void ParameterGroup::onImportFromFile()
|
||||
{
|
||||
QString file = FileDialog::getOpenFileName(
|
||||
this,
|
||||
tr("Import parameter from file"),
|
||||
tr("Import Parameter From File"),
|
||||
QString(),
|
||||
QStringLiteral("XML (*.FCParam)")
|
||||
);
|
||||
@@ -659,7 +659,7 @@ void ParameterGroup::onImportFromFile()
|
||||
catch (const Base::Exception&) {
|
||||
QMessageBox::critical(
|
||||
this,
|
||||
tr("Import error"),
|
||||
tr("Import Error"),
|
||||
tr("Reading from '%1' failed.").arg(file)
|
||||
);
|
||||
}
|
||||
@@ -815,7 +815,7 @@ void ParameterValue::onCreateTextItem()
|
||||
bool ok;
|
||||
QString name = QInputDialog::getText(
|
||||
this,
|
||||
QObject::tr("New text item"),
|
||||
QObject::tr("New Text Item"),
|
||||
QObject::tr("Enter the name:"),
|
||||
QLineEdit::Normal,
|
||||
QString(),
|
||||
@@ -832,7 +832,7 @@ void ParameterValue::onCreateTextItem()
|
||||
if (name == QLatin1String(it.first.c_str())) {
|
||||
QMessageBox::critical(
|
||||
this,
|
||||
tr("Existing item"),
|
||||
tr("Existing Item"),
|
||||
tr("The item '%1' already exists.").arg(name)
|
||||
);
|
||||
return;
|
||||
@@ -841,7 +841,7 @@ void ParameterValue::onCreateTextItem()
|
||||
|
||||
QString val = QInputDialog::getText(
|
||||
this,
|
||||
QObject::tr("New text item"),
|
||||
QObject::tr("New Text Item"),
|
||||
QObject::tr("Enter text:"),
|
||||
QLineEdit::Normal,
|
||||
QString(),
|
||||
@@ -860,7 +860,7 @@ void ParameterValue::onCreateIntItem()
|
||||
bool ok;
|
||||
QString name = QInputDialog::getText(
|
||||
this,
|
||||
QObject::tr("New integer item"),
|
||||
QObject::tr("New Integer Item"),
|
||||
QObject::tr("Enter the name:"),
|
||||
QLineEdit::Normal,
|
||||
QString(),
|
||||
@@ -877,7 +877,7 @@ void ParameterValue::onCreateIntItem()
|
||||
if (name == QLatin1String(it.first.c_str())) {
|
||||
QMessageBox::critical(
|
||||
this,
|
||||
tr("Existing item"),
|
||||
tr("Existing Item"),
|
||||
tr("The item '%1' already exists.").arg(name)
|
||||
);
|
||||
return;
|
||||
@@ -886,7 +886,7 @@ void ParameterValue::onCreateIntItem()
|
||||
|
||||
int val = QInputDialog::getInt(
|
||||
this,
|
||||
QObject::tr("New integer item"),
|
||||
QObject::tr("New Integer Item"),
|
||||
QObject::tr("Enter number:"),
|
||||
0,
|
||||
-2147483647,
|
||||
@@ -908,7 +908,7 @@ void ParameterValue::onCreateUIntItem()
|
||||
bool ok;
|
||||
QString name = QInputDialog::getText(
|
||||
this,
|
||||
QObject::tr("New unsigned item"),
|
||||
QObject::tr("New Unsigned Item"),
|
||||
QObject::tr("Enter the name:"),
|
||||
QLineEdit::Normal,
|
||||
QString(),
|
||||
@@ -925,7 +925,7 @@ void ParameterValue::onCreateUIntItem()
|
||||
if (name == QLatin1String(it.first.c_str())) {
|
||||
QMessageBox::critical(
|
||||
this,
|
||||
tr("Existing item"),
|
||||
tr("Existing Item"),
|
||||
tr("The item '%1' already exists.").arg(name)
|
||||
);
|
||||
return;
|
||||
@@ -953,7 +953,7 @@ void ParameterValue::onCreateFloatItem()
|
||||
bool ok;
|
||||
QString name = QInputDialog::getText(
|
||||
this,
|
||||
QObject::tr("New float item"),
|
||||
QObject::tr("New Float Item"),
|
||||
QObject::tr("Enter the name:"),
|
||||
QLineEdit::Normal,
|
||||
QString(),
|
||||
@@ -970,7 +970,7 @@ void ParameterValue::onCreateFloatItem()
|
||||
if (name == QLatin1String(it.first.c_str())) {
|
||||
QMessageBox::critical(
|
||||
this,
|
||||
tr("Existing item"),
|
||||
tr("Existing Item"),
|
||||
tr("The item '%1' already exists.").arg(name)
|
||||
);
|
||||
return;
|
||||
@@ -979,7 +979,7 @@ void ParameterValue::onCreateFloatItem()
|
||||
|
||||
double val = QInputDialog::getDouble(
|
||||
this,
|
||||
QObject::tr("New float item"),
|
||||
QObject::tr("New Float Item"),
|
||||
QObject::tr("Enter number:"),
|
||||
0,
|
||||
-2147483647,
|
||||
@@ -1000,7 +1000,7 @@ void ParameterValue::onCreateBoolItem()
|
||||
bool ok;
|
||||
QString name = QInputDialog::getText(
|
||||
this,
|
||||
QObject::tr("New boolean item"),
|
||||
QObject::tr("New Boolean Item"),
|
||||
QObject::tr("Enter the name:"),
|
||||
QLineEdit::Normal,
|
||||
QString(),
|
||||
@@ -1017,7 +1017,7 @@ void ParameterValue::onCreateBoolItem()
|
||||
if (name == QLatin1String(it.first.c_str())) {
|
||||
QMessageBox::critical(
|
||||
this,
|
||||
tr("Existing item"),
|
||||
tr("Existing Item"),
|
||||
tr("The item '%1' already exists.").arg(name)
|
||||
);
|
||||
return;
|
||||
@@ -1028,7 +1028,7 @@ void ParameterValue::onCreateBoolItem()
|
||||
list << QStringLiteral("true") << QStringLiteral("false");
|
||||
QString val = QInputDialog::getItem(
|
||||
this,
|
||||
QObject::tr("New boolean item"),
|
||||
QObject::tr("New Boolean Item"),
|
||||
QObject::tr("Choose an item:"),
|
||||
list,
|
||||
0,
|
||||
|
||||
@@ -502,7 +502,7 @@ bool GraphvizView::onMsg(const char* pMsg, const char**)
|
||||
QString selectedFilter;
|
||||
QString fn = Gui::FileDialog::getSaveFileName(
|
||||
this,
|
||||
tr("Export graph"),
|
||||
tr("Export Graph"),
|
||||
QString(),
|
||||
filter.join(QLatin1String(";;")),
|
||||
&selectedFilter
|
||||
@@ -604,7 +604,7 @@ void GraphvizView::printPdf()
|
||||
QString selectedFilter;
|
||||
QString fn = Gui::FileDialog::getSaveFileName(
|
||||
this,
|
||||
tr("Export graph"),
|
||||
tr("Export Graph"),
|
||||
QString(),
|
||||
filter.join(QLatin1String(";;")),
|
||||
&selectedFilter
|
||||
|
||||
@@ -427,7 +427,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags f)
|
||||
d->hintLabel = new InputHintWidget(statusBar());
|
||||
d->hintLabel->setObjectName(QStringLiteral("hintLabel"));
|
||||
//: A context menu action used to show or hide the input hints in the status bar
|
||||
d->hintLabel->setWindowTitle(tr("Input hints"));
|
||||
d->hintLabel->setWindowTitle(tr("Input Hints"));
|
||||
|
||||
statusBar()->addWidget(d->hintLabel);
|
||||
|
||||
@@ -437,7 +437,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags f)
|
||||
statusBar()->addPermanentWidget(d->rightSideLabel);
|
||||
d->rightSideLabel->setObjectName(QStringLiteral("rightSideLabel"));
|
||||
//: A context menu action used to enable or disable quick measure in the status bar
|
||||
d->rightSideLabel->setWindowTitle(tr("Quick measure"));
|
||||
d->rightSideLabel->setWindowTitle(tr("Quick Measure"));
|
||||
|
||||
auto hGrp = App::GetApplication().GetParameterGroupByPath(
|
||||
"User parameter:BaseApp/Preferences/NotificationArea"
|
||||
|
||||
@@ -123,7 +123,7 @@ def setStatusIcons(show=True):
|
||||
statuswidget.setObjectName("BIMStatusWidget")
|
||||
text = translate(
|
||||
"BIMStatusWidget",
|
||||
"BIM status widget",
|
||||
"BIM Status Widget",
|
||||
"A context menu action used to show or hide this toolbar widget",
|
||||
)
|
||||
statuswidget.setWindowTitle(text)
|
||||
|
||||
@@ -85,7 +85,7 @@ class BIM_Material:
|
||||
w = PARAMS.GetInt("BimMaterialDialogWidth", 230)
|
||||
h = PARAMS.GetInt("BimMaterialDialogHeight", 350)
|
||||
self.dlg.resize(w, h)
|
||||
self.dlg.setWindowTitle(translate("BIM", "Select material"))
|
||||
self.dlg.setWindowTitle(translate("BIM", "Select Material"))
|
||||
self.dlg.setWindowIcon(QtGui.QIcon(":/icons/Arch_Material.svg"))
|
||||
mw = FreeCADGui.getMainWindow()
|
||||
self.dlg.move(mw.frameGeometry().topLeft() + mw.rect().center() - self.dlg.rect().center())
|
||||
@@ -104,8 +104,8 @@ class BIM_Material:
|
||||
searchLayout = QtGui.QHBoxLayout()
|
||||
searchLayout.setSpacing(2)
|
||||
searchBox = MatLineEdit(self.dlg)
|
||||
searchBox.setPlaceholderText(translate("BIM", "Search Objects"))
|
||||
searchBox.setToolTip(translate("BIM", "Searches for objects in the tree"))
|
||||
searchBox.setPlaceholderText(translate("BIM", "Search materials"))
|
||||
searchBox.setToolTip(translate("BIM", "Searches for materials in the list"))
|
||||
self.dlg.searchBox = searchBox
|
||||
searchLayout.addWidget(searchBox)
|
||||
searchBox.textChanged.connect(self.onSearch)
|
||||
@@ -138,7 +138,7 @@ class BIM_Material:
|
||||
buttonCreate.clicked.connect(self.onCreate)
|
||||
|
||||
# create multi
|
||||
buttonMulti = QtGui.QPushButton(translate("BIM", "Create new Multi-Material"), self.dlg)
|
||||
buttonMulti = QtGui.QPushButton(translate("BIM", "New Multi-Material"), self.dlg)
|
||||
buttonMulti.setIcon(QtGui.QIcon(":/icons/Arch_Material_Multi.svg"))
|
||||
createButtonsLayout.addWidget(buttonMulti, 0, 1)
|
||||
buttonMulti.clicked.connect(self.onMulti)
|
||||
|
||||
@@ -458,36 +458,42 @@ class BIM_ProjectManager:
|
||||
for i in range(self.form.groupsList.count()):
|
||||
groups.append(self.form.groupsList.item(i).text())
|
||||
|
||||
s = "# FreeCAD BIM Project setup preset " + name + "\n"
|
||||
s += "groupNewDocument=" + str(int(self.form.groupNewProject.isChecked())) + "\n"
|
||||
s += "projectName=" + self.form.projectName.text() + "\n"
|
||||
s += "groupSite=" + str(int(self.form.groupSite.isChecked())) + "\n"
|
||||
form = self.form
|
||||
|
||||
s += "siteName=" + self.form.siteName.text() + "\n"
|
||||
s += "siteAddress=" + self.form.siteAddress.text() + "\n"
|
||||
s += "siteLongitude=" + str(self.form.siteLongitude.value()) + "\n"
|
||||
s += "siteLatitude=" + str(self.form.siteLatitude.value()) + "\n"
|
||||
s += "siteDeviation=" + str(self.form.siteDeviation.value()) + "\n"
|
||||
s += "siteElevation=" + self.form.siteElevation.text() + "\n"
|
||||
presets: dict[str, object] = {
|
||||
"groupNewDocument": int(form.groupNewProject.isChecked()),
|
||||
"projectName": form.projectName.text(),
|
||||
"groupSite": int(form.groupSite.isChecked()),
|
||||
"siteName": form.siteName.text(),
|
||||
"siteAddress": form.siteAddress.text(),
|
||||
"siteLongitude": form.siteLongitude.value(),
|
||||
"siteLatitude": form.siteLatitude.value(),
|
||||
"siteDeviation": form.siteDeviation.value(),
|
||||
"siteElevation": form.siteElevation.text(),
|
||||
"groupBuilding": int(form.groupBuilding.isChecked()),
|
||||
"buildingName": form.buildingName.text(),
|
||||
"buildingUse": form.buildingUse.currentIndex(),
|
||||
"buildingLength": form.buildingLength.text(),
|
||||
"buildingWidth": form.buildingWidth.text(),
|
||||
"countVAxes": form.countVAxes.value(),
|
||||
"distVAxes": form.distVAxes.text(),
|
||||
"countHAxes": form.countHAxes.value(),
|
||||
"distHAxes": form.distHAxes.text(),
|
||||
"countLevels": form.countLevels.value(),
|
||||
"levelHeight": form.levelHeight.text(),
|
||||
"lineWidth": form.lineWidth.value(),
|
||||
"lineColor": form.lineColor.property("color").getRgbF()[:3],
|
||||
"groups": ";;".join(groups),
|
||||
"addHumanFigure": int(form.addHumanFigure.isChecked()),
|
||||
}
|
||||
|
||||
s += "groupBuilding=" + str(int(self.form.groupBuilding.isChecked())) + "\n"
|
||||
s += "buildingName=" + self.form.buildingName.text() + "\n"
|
||||
s += "buildingUse=" + str(self.form.buildingUse.currentIndex()) + "\n"
|
||||
s += "buildingLength=" + self.form.buildingLength.text() + "\n"
|
||||
s += "buildingWidth=" + self.form.buildingWidth.text() + "\n"
|
||||
s += "countVAxes=" + str(self.form.countVAxes.value()) + "\n"
|
||||
s += "distVAxes=" + self.form.distVAxes.text() + "\n"
|
||||
s += "countHAxes=" + str(self.form.countHAxes.value()) + "\n"
|
||||
s += "distHAxes=" + self.form.distHAxes.text() + "\n"
|
||||
s += "countLevels=" + str(self.form.countLevels.value()) + "\n"
|
||||
s += "levelHeight=" + self.form.levelHeight.text() + "\n"
|
||||
s += "lineWidth=" + str(self.form.lineWidth.value()) + "\n"
|
||||
s += "lineColor=" + str(self.form.lineColor.property("color").getRgbF()[:3]) + "\n"
|
||||
s += "groups=" + ";;".join(groups) + "\n"
|
||||
s += "addHumanFigure=" + str(int(self.form.addHumanFigure.isChecked())) + "\n"
|
||||
preset = f"# FreeCAD BIM Project setup preset { name }\n"
|
||||
|
||||
for key, value in presets.items():
|
||||
preset += f"{ key }={ value }\n"
|
||||
|
||||
f = open(os.path.join(presetdir, name + ".txt"), "w")
|
||||
f.write(s)
|
||||
f.write(preset)
|
||||
f.close()
|
||||
self.fillPresets()
|
||||
|
||||
|
||||
@@ -31,11 +31,10 @@ QT_TRANSLATE_NOOP = FreeCAD.Qt.QT_TRANSLATE_NOOP
|
||||
|
||||
|
||||
class BIM_Sketch:
|
||||
|
||||
def GetResources(self):
|
||||
return {
|
||||
"Pixmap": "Sketch",
|
||||
"MenuText": QT_TRANSLATE_NOOP("BIM_Sketch", "Sketch"),
|
||||
"MenuText": QT_TRANSLATE_NOOP("BIM_Sketch", "New Sketch"),
|
||||
"ToolTip": QT_TRANSLATE_NOOP(
|
||||
"BIM_Sketch", "Creates a new sketch in the current working plane"
|
||||
),
|
||||
|
||||
@@ -1,20 +1,14 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
from PySide.QtCore import QT_TRANSLATE_NOOP
|
||||
import FreeCAD
|
||||
import Path
|
||||
import Path.Base.Util as PathUtil
|
||||
import Path.Dressup.Array as DressupArray
|
||||
import Path.Dressup.Utils as PathDressup
|
||||
import Path.Main.Stock as PathStock
|
||||
import PathScripts.PathUtils as PathUtils
|
||||
|
||||
from PySide import QtGui
|
||||
from PySide.QtCore import QT_TRANSLATE_NOOP
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
import Path
|
||||
import PathGui
|
||||
import Path.Dressup.Array as DressupArray
|
||||
import Path.Dressup.Utils as PathDressup
|
||||
|
||||
from PySide.QtCore import QT_TRANSLATE_NOOP
|
||||
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
|
||||
class DressupArrayViewProvider(object):
|
||||
|
||||
@@ -671,7 +671,7 @@ class ObjectDressup:
|
||||
lead.append(self.createStraightMove(obj, lineBegin, begin))
|
||||
|
||||
# prepend "LineZ" style lead-in - vertical inclined line
|
||||
# Should be apply only on straight Path segment
|
||||
# Should be applied only on straight Path segment
|
||||
elif styleIn == "LineZ":
|
||||
# tangent vector in XY plane
|
||||
# normal vector is vertical
|
||||
@@ -686,7 +686,7 @@ class ObjectDressup:
|
||||
lead.append(self.createStraightMove(obj, lineBegin, begin))
|
||||
|
||||
# prepend "ArcZ" style lead-in - vertical Arc
|
||||
# Should be apply only on straight Path segment
|
||||
# Should be applied only on straight Path segment
|
||||
elif styleIn == "ArcZ":
|
||||
# tangent vector in XY plane
|
||||
# normal vector is vertical
|
||||
@@ -704,7 +704,7 @@ class ObjectDressup:
|
||||
arcBegin = begin + tangent + normal
|
||||
lead.extend(self.createArcZMoveDown(obj, arcBegin, begin, arcRadius))
|
||||
|
||||
# replace 'begin' position by first lead-in command
|
||||
# replace 'begin' position with first lead-in command
|
||||
begin = lead[0].positionBegin()
|
||||
|
||||
if styleIn in ("Arc3d", "Line3d"):
|
||||
@@ -728,12 +728,12 @@ class ObjectDressup:
|
||||
|
||||
if obj.StyleOut == "Helix" and outInstrPrev:
|
||||
"""change Z for previous helix lead-out
|
||||
Can not do it in getLeadEnd(),
|
||||
because no any information about next moves there while creating Lead-out"""
|
||||
Unable to do it in getLeadEnd(), due to lack of
|
||||
existing information about next moves while creating Lead-out"""
|
||||
posPrevZ = outInstrPrev.positionEnd().z
|
||||
if posPrevZ > beginZ:
|
||||
"""previous profile upper than this
|
||||
mean procesing one stepdown profile"""
|
||||
mean processing one stepdown profile"""
|
||||
halfStepZ = (posPrevZ - beginZ) / 2
|
||||
outInstrPrev.param["Z"] = posPrevZ - halfStepZ
|
||||
|
||||
@@ -847,7 +847,7 @@ class ObjectDressup:
|
||||
else:
|
||||
lead[-1].param["Z"] = self.baseOp.StartDepth.Value
|
||||
|
||||
# append travel moves to clearance height after finish all profiles
|
||||
# append travel moves to clearance height after finishing all profiles
|
||||
if last and obj.StyleOut != "No Retract":
|
||||
lead += self.getTravelEnd(obj)
|
||||
|
||||
@@ -888,7 +888,7 @@ class ObjectDressup:
|
||||
|
||||
return i
|
||||
|
||||
# Increase travel length from begin
|
||||
# Increase travel length from 'begin'
|
||||
def getOvertravelIn(self, obj, source, length, start, end):
|
||||
startPoint = source[start].positionBegin()
|
||||
endPoint = source[end].positionEnd()
|
||||
@@ -901,12 +901,12 @@ class ObjectDressup:
|
||||
instrLength = instr.pathLength()
|
||||
|
||||
if Path.Geom.isRoughly(measuredLength + instrLength, length, 1):
|
||||
# get needed length and not need to cut last command
|
||||
# get needed length without needing to cut last command
|
||||
commands = source[end - i : end + 1]
|
||||
return commands
|
||||
|
||||
elif measuredLength + instrLength > length:
|
||||
# measured length exceed needed length and need cut command
|
||||
# measured length exceeds needed length and needs cut command
|
||||
commands = source[end - i + 1 : end + 1]
|
||||
newLength = length - measuredLength
|
||||
newInstr = self.cutInstrBegin(obj, instr, newLength)
|
||||
@@ -938,12 +938,12 @@ class ObjectDressup:
|
||||
instrLength = instr.pathLength()
|
||||
|
||||
if Path.Geom.isRoughly(measuredLength + instrLength, length, 1):
|
||||
# get needed length and not need to cut last command
|
||||
# get needed length without needing to cut last command
|
||||
commands = source[start : start + i + 1]
|
||||
return commands
|
||||
|
||||
elif measuredLength + instrLength > length:
|
||||
# measured length exceed needed length and need cut command
|
||||
# measured length exceeds needed length and needs cut command
|
||||
commands = source[start : start + i]
|
||||
newLength = length - measuredLength
|
||||
newInstr = self.cutInstrEnd(obj, instr, newLength)
|
||||
@@ -1051,7 +1051,7 @@ class ObjectDressup:
|
||||
source = PathLanguage.Maneuver.FromPath(PathUtils.getPathWithPlacement(obj.Base)).instr
|
||||
maneuver = PathLanguage.Maneuver()
|
||||
|
||||
# Knowing weather a given instruction is the first cutting move is easy,
|
||||
# Knowing whether a given instruction is the first cutting move is easy,
|
||||
# we just use a flag and set it to false afterwards. To find the last
|
||||
# cutting move we need to search the list in reverse order.
|
||||
|
||||
@@ -1067,10 +1067,10 @@ class ObjectDressup:
|
||||
|
||||
# Process all instructions
|
||||
for i, instr in enumerate(source):
|
||||
# Process not mill instruction
|
||||
# Process without mill instruction
|
||||
if not self.isCuttingMove(instr):
|
||||
if not instr.isMove():
|
||||
# non-move instruction get added verbatim
|
||||
# non-move instruction gets added verbatim
|
||||
commands.append(instr)
|
||||
else:
|
||||
moveDir = self.getMoveDir(instr)
|
||||
|
||||
@@ -1522,7 +1522,7 @@ def drawSpline(spline, forceShape=False):
|
||||
if nbfitp != len(fitpoints):
|
||||
raise ValueError("Wrong number of fit points")
|
||||
if rational == all((w == 1.0 or w is None) for w in weights):
|
||||
raise ValueError("inconsistant rational flag")
|
||||
raise ValueError("Inconsistent rational flag")
|
||||
if len(weights) == 0:
|
||||
weights = None
|
||||
elif len(weights) != len(controlpoints):
|
||||
|
||||
@@ -102,7 +102,7 @@ class ConstraintTie(base_fempythonobject.BaseFemPythonObject):
|
||||
type="App::PropertyInteger",
|
||||
name="ConnectedSectors",
|
||||
group="Geometry",
|
||||
doc="Number of connected sectors",
|
||||
doc="Number of connected sectors used for results display",
|
||||
value=1,
|
||||
)
|
||||
)
|
||||
|
||||
@@ -226,6 +226,15 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>rbUniform</tabstop>
|
||||
<tabstop>dsbUniformScale</tabstop>
|
||||
<tabstop>rbNonUniform</tabstop>
|
||||
<tabstop>dsbXScale</tabstop>
|
||||
<tabstop>dsbYScale</tabstop>
|
||||
<tabstop>dsbZScale</tabstop>
|
||||
<tabstop>treeWidget</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -344,7 +344,7 @@ This setting is only for the toolbar. Whichever you choose, all tools are always
|
||||
<property name="toolTip">
|
||||
<string>Choose a visibility mode for the On-View-Parameters:
|
||||
'Disabled': On-View-Parameters are completely disabled.
|
||||
'Only dimensional': Only dimensional On-View-Parameters are visible. They are the most useful. For example the radius of a circle.
|
||||
'Dimensional only': Only dimensional On-View-Parameters are visible. They are the most useful. For example, the radius of a circle.
|
||||
'All': Both dimensional and positional On-View-Parameters. Positionals are the (x,y) position of the cursor. For example for the center of a circle.</string>
|
||||
</property>
|
||||
</widget>
|
||||
|
||||
@@ -191,12 +191,12 @@ SheetTableView::SheetTableView(QWidget* parent)
|
||||
return act;
|
||||
};
|
||||
|
||||
actionProperties = createAction("", tr("Properties…"), &SheetTableView::cellProperties);
|
||||
actionProperties = createAction("", tr("Properties"), &SheetTableView::cellProperties);
|
||||
contextMenu.addSeparator();
|
||||
actionRecompute
|
||||
= createAction(":/icons/view-refresh.svg", tr("Recompute"), &SheetTableView::onRecompute);
|
||||
actionBind = createAction("", tr("Bind…"), &SheetTableView::onBind);
|
||||
actionConf = createAction("", tr("Configuration Table…"), &SheetTableView::onConfSetup);
|
||||
actionConf = createAction("", tr("Configuration Table"), &SheetTableView::onConfSetup);
|
||||
contextMenu.addSeparator();
|
||||
actionMerge = createAction(
|
||||
":/icons/SpreadsheetMergeCells.svg",
|
||||
|
||||
@@ -423,7 +423,7 @@ class TaskFillTemplateFields:
|
||||
QtCore.QObject.connect(
|
||||
self.okbox, QtCore.SIGNAL("rejected()"), self.close
|
||||
)
|
||||
self.okbox.button(QtGui.QDialogButtonBox.Ok).setText("&Ok")
|
||||
self.okbox.button(QtGui.QDialogButtonBox.Ok).setText("&OK")
|
||||
self.okbox.button(QtGui.QDialogButtonBox.Cancel).setText("&Cancel")
|
||||
self.button = self.okbox.button(QtGui.QDialogButtonBox.Ok)
|
||||
self.button.setEnabled(True)
|
||||
|
||||
@@ -668,7 +668,7 @@ indicator.adjustSize()
|
||||
indicator.setObjectName("NavigationIndicator")
|
||||
text = QtGui.QApplication.translate(
|
||||
"NavigationIndicator",
|
||||
"Navigation indicator",
|
||||
"Navigation Indicator",
|
||||
"A context menu action used to show or hide the 'Navigation indicator' toolbar widget",
|
||||
)
|
||||
indicator.setWindowTitle(text)
|
||||
|
||||
@@ -337,7 +337,7 @@ def load_token():
|
||||
token = file.read().strip()
|
||||
if token:
|
||||
return token
|
||||
# if file does'nt exists read from CROWDIN_TOKEN
|
||||
# if file doesn't exist, read from CROWDIN_TOKEN
|
||||
return os.environ.get("CROWDIN_TOKEN")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user