From 46f70788cf495721387bea0af2092809d5c434cb Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Wed, 12 Jul 2017 20:21:48 +0200 Subject: [PATCH] issue #654 refactoring the code so that the functions and variables are called xxx multisize xxx instead of xxx standard xxx --HG-- branch : develop --- dist/macx/tape/Info.plist | 4 +- dist/macx/valentina/Info.plist | 4 +- src/app/share/collection/jacketМ1_52-176.val | 2 +- src/app/share/collection/jacketМ2_40-146.val | 2 +- src/app/share/collection/jacketМ3_40-146.val | 2 +- src/app/share/collection/jacketМ4_40-146.val | 2 +- src/app/share/collection/jacketМ5_30-110.val | 2 +- src/app/share/collection/jacketМ6_30-110.val | 2 +- src/app/share/collection/pantsМ1_52-176.val | 2 +- src/app/share/collection/pantsМ2_40-146.val | 2 +- src/app/share/collection/pantsМ7.val | 2 +- .../{standard => multisize}/GOST_man_ru.vst | 0 src/app/tables.pri | 6 +- .../configpages/tapepreferencespathpage.cpp | 16 ++--- .../tape/dialogs/dialognewmeasurements.cpp | 4 +- src/app/tape/tape.pro | 12 ++-- src/app/tape/tmainwindow.cpp | 46 +++++++------- src/app/tape/tmainwindow.h | 2 +- src/app/tape/tmainwindow.ui | 4 +- src/app/valentina/core/vcmdexport.cpp | 4 +- .../configpages/preferencespathpage.cpp | 16 ++--- .../dialogs/dialogpatternproperties.cpp | 2 +- .../dialogs/dialogpatternproperties.ui | 2 +- src/app/valentina/mainwindow.cpp | 62 +++++++++---------- src/app/valentina/mainwindow.h | 2 +- src/app/valentina/mainwindow.ui | 24 +++---- src/app/valentina/valentina.pro | 24 +++---- src/libs/ifc/xml/vdomdocument.h | 4 +- src/libs/vformat/vmeasurements.cpp | 16 ++--- src/libs/vformat/vmeasurements.h | 2 +- src/libs/vmisc/def.h | 2 +- src/libs/vmisc/vcommonsettings.cpp | 20 +++--- src/libs/vmisc/vcommonsettings.h | 10 +-- .../vpatterndb/variables/vmeasurement.cpp | 10 +-- src/libs/vpatterndb/variables/vmeasurement.h | 8 +-- src/libs/vpatterndb/vcontainer.cpp | 4 +- src/test/CollectionTest/CollectionTest.pro | 2 +- .../tst_valentinacommandline.cpp | 8 +-- src/test/ValentinaTest/tst_vmeasurements.cpp | 8 +-- src/test/ValentinaTest/tst_vmeasurements.h | 4 +- 40 files changed, 175 insertions(+), 175 deletions(-) rename src/app/share/tables/{standard => multisize}/GOST_man_ru.vst (100%) diff --git a/dist/macx/tape/Info.plist b/dist/macx/tape/Info.plist index 9bb4dff97..d6f1875a5 100755 --- a/dist/macx/tape/Info.plist +++ b/dist/macx/tape/Info.plist @@ -50,7 +50,7 @@ org.valentinaproject.vst CFBundleTypeName - Valentina standard measurements + Valentina multisize measurements LSHandlerRank Owner @@ -86,7 +86,7 @@ public.xml UTTypeDescription - Valentina standard measurements + Valentina multisize measurements UTTypeIconFile s-measurements.icns UTTypeIdentifier diff --git a/dist/macx/valentina/Info.plist b/dist/macx/valentina/Info.plist index b50b1c780..6deb4cca0 100755 --- a/dist/macx/valentina/Info.plist +++ b/dist/macx/valentina/Info.plist @@ -64,7 +64,7 @@ org.valentinaproject.vst CFBundleTypeName - Valentina standard measurements + Valentina multisize measurements LSHandlerRank Alternate @@ -122,7 +122,7 @@ public.xml UTTypeDescription - Valentina standard measurements + Valentina multisize measurements UTTypeIconFile s-measurements.icns UTTypeIdentifier diff --git a/src/app/share/collection/jacketМ1_52-176.val b/src/app/share/collection/jacketМ1_52-176.val index d27a8c4d9..2574d3070 100644 --- a/src/app/share/collection/jacketМ1_52-176.val +++ b/src/app/share/collection/jacketМ1_52-176.val @@ -10,7 +10,7 @@ - ../../../../../build-Valentina-Desktop-Debug/src/app/valentina/bin/tables/standard/GOST_man_ru.vst + ../../../../../build-Valentina-Desktop-Debug/src/app/valentina/bin/tables/multisize/GOST_man_ru.vst diff --git a/src/app/share/collection/jacketМ2_40-146.val b/src/app/share/collection/jacketМ2_40-146.val index b00bf83d5..1c90e52c1 100644 --- a/src/app/share/collection/jacketМ2_40-146.val +++ b/src/app/share/collection/jacketМ2_40-146.val @@ -10,7 +10,7 @@ - ../../../../../build-Valentina-Desktop-Debug/src/app/valentina/bin/tables/standard/GOST_man_ru.vst + ../../../../../build-Valentina-Desktop-Debug/src/app/valentina/bin/tables/multisize/GOST_man_ru.vst diff --git a/src/app/share/collection/jacketМ3_40-146.val b/src/app/share/collection/jacketМ3_40-146.val index 1878f0f1f..5d6c7c985 100644 --- a/src/app/share/collection/jacketМ3_40-146.val +++ b/src/app/share/collection/jacketМ3_40-146.val @@ -10,7 +10,7 @@ - ../../../../../build-Valentina-Desktop-Debug/src/app/valentina/bin/tables/standard/GOST_man_ru.vst + ../../../../../build-Valentina-Desktop-Debug/src/app/valentina/bin/tables/multisize/GOST_man_ru.vst diff --git a/src/app/share/collection/jacketМ4_40-146.val b/src/app/share/collection/jacketМ4_40-146.val index 00bcef18b..194a3f77b 100644 --- a/src/app/share/collection/jacketМ4_40-146.val +++ b/src/app/share/collection/jacketМ4_40-146.val @@ -10,7 +10,7 @@ - ../../../../../build-Valentina-Desktop-Debug/src/app/valentina/bin/tables/standard/GOST_man_ru.vst + ../../../../../build-Valentina-Desktop-Debug/src/app/valentina/bin/tables/multisize/GOST_man_ru.vst diff --git a/src/app/share/collection/jacketМ5_30-110.val b/src/app/share/collection/jacketМ5_30-110.val index 30d16f963..8184de6d1 100644 --- a/src/app/share/collection/jacketМ5_30-110.val +++ b/src/app/share/collection/jacketМ5_30-110.val @@ -10,7 +10,7 @@ - ../../../../../build-Valentina-Desktop-Debug/src/app/valentina/bin/tables/standard/GOST_man_ru.vst + ../../../../../build-Valentina-Desktop-Debug/src/app/valentina/bin/tables/multisize/GOST_man_ru.vst diff --git a/src/app/share/collection/jacketМ6_30-110.val b/src/app/share/collection/jacketМ6_30-110.val index 1eb1cc26e..a4b44972a 100644 --- a/src/app/share/collection/jacketМ6_30-110.val +++ b/src/app/share/collection/jacketМ6_30-110.val @@ -10,7 +10,7 @@ - ../../../../../build-Valentina-Qt_Qt_Version_GCC_32bit-Debug/src/app/valentina/bin/tables/standard/GOST_man_ru.vst + ../../../../../build-Valentina-Qt_Qt_Version_GCC_32bit-Debug/src/app/valentina/bin/tables/multisize/GOST_man_ru.vst diff --git a/src/app/share/collection/pantsМ1_52-176.val b/src/app/share/collection/pantsМ1_52-176.val index cd83abd40..8cd16f745 100644 --- a/src/app/share/collection/pantsМ1_52-176.val +++ b/src/app/share/collection/pantsМ1_52-176.val @@ -10,7 +10,7 @@ - ../../../../../build-Valentina-Desktop-Debug/src/app/valentina/bin/tables/standard/GOST_man_ru.vst + ../../../../../build-Valentina-Desktop-Debug/src/app/valentina/bin/tables/multisize/GOST_man_ru.vst diff --git a/src/app/share/collection/pantsМ2_40-146.val b/src/app/share/collection/pantsМ2_40-146.val index c3f104c3f..b4857e85f 100644 --- a/src/app/share/collection/pantsМ2_40-146.val +++ b/src/app/share/collection/pantsМ2_40-146.val @@ -10,7 +10,7 @@ - ../../../../../build-Valentina-Desktop-Debug/src/app/valentina/bin/tables/standard/GOST_man_ru.vst + ../../../../../build-Valentina-Desktop-Debug/src/app/valentina/bin/tables/multisize/GOST_man_ru.vst diff --git a/src/app/share/collection/pantsМ7.val b/src/app/share/collection/pantsМ7.val index 0ea8f4f3b..8f5fff4f4 100644 --- a/src/app/share/collection/pantsМ7.val +++ b/src/app/share/collection/pantsМ7.val @@ -10,7 +10,7 @@ - ../../../../../build-Valentina-Desktop-Debug/src/app/valentina/bin/tables/standard/GOST_man_ru.vst + ../../../../../build-Valentina-Desktop-Debug/src/app/valentina/bin/tables/multisize/GOST_man_ru.vst diff --git a/src/app/share/tables/standard/GOST_man_ru.vst b/src/app/share/tables/multisize/GOST_man_ru.vst similarity index 100% rename from src/app/share/tables/standard/GOST_man_ru.vst rename to src/app/share/tables/multisize/GOST_man_ru.vst diff --git a/src/app/tables.pri b/src/app/tables.pri index 1f89332e2..e5e059b62 100644 --- a/src/app/tables.pri +++ b/src/app/tables.pri @@ -1,9 +1,9 @@ -# Keep path to all files with standard measurements we support right now -INSTALL_STANDARD_MEASUREMENTS += $$PWD/share/tables/standard/GOST_man_ru.vst +# Keep path to all files with multisize measurements we support right now +INSTALL_MULTISIZE_MEASUREMENTS += $$PWD/share/tables/multisize/GOST_man_ru.vst # Keep path to all template files we have right now INSTALL_STANDARD_TEMPLATES += \ $$PWD/share/tables/templates/template_all_measurements.vit \ $$PWD/share/tables/templates/t_Aldrich_Women.vit -copyToDestdir($$INSTALL_STANDARD_MEASUREMENTS, $$shell_path($${OUT_PWD}/$$DESTDIR/tables/standard)) +copyToDestdir($$INSTALL_MULTISIZE_MEASUREMENTS, $$shell_path($${OUT_PWD}/$$DESTDIR/tables/multisize)) diff --git a/src/app/tape/dialogs/configpages/tapepreferencespathpage.cpp b/src/app/tape/dialogs/configpages/tapepreferencespathpage.cpp index 70a441aaa..967c3519f 100644 --- a/src/app/tape/dialogs/configpages/tapepreferencespathpage.cpp +++ b/src/app/tape/dialogs/configpages/tapepreferencespathpage.cpp @@ -58,7 +58,7 @@ void TapePreferencesPathPage::Apply() { VTapeSettings *settings = qApp->TapeSettings(); settings->SetPathIndividualMeasurements(ui->pathTable->item(0, 1)->text()); - settings->SetPathStandardMeasurements(ui->pathTable->item(1, 1)->text()); + settings->SetPathMultisizeMeasurements(ui->pathTable->item(1, 1)->text()); settings->SetPathTemplate(ui->pathTable->item(2, 1)->text()); } @@ -75,8 +75,8 @@ void TapePreferencesPathPage::DefaultPath() case 0: // individual measurements path = VCommonSettings::GetDefPathIndividualMeasurements(); break; - case 1: // standard measurements - path = VCommonSettings::GetDefPathStandardMeasurements(); + case 1: // multisize measurements + path = VCommonSettings::GetDefPathMultisizeMeasurements(); break; case 2: // templates path = VCommonSettings::GetDefPathTemplate(); @@ -102,9 +102,9 @@ void TapePreferencesPathPage::EditPath() case 0: // individual measurements path = qApp->TapeSettings()->GetPathIndividualMeasurements(); break; - case 1: // standard measurements - path = qApp->TapeSettings()->GetPathStandardMeasurements(); - path = VCommonSettings::PrepareStandardTables(path); + case 1: // multisize measurements + path = qApp->TapeSettings()->GetPathMultisizeMeasurements(); + path = VCommonSettings::PrepareMultisizeTables(path); break; case 2: // templates path = qApp->TapeSettings()->GetPathTemplate(); @@ -155,8 +155,8 @@ void TapePreferencesPathPage::InitTable() { ui->pathTable->setItem(1, 0, new QTableWidgetItem(tr("My Multisize Measurements"))); - QTableWidgetItem *item = new QTableWidgetItem(settings->GetPathStandardMeasurements()); - item->setToolTip(settings->GetPathStandardMeasurements()); + QTableWidgetItem *item = new QTableWidgetItem(settings->GetPathMultisizeMeasurements()); + item->setToolTip(settings->GetPathMultisizeMeasurements()); ui->pathTable->setItem(1, 1, item); } diff --git a/src/app/tape/dialogs/dialognewmeasurements.cpp b/src/app/tape/dialogs/dialognewmeasurements.cpp index d1dedf9b3..18bed0897 100644 --- a/src/app/tape/dialogs/dialognewmeasurements.cpp +++ b/src/app/tape/dialogs/dialognewmeasurements.cpp @@ -141,7 +141,7 @@ void DialogNewMeasurements::showEvent(QShowEvent *event) void DialogNewMeasurements::CurrentTypeChanged(int index) { const MeasurementsType type = static_cast(ui->comboBoxMType->itemData(index).toInt()); - if (type == MeasurementsType::Standard) + if (type == MeasurementsType::Multisize) { ui->comboBoxBaseSize->setEnabled(true); ui->comboBoxBaseHeight->setEnabled(true); @@ -183,7 +183,7 @@ void DialogNewMeasurements::InitMTypes() ui->comboBoxMType->blockSignals(true); ui->comboBoxMType->clear(); ui->comboBoxMType->addItem(tr("Individual"), static_cast(MeasurementsType::Individual)); - ui->comboBoxMType->addItem(tr("Multisize"), static_cast(MeasurementsType::Standard)); + ui->comboBoxMType->addItem(tr("Multisize"), static_cast(MeasurementsType::Multisize)); ui->comboBoxMType->blockSignals(false); int index = ui->comboBoxMType->findData(val); diff --git a/src/app/tape/tape.pro b/src/app/tape/tape.pro index a2c3fb540..c50410a64 100644 --- a/src/app/tape/tape.pro +++ b/src/app/tape/tape.pro @@ -174,7 +174,7 @@ QMAKE_EXTRA_COMPILERS += diagrams QMAKE_CLEAN += $${OUT_PWD}/$${DESTDIR}/diagrams.rcc -# INSTALL_STANDARD_MEASUREMENTS and INSTALL_STANDARD_TEMPLATES inside tables.pri +# INSTALL_MULTISIZE_MEASUREMENTS and INSTALL_STANDARD_TEMPLATES inside tables.pri include(../tables.pri) copyToDestdir($$INSTALL_STANDARD_TEMPLATES, $$shell_path($${OUT_PWD}/$${DESTDIR}/tables/templates)) include(../translations.pri) @@ -244,15 +244,15 @@ unix{ QMAKE_INFO_PLIST = $$PWD/../../../dist/macx/tape/Info.plist - # Copy to bundle standard measurements files - standard.path = $$RESOURCES_DIR/tables/standard/ - standard.files = $$INSTALL_STANDARD_MEASUREMENTS + # Copy to bundle multisize measurements files + multisize.path = $$RESOURCES_DIR/tables/multisize/ + multisize.files = $$INSTALL_MULTISIZE_MEASUREMENTS # Copy to bundle templates files templates.path = $$RESOURCES_DIR/tables/templates/ templates.files = $$INSTALL_STANDARD_TEMPLATES - # Copy to bundle standard measurements files + # Copy to bundle multisize measurements files # We cannot add none exist files to bundle through QMAKE_BUNDLE_DATA. That's why we must do this manually. QMAKE_POST_LINK += $$VCOPY $$quote($${OUT_PWD}/$${DESTDIR}/diagrams.rcc) $$quote($$shell_path($${OUT_PWD}/$$DESTDIR/$${TARGET}.app/$$RESOURCES_DIR/)) $$escape_expand(\\n\\t) @@ -262,7 +262,7 @@ unix{ QMAKE_BUNDLE_DATA += \ templates \ - standard \ + multisize \ libraries \ format } diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index c3d57deda..8a3bb929f 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -176,7 +176,7 @@ void TMainWindow::SetBaseMHeight(int height) { if (m != nullptr) { - if (mType == MeasurementsType::Standard) + if (mType == MeasurementsType::Multisize) { const int row = ui->tableWidget->currentRow(); VContainer::SetHeight(UnitConvertor(height, Unit::Cm, mUnit)); @@ -191,7 +191,7 @@ void TMainWindow::SetBaseMSize(int size) { if (m != nullptr) { - if (mType == MeasurementsType::Standard) + if (mType == MeasurementsType::Multisize) { const int row = ui->tableWidget->currentRow(); VContainer::SetSize(UnitConvertor(size, Unit::Cm, mUnit)); @@ -260,7 +260,7 @@ bool TMainWindow::LoadFile(const QString &path) throw e; } - if (mType == MeasurementsType::Standard) + if (mType == MeasurementsType::Multisize) { VVSTConverter converter(path); m_curFileFormatVersion = converter.GetCurrentFormatVarsion(); @@ -361,7 +361,7 @@ void TMainWindow::FileNew() VContainer::SetHeight(measurements.BaseHeight()); VContainer::SetSize(measurements.BaseSize()); - if (mType == MeasurementsType::Standard) + if (mType == MeasurementsType::Multisize) { m = new VMeasurements(mUnit, measurements.BaseSize(), measurements.BaseHeight(), data); m_curFileFormatVersion = VVSTConverter::MeasurementMaxVer; @@ -416,13 +416,13 @@ void TMainWindow::OpenIndividual() } //--------------------------------------------------------------------------------------------------------------------- -void TMainWindow::OpenStandard() +void TMainWindow::OpenMultisize() { const QString filter = tr("Multisize measurements") + QLatin1String(" (*.vst);;") + tr("Individual measurements") + QLatin1String(" (*.vit);;") + tr("All files") + QLatin1String(" (*.*)"); - //Use standard path to standard measurements - QString pathTo = qApp->TapeSettings()->GetPathStandardMeasurements(); - pathTo = VCommonSettings::PrepareStandardTables(pathTo); + //Use standard path to multisize measurements + QString pathTo = qApp->TapeSettings()->GetPathMultisizeMeasurements(); + pathTo = VCommonSettings::PrepareMultisizeTables(pathTo); Open(pathTo, filter); } @@ -448,7 +448,7 @@ void TMainWindow::OpenTemplate() void TMainWindow::CreateFromExisting() { const QString filter = tr("Individual measurements") + QLatin1String(" (*.vit)"); - //Use standard path to standard measurements + //Use standard path to individual measurements const QString pathTo = qApp->TapeSettings()->GetPathIndividualMeasurements(); bool usedNotExistedDir = false; @@ -531,7 +531,7 @@ void TMainWindow::changeEvent(QEvent *event) // retranslate designer form (single inheritance approach) ui->retranslateUi(this); - if (mType == MeasurementsType::Standard) + if (mType == MeasurementsType::Multisize) { ui->labelMType->setText(tr("Multisize measurements")); ui->labelBaseSizeValue->setText(QString().setNum(m->BaseSize()) + QLatin1String(" ") + @@ -715,7 +715,7 @@ bool TMainWindow::FileSave() } else { - if (mType == MeasurementsType::Standard + if (mType == MeasurementsType::Multisize && m_curFileFormatVersion < VVSTConverter::MeasurementMaxVer && not ContinueFormatRewrite(m_curFileFormatVersionStr, VVSTConverter::MeasurementMaxVerStr)) { @@ -788,7 +788,7 @@ bool TMainWindow::FileSave() } else { - if (mType == MeasurementsType::Standard) + if (mType == MeasurementsType::Multisize) { m_curFileFormatVersion = VVSTConverter::MeasurementMaxVer; m_curFileFormatVersionStr = VVSTConverter::MeasurementMaxVerStr; @@ -831,8 +831,8 @@ bool TMainWindow::FileSaveAs() } else { - dir = qApp->TapeSettings()->GetPathStandardMeasurements(); - dir = VCommonSettings::PrepareStandardTables(dir); + dir = qApp->TapeSettings()->GetPathMultisizeMeasurements(); + dir = VCommonSettings::PrepareMultisizeTables(dir); } } else @@ -958,7 +958,7 @@ void TMainWindow::AboutToShowDockMenu() menu->addSeparator(); menu->addAction(ui->actionOpenIndividual); - menu->addAction(ui->actionOpenStandard); + menu->addAction(ui->actionOpenMultisize); menu->addAction(ui->actionOpenTemplate); menu->addSeparator(); @@ -1098,7 +1098,7 @@ void TMainWindow::Remove() ui->lineEditFullName->setText(""); ui->lineEditFullName->blockSignals(false); - if (mType == MeasurementsType::Standard) + if (mType == MeasurementsType::Multisize) { ui->labelCalculatedValue->blockSignals(true); ui->doubleSpinBoxBaseValue->blockSignals(true); @@ -1481,7 +1481,7 @@ void TMainWindow::ShowNewMData(bool fresh) connect(ui->lineEditName, &QLineEdit::textEdited, this, &TMainWindow::SaveMName); ui->plainTextEditDescription->blockSignals(false); - if (mType == MeasurementsType::Standard) + if (mType == MeasurementsType::Multisize) { ui->labelCalculatedValue->blockSignals(true); ui->doubleSpinBoxBaseValue->blockSignals(true); @@ -1889,7 +1889,7 @@ void TMainWindow::SetupMenu() ui->actionNew->setShortcuts(QKeySequence::New); connect(ui->actionOpenIndividual, &QAction::triggered, this, &TMainWindow::OpenIndividual); - connect(ui->actionOpenStandard, &QAction::triggered, this, &TMainWindow::OpenStandard); + connect(ui->actionOpenMultisize, &QAction::triggered, this, &TMainWindow::OpenMultisize); connect(ui->actionOpenTemplate, &QAction::triggered, this, &TMainWindow::OpenTemplate); connect(ui->actionCreateFromExisting, &QAction::triggered, this, &TMainWindow::CreateFromExisting); @@ -1994,7 +1994,7 @@ void TMainWindow::InitWindow() ui->plainTextEditNotes->setEnabled(true); ui->toolBarGradation->setVisible(true); - if (mType == MeasurementsType::Standard) + if (mType == MeasurementsType::Multisize) { ui->labelMType->setText(tr("Multisize measurements")); ui->labelBaseSizeValue->setText(QString().setNum(m->BaseSize()) + " " + @@ -2162,7 +2162,7 @@ void TMainWindow::InitWindow() //--------------------------------------------------------------------------------------------------------------------- void TMainWindow::InitTable() { - if (mType == MeasurementsType::Standard) + if (mType == MeasurementsType::Multisize) { ui->tableWidget->setColumnHidden( ColumnFormula, true );// formula } @@ -2548,7 +2548,7 @@ void TMainWindow::MFields(bool enabled) ui->plainTextEditDescription->setEnabled(enabled); ui->lineEditFullName->setEnabled(enabled); - if (mType == MeasurementsType::Standard) + if (mType == MeasurementsType::Multisize) { ui->doubleSpinBoxBaseValue->setEnabled(enabled); ui->doubleSpinBoxInSizes->setEnabled(enabled); @@ -2593,7 +2593,7 @@ void TMainWindow::UpdateWindowTitle() else { showName = tr("untitled %1").arg(qApp->MainWindows().size()+1); - mType == MeasurementsType::Standard ? showName += QLatin1String(".vst") : showName += QLatin1String(".vit"); + mType == MeasurementsType::Multisize ? showName += QLatin1String(".vst") : showName += QLatin1String(".vit"); } showName += QLatin1String("[*]"); @@ -2846,7 +2846,7 @@ bool TMainWindow::LoadFromExistingFile(const QString &path) throw e; } - if (mType == MeasurementsType::Standard) + if (mType == MeasurementsType::Multisize) { VException e(tr("Export from multisize measurements is not supported.")); throw e; diff --git a/src/app/tape/tmainwindow.h b/src/app/tape/tmainwindow.h index 02259c59b..adbc9b0cf 100644 --- a/src/app/tape/tmainwindow.h +++ b/src/app/tape/tmainwindow.h @@ -75,7 +75,7 @@ protected: private slots: void FileNew(); void OpenIndividual(); - void OpenStandard(); + void OpenMultisize(); void OpenTemplate(); void CreateFromExisting(); void Preferences(); diff --git a/src/app/tape/tmainwindow.ui b/src/app/tape/tmainwindow.ui index 8207cdfcc..88d0ab33c 100644 --- a/src/app/tape/tmainwindow.ui +++ b/src/app/tape/tmainwindow.ui @@ -860,7 +860,7 @@ - + @@ -1126,7 +1126,7 @@ QAction::NoRole - + .. diff --git a/src/app/valentina/core/vcmdexport.cpp b/src/app/valentina/core/vcmdexport.cpp index 09363c9a4..5e0862e07 100644 --- a/src/app/valentina/core/vcmdexport.cpp +++ b/src/app/valentina/core/vcmdexport.cpp @@ -117,7 +117,7 @@ void VCommandLine::InitOptions(VCommandLineOptions &options, QMap optionsIndex.insert(LONG_OPTION_GRADATIONSIZE, index++); options.append(new QCommandLineOption(QStringList() << SINGLE_OPTION_GRADATIONSIZE << LONG_OPTION_GRADATIONSIZE, translate("VCommandLine", "Set size value a pattern file, that was opened " - "with standard measurements (export mode). Valid " + "with multisize measurements (export mode). Valid " "values: %1cm.") .arg(VMeasurement::WholeListSizes(Unit::Cm).join(", ")), translate("VCommandLine", "The size value"))); @@ -125,7 +125,7 @@ void VCommandLine::InitOptions(VCommandLineOptions &options, QMap optionsIndex.insert(LONG_OPTION_GRADATIONHEIGHT, index++); options.append(new QCommandLineOption(QStringList() << SINGLE_OPTION_GRADATIONHEIGHT << LONG_OPTION_GRADATIONHEIGHT, translate("VCommandLine", "Set height value a pattern file, that was opened " - "with standard measurements (export mode). Valid " + "with multisize measurements (export mode). Valid " "values: %1cm.") .arg(VMeasurement::WholeListHeights(Unit::Cm).join(", ")), translate("VCommandLine", "The height value"))); diff --git a/src/app/valentina/dialogs/configpages/preferencespathpage.cpp b/src/app/valentina/dialogs/configpages/preferencespathpage.cpp index a2bcbd790..9e0926409 100644 --- a/src/app/valentina/dialogs/configpages/preferencespathpage.cpp +++ b/src/app/valentina/dialogs/configpages/preferencespathpage.cpp @@ -59,7 +59,7 @@ void PreferencesPathPage::Apply() { VSettings *settings = qApp->ValentinaSettings(); settings->SetPathIndividualMeasurements(ui->pathTable->item(0, 1)->text()); - settings->SetPathStandardMeasurements(ui->pathTable->item(1, 1)->text()); + settings->SetPathMultisizeMeasurements(ui->pathTable->item(1, 1)->text()); settings->SetPathPattern(ui->pathTable->item(2, 1)->text()); settings->SetPathLayout(ui->pathTable->item(3, 1)->text()); settings->SetPathTemplate(ui->pathTable->item(4, 1)->text()); @@ -76,8 +76,8 @@ void PreferencesPathPage::DefaultPath() switch (row) { - case 1: // standard measurements - path = VCommonSettings::GetDefPathStandardMeasurements(); + case 1: // multisize measurements + path = VCommonSettings::GetDefPathMultisizeMeasurements(); break; case 2: // pattern path path = VSettings::GetDefPathPattern(); @@ -112,9 +112,9 @@ void PreferencesPathPage::EditPath() case 0: // individual measurements path = qApp->ValentinaSettings()->GetPathIndividualMeasurements(); break; - case 1: // standard measurements - path = qApp->ValentinaSettings()->GetPathStandardMeasurements(); - path = VCommonSettings::PrepareStandardTables(path); + case 1: // multisize measurements + path = qApp->ValentinaSettings()->GetPathMultisizeMeasurements(); + path = VCommonSettings::PrepareMultisizeTables(path); break; case 2: // pattern path path = qApp->ValentinaSettings()->GetPathPattern(); @@ -178,8 +178,8 @@ void PreferencesPathPage::InitTable() { ui->pathTable->setItem(1, 0, new QTableWidgetItem(tr("My Multisize Measurements"))); - QTableWidgetItem *item = new QTableWidgetItem(settings->GetPathStandardMeasurements()); - item->setToolTip(settings->GetPathStandardMeasurements()); + QTableWidgetItem *item = new QTableWidgetItem(settings->GetPathMultisizeMeasurements()); + item->setToolTip(settings->GetPathMultisizeMeasurements()); ui->pathTable->setItem(1, 1, item); } diff --git a/src/app/valentina/dialogs/dialogpatternproperties.cpp b/src/app/valentina/dialogs/dialogpatternproperties.cpp index f88206d3c..11078857d 100644 --- a/src/app/valentina/dialogs/dialogpatternproperties.cpp +++ b/src/app/valentina/dialogs/dialogpatternproperties.cpp @@ -115,7 +115,7 @@ DialogPatternProperties::DialogPatternProperties(const QString &filePath, VPatte connect(bCancel, &QPushButton::clicked, this, &DialogPatternProperties::close); ui->tabWidget->setCurrentIndex(0); - if (qApp->patternType() != MeasurementsType::Standard) + if (qApp->patternType() != MeasurementsType::Multisize) { ui->tabWidget->setTabEnabled(1, false); } diff --git a/src/app/valentina/dialogs/dialogpatternproperties.ui b/src/app/valentina/dialogs/dialogpatternproperties.ui index e28448b7e..eb98d5f2f 100644 --- a/src/app/valentina/dialogs/dialogpatternproperties.ui +++ b/src/app/valentina/dialogs/dialogpatternproperties.ui @@ -208,7 +208,7 @@ - From standard measurements + From multisize measurements true diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 54dbaded1..f5c468ce9 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -382,7 +382,7 @@ QSharedPointer MainWindow::OpenMeasurementFile(const QString &pat throw e; } - if (m->Type() == MeasurementsType::Standard) + if (m->Type() == MeasurementsType::Multisize) { VVSTConverter converter(path); m->setXMLContent(converter.Convert());// Read again after conversion @@ -401,12 +401,12 @@ QSharedPointer MainWindow::OpenMeasurementFile(const QString &pat CheckRequiredMeasurements(m.data()); - if (m->Type() == MeasurementsType::Standard) + if (m->Type() == MeasurementsType::Multisize) { if (m->MUnit() == Unit::Inch) { qCCritical(vMainWindow, "%s\n\n%s", qUtf8Printable(tr("Wrong units.")), - qUtf8Printable(tr("Application doesn't support standard table with inches."))); + qUtf8Printable(tr("Application doesn't support multisize table with inches."))); m->clear(); if (not VApplication::IsGUIMode()) { @@ -440,13 +440,13 @@ bool MainWindow::LoadMeasurements(const QString &path) return false; } - if (qApp->patternUnit() == Unit::Inch && m->Type() == MeasurementsType::Standard) + if (qApp->patternUnit() == Unit::Inch && m->Type() == MeasurementsType::Multisize) { qWarning()<Type() == MeasurementsType::Standard) + if (m->Type() == MeasurementsType::Multisize) { m->SetDataSize(); m->SetDataHeight(); @@ -492,7 +492,7 @@ bool MainWindow::UpdateMeasurements(const QString &path, int size, int height) return false; } - if (m->Type() == MeasurementsType::Standard) + if (m->Type() == MeasurementsType::Multisize) { VContainer::SetSize(size); VContainer::SetHeight(height); @@ -1536,13 +1536,13 @@ void MainWindow::LoadIndividual() } //--------------------------------------------------------------------------------------------------------------------- -void MainWindow::LoadStandard() +void MainWindow::LoadMultisize() { const QString filter = tr("Multisize measurements") + QLatin1String(" (*.vst);;") + tr("Individual measurements") + QLatin1String("(*.vit)"); - //Use standard path to standard measurements - QString path = qApp->ValentinaSettings()->GetPathStandardMeasurements(); - path = VCommonSettings::PrepareStandardTables(path); + //Use standard path to multisize measurements + QString path = qApp->ValentinaSettings()->GetPathMultisizeMeasurements(); + path = VCommonSettings::PrepareMultisizeTables(path); const QString mPath = QFileDialog::getOpenFileName(this, tr("Open file"), path, filter, nullptr, QFileDialog::DontUseNativeDialog); @@ -1575,7 +1575,7 @@ void MainWindow::LoadStandard() UpdateWindowTitle(); - if (qApp->patternType() == MeasurementsType::Standard) + if (qApp->patternType() == MeasurementsType::Multisize) { if (not hText.isEmpty() && not gradationHeights.isNull()) { @@ -1626,7 +1626,7 @@ void MainWindow::ShowMeasurements() const QString absoluteMPath = AbsoluteMPath(curFile, doc->MPath()); QStringList arguments; - if (qApp->patternType() == MeasurementsType::Standard) + if (qApp->patternType() == MeasurementsType::Multisize) { arguments = QStringList() << absoluteMPath @@ -1762,7 +1762,7 @@ void MainWindow::ToolBarOption() delete gradationSizesLabel; } - if (qApp->patternType() == MeasurementsType::Standard) + if (qApp->patternType() == MeasurementsType::Multisize) { const QStringList listHeights = VMeasurement::ListHeights(doc->GetGradationHeights(), qApp->patternUnit()); const QStringList listSizes = VMeasurement::ListSizes(doc->GetGradationSizes(), qApp->patternUnit()); @@ -2298,7 +2298,7 @@ void MainWindow::ActionDraw(bool checked) SetEnableWidgets(true); ui->toolBox->setCurrentIndex(currentToolBoxIndex); - if (qApp->patternType() == MeasurementsType::Standard) + if (qApp->patternType() == MeasurementsType::Multisize) { ui->toolBarOption->setVisible(true); } @@ -2373,7 +2373,7 @@ void MainWindow::ActionDetails(bool checked) SetEnableWidgets(true); ui->toolBox->setCurrentIndex(ui->toolBox->indexOf(ui->detailPage)); - if (qApp->patternType() == MeasurementsType::Standard) + if (qApp->patternType() == MeasurementsType::Multisize) { ui->toolBarOption->setVisible(true); } @@ -2489,7 +2489,7 @@ void MainWindow::ActionLayout(bool checked) mouseCoordinate->setText(""); - if (qApp->patternType() == MeasurementsType::Standard) + if (qApp->patternType() == MeasurementsType::Multisize) { ui->toolBarOption->setVisible(false); } @@ -2781,7 +2781,7 @@ void MainWindow::Clear() ui->actionLast_tool->setEnabled(false); ui->actionShowCurveDetails->setEnabled(false); ui->actionLoadIndividual->setEnabled(false); - ui->actionLoadStandard->setEnabled(false); + ui->actionLoadMultisize->setEnabled(false); ui->actionUnloadMeasurements->setEnabled(false); ui->actionEditCurrent->setEnabled(false); SetEnableTool(false); @@ -3028,7 +3028,7 @@ void MainWindow::SetEnableWidgets(bool enable) ui->actionZoomOriginal->setEnabled(enable); ui->actionShowCurveDetails->setEnabled(enable && drawStage); ui->actionLoadIndividual->setEnabled(enable && designStage); - ui->actionLoadStandard->setEnabled(enable && designStage); + ui->actionLoadMultisize->setEnabled(enable && designStage); ui->actionUnloadMeasurements->setEnabled(enable && designStage); actionDockWidgetToolOptions->setEnabled(enable && designStage); @@ -3994,7 +3994,7 @@ void MainWindow::CreateActions() }); connect(ui->actionLoadIndividual, &QAction::triggered, this, &MainWindow::LoadIndividual); - connect(ui->actionLoadStandard, &QAction::triggered, this, &MainWindow::LoadStandard); + connect(ui->actionLoadMultisize, &QAction::triggered, this, &MainWindow::LoadMultisize); connect(ui->actionOpenTape, &QAction::triggered, this, [this]() { @@ -4129,7 +4129,7 @@ bool MainWindow::LoadPattern(const QString &fileName, const QString& customMeasu VMeasurements m(pattern); m.setXMLContent(fileName); - if (m.Type() == MeasurementsType::Standard || m.Type() == MeasurementsType::Individual) + if (m.Type() == MeasurementsType::Multisize || m.Type() == MeasurementsType::Individual) { const QString tape = qApp->TapeFilePath(); const QString workingDirectory = QFileInfo(tape).absoluteDir().absolutePath(); @@ -4551,7 +4551,7 @@ QString MainWindow::CheckPathToMeasurements(const QString &patternPath, const QS MeasurementsType patternType; if (table.suffix() == QLatin1String("vst")) { - patternType = MeasurementsType::Standard; + patternType = MeasurementsType::Multisize; } else if (table.suffix() == QLatin1String("vit")) { @@ -4563,12 +4563,12 @@ QString MainWindow::CheckPathToMeasurements(const QString &patternPath, const QS } QString mPath; - if (patternType == MeasurementsType::Standard) + if (patternType == MeasurementsType::Multisize) { const QString filter = tr("Multisize measurements") + QLatin1String(" (*.vst)"); - //Use standard path to standard measurements - QString path = qApp->ValentinaSettings()->GetPathStandardMeasurements(); - path = VCommonSettings::PrepareStandardTables(path); + //Use standard path to multisize measurements + QString path = qApp->ValentinaSettings()->GetPathMultisizeMeasurements(); + path = VCommonSettings::PrepareMultisizeTables(path); mPath = QFileDialog::getOpenFileName(this, tr("Open file"), path, filter, nullptr, QFileDialog::DontUseNativeDialog); } @@ -4600,7 +4600,7 @@ QString MainWindow::CheckPathToMeasurements(const QString &patternPath, const QS tr("Multisize measurements") + QLatin1String(" (*.vst)"); //Use standard path to individual measurements const QString path = qApp->ValentinaSettings()->GetPathIndividualMeasurements(); - VCommonSettings::PrepareStandardTables(VCommonSettings::GetDefPathStandardMeasurements()); + VCommonSettings::PrepareMultisizeTables(VCommonSettings::GetDefPathMultisizeMeasurements()); bool usedNotExistedDir = false; QDir directory(path); @@ -4636,7 +4636,7 @@ QString MainWindow::CheckPathToMeasurements(const QString &patternPath, const QS throw e; } - if (patternType == MeasurementsType::Standard) + if (patternType == MeasurementsType::Multisize) { VVSTConverter converter(mPath); m->setXMLContent(converter.Convert());// Read again after conversion @@ -4807,7 +4807,7 @@ bool MainWindow::SetSize(const QString &text) { if (this->isWindowModified() || not curFile.isEmpty()) { - if (qApp->patternType() == MeasurementsType::Standard) + if (qApp->patternType() == MeasurementsType::Multisize) { const int size = static_cast(UnitConvertor(text.toInt(), Unit::Cm, *pattern->GetPatternUnit())); const qint32 index = gradationSizes->findText(QString().setNum(size)); @@ -4825,7 +4825,7 @@ bool MainWindow::SetSize(const QString &text) else { qCCritical(vMainWindow, "%s", - qUtf8Printable(tr("Couldn't set size. Need a file with standard measurements."))); + qUtf8Printable(tr("Couldn't set size. Need a file with multisize measurements."))); return false; } } @@ -4850,7 +4850,7 @@ bool MainWindow::SetHeight(const QString &text) { if (this->isWindowModified() || not curFile.isEmpty()) { - if (qApp->patternType() == MeasurementsType::Standard) + if (qApp->patternType() == MeasurementsType::Multisize) { const int height = static_cast(UnitConvertor(text.toInt(), Unit::Cm, *pattern->GetPatternUnit())); const qint32 index = gradationHeights->findText(QString().setNum(height)); @@ -4868,7 +4868,7 @@ bool MainWindow::SetHeight(const QString &text) else { qCCritical(vMainWindow, "%s", - qUtf8Printable(tr("Couldn't set height. Need a file with standard measurements."))); + qUtf8Printable(tr("Couldn't set height. Need a file with multisize measurements."))); return false; } } diff --git a/src/app/valentina/mainwindow.h b/src/app/valentina/mainwindow.h index 1a4562586..39e3656ed 100644 --- a/src/app/valentina/mainwindow.h +++ b/src/app/valentina/mainwindow.h @@ -180,7 +180,7 @@ private slots: void ZoomFitBestCurrent(); void LoadIndividual(); - void LoadStandard(); + void LoadMultisize(); void UnloadMeasurements(); void ShowMeasurements(); void MeasurementsChanged(const QString &path); diff --git a/src/app/valentina/mainwindow.ui b/src/app/valentina/mainwindow.ui index cda35ab90..10c90405b 100644 --- a/src/app/valentina/mainwindow.ui +++ b/src/app/valentina/mainwindow.ui @@ -55,8 +55,8 @@ 0 0 - 127 - 358 + 126 + 351 @@ -402,7 +402,7 @@ 0 0 140 - 110 + 108 @@ -511,7 +511,7 @@ 0 0 140 - 248 + 243 @@ -773,7 +773,7 @@ 0 0 140 - 248 + 243 @@ -1038,7 +1038,7 @@ 0 0 140 - 104 + 102 @@ -1121,7 +1121,7 @@ 0 0 140 - 328 + 326 @@ -1325,7 +1325,7 @@ 0 0 140 - 196 + 192 @@ -1535,7 +1535,7 @@ 0 0 140 - 328 + 326 @@ -1635,7 +1635,7 @@ 0 0 1100 - 25 + 19 @@ -1699,7 +1699,7 @@ - + @@ -2549,7 +2549,7 @@ QAction::NoRole - + false diff --git a/src/app/valentina/valentina.pro b/src/app/valentina/valentina.pro index 6847a49e1..ff3d6b8c8 100644 --- a/src/app/valentina/valentina.pro +++ b/src/app/valentina/valentina.pro @@ -115,7 +115,7 @@ message(Examples: $$[QT_INSTALL_EXAMPLES]) # Path to recource file. win32:RC_FILE = share/resources/valentina.rc -# INSTALL_STANDARD_MEASUREMENTS and INSTALL_STANDARD_TEMPLATES inside tables.pri +# INSTALL_MULTISIZE_MEASUREMENTS and INSTALL_STANDARD_TEMPLATES inside tables.pri include(../tables.pri) win32 { @@ -159,9 +159,9 @@ unix{ translations.path = /usr/share/$${TARGET}/translations/ translations.files = $$INSTALL_TRANSLATIONS - # Path to standard measurement after installation - standard.path = /usr/share/$${TARGET}/tables/standard/ - standard.files = $$INSTALL_STANDARD_MEASUREMENTS + # Path to multisize measurement after installation + multisize.path = /usr/share/$${TARGET}/tables/multisize/ + multisize.files = $$INSTALL_MULTISIZE_MEASUREMENTS # Path to templates after installation templates.path = /usr/share/$${TARGET}/tables/templates/ @@ -173,7 +173,7 @@ unix{ desktop \ pixmaps \ translations \ - standard \ + multisize \ templates } macx{ @@ -226,9 +226,9 @@ unix{ QMAKE_INFO_PLIST = $$PWD/../../../dist/macx/valentina/Info.plist - # Copy to bundle standard measurements files - standard.path = $$RESOURCES_DIR/tables/standard/ - standard.files = $$INSTALL_STANDARD_MEASUREMENTS + # Copy to bundle multisize measurements files + multisize.path = $$RESOURCES_DIR/tables/multisize/ + multisize.files = $$INSTALL_MULTISIZE_MEASUREMENTS # Copy to bundle templates files templates.path = $$RESOURCES_DIR/tables/templates/ @@ -239,13 +239,13 @@ unix{ icns_resources.files += $$PWD/../../../dist/macx/s-measurements.icns icns_resources.files += $$PWD/../../../dist/macx/pattern.icns - # Copy to bundle standard measurements files + # Copy to bundle multisize measurements files # We cannot add none exist files to bundle through QMAKE_BUNDLE_DATA. That's why we must do this manually. QMAKE_POST_LINK += $$VCOPY $$quote($${OUT_PWD}/../tape/$${DESTDIR}/tape.app/$$RESOURCES_DIR/diagrams.rcc) $$quote($$shell_path($${OUT_PWD}/$$DESTDIR/$${TARGET}.app/$$RESOURCES_DIR/)) $$escape_expand(\\n\\t) QMAKE_BUNDLE_DATA += \ templates \ - standard \ + multisize \ libraries \ tape \ xpdf \ @@ -307,8 +307,8 @@ win32:*g++* { package.CONFIG = no_check_exist INSTALLS += package - package_tables.path = $${OUT_PWD}/../../../package/valentina/tables/standard - package_tables.files += $$INSTALL_STANDARD_MEASUREMENTS + package_tables.path = $${OUT_PWD}/../../../package/valentina/tables/multisize + package_tables.files += $$INSTALL_MULTISIZE_MEASUREMENTS INSTALLS += package_tables package_templates.path = $${OUT_PWD}/../../../package/valentina/tables/templates diff --git a/src/libs/ifc/xml/vdomdocument.h b/src/libs/ifc/xml/vdomdocument.h index 372fff003..6685fdd51 100644 --- a/src/libs/ifc/xml/vdomdocument.h +++ b/src/libs/ifc/xml/vdomdocument.h @@ -68,7 +68,7 @@ QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor") * or more pattern pieces. * * An increment is an auxiliary variable that is calculated from regular measurement - * variables (that belong to the standard measurements table). Increments are used to + * variables (that belong to the multisize measurements table). Increments are used to * create a graduation schema for the sewing pattern. * * A pattern piece contains @@ -176,7 +176,7 @@ template <> inline void VDomDocument::SetAttribute(QDomElement &domElement, const QString &name, const MeasurementsType &value) const { - domElement.setAttribute(name, value == MeasurementsType::Standard ? QStringLiteral("standard") : + domElement.setAttribute(name, value == MeasurementsType::Multisize ? QStringLiteral("multisize") : QStringLiteral("individual")); } diff --git a/src/libs/vformat/vmeasurements.cpp b/src/libs/vformat/vmeasurements.cpp index bc6f9898c..7faaa6f07 100644 --- a/src/libs/vformat/vmeasurements.cpp +++ b/src/libs/vformat/vmeasurements.cpp @@ -118,11 +118,11 @@ VMeasurements::VMeasurements(Unit unit, VContainer *data) VMeasurements::VMeasurements(Unit unit, int baseSize, int baseHeight, VContainer *data) :VDomDocument(), data(data), - type(MeasurementsType::Standard) + type(MeasurementsType::Multisize) { SCASSERT(data != nullptr) - CreateEmptyStandardFile(unit, baseSize, baseHeight); + CreateEmptyMultisizeFile(unit, baseSize, baseHeight); } //--------------------------------------------------------------------------------------------------------------------- @@ -286,7 +286,7 @@ void VMeasurements::ReadMeasurements() const QSharedPointer meash; QSharedPointer tempMeash; - if (type == MeasurementsType::Standard) + if (type == MeasurementsType::Multisize) { qreal base = GetParametrDouble(dom, AttrBase, "0"); qreal ksize = GetParametrDouble(dom, AttrSizeIncrease, "0"); @@ -350,7 +350,7 @@ MeasurementsType VMeasurements::Type() const //--------------------------------------------------------------------------------------------------------------------- int VMeasurements::BaseSize() const { - if (type == MeasurementsType::Standard) + if (type == MeasurementsType::Multisize) { return static_cast(UniqueTagAttr(TagSize, AttrBase, 50)); } @@ -363,7 +363,7 @@ int VMeasurements::BaseSize() const //--------------------------------------------------------------------------------------------------------------------- int VMeasurements::BaseHeight() const { - if (type == MeasurementsType::Standard) + if (type == MeasurementsType::Multisize) { return static_cast(UniqueTagAttr(TagHeight, AttrBase, 176)); } @@ -696,7 +696,7 @@ void VMeasurements::SetDataHeight() } //--------------------------------------------------------------------------------------------------------------------- -void VMeasurements::CreateEmptyStandardFile(Unit unit, int baseSize, int baseHeight) +void VMeasurements::CreateEmptyMultisizeFile(Unit unit, int baseSize, int baseHeight) { this->clear(); QDomElement mElement = this->createElement(TagVST); @@ -819,7 +819,7 @@ QDomElement VMeasurements::MakeEmpty(const QString &name, const QString &formula SetAttribute(element, AttrName, name); - if (type == MeasurementsType::Standard) + if (type == MeasurementsType::Multisize) { SetAttribute(element, AttrBase, QString("0")); SetAttribute(element, AttrSizeIncrease, QString("0")); @@ -873,7 +873,7 @@ MeasurementsType VMeasurements::ReadType() const QDomElement root = documentElement(); if (root.tagName() == TagVST) { - return MeasurementsType::Standard; + return MeasurementsType::Multisize; } else if (root.tagName() == TagVIT) { diff --git a/src/libs/vformat/vmeasurements.h b/src/libs/vformat/vmeasurements.h index da3c57978..d621ff469 100644 --- a/src/libs/vformat/vmeasurements.h +++ b/src/libs/vformat/vmeasurements.h @@ -147,7 +147,7 @@ private: VContainer *data; MeasurementsType type; - void CreateEmptyStandardFile(Unit unit, int baseSize, int baseHeight); + void CreateEmptyMultisizeFile(Unit unit, int baseSize, int baseHeight); void CreateEmptyIndividualFile(Unit unit); qreal UniqueTagAttr(const QString &tag, const QString &attr, qreal defValue) const; diff --git a/src/libs/vmisc/def.h b/src/libs/vmisc/def.h index a2e2c13ed..29628a6e0 100644 --- a/src/libs/vmisc/def.h +++ b/src/libs/vmisc/def.h @@ -56,7 +56,7 @@ class VTranslateMeasurements; enum class NodeDetail : char { Contour, Modeling }; enum class SceneObject : char { Point, Line, Spline, Arc, ElArc, SplinePath, Detail, Unknown }; -enum class MeasurementsType : char { Standard, Individual , Unknown}; +enum class MeasurementsType : char { Multisize, Individual , Unknown}; enum class Unit : char { Mm = 0, Cm, Inch, Px, LAST_UNIT_DO_NOT_USE}; enum class Source : char { FromGui, FromFile, FromTool }; enum class NodeUsage : bool {NotInUse = false, InUse = true}; diff --git a/src/libs/vmisc/vcommonsettings.cpp b/src/libs/vmisc/vcommonsettings.cpp index 98c878413..1f3b8b168 100644 --- a/src/libs/vmisc/vcommonsettings.cpp +++ b/src/libs/vmisc/vcommonsettings.cpp @@ -46,7 +46,7 @@ #include "../vpatterndb/pmsystems.h" const QString settingPathsIndividualMeasurements = QStringLiteral("paths/individual_measurements"); -const QString settingPathsStandardMeasurements = QStringLiteral("paths/standard_measurements"); +const QString settingPathsMultisizeMeasurements = QStringLiteral("paths/standard_measurements"); const QString settingPathsTemplates = QStringLiteral("paths/templates"); const QString settingConfigurationOsSeparator = QStringLiteral("configuration/osSeparator"); @@ -227,9 +227,9 @@ QString VCommonSettings::SharePath(const QString &shareItem) } //--------------------------------------------------------------------------------------------------------------------- -QString VCommonSettings::StandardTablesPath() +QString VCommonSettings::MultisizeTablesPath() { - return SharePath(QStringLiteral("/tables/standard")); + return SharePath(QStringLiteral("/tables/multisize")); } //--------------------------------------------------------------------------------------------------------------------- @@ -245,9 +245,9 @@ QString VCommonSettings::PrepareStandardTemplates(const QString & currentPath) } //--------------------------------------------------------------------------------------------------------------------- -QString VCommonSettings::PrepareStandardTables(const QString ¤tPath) +QString VCommonSettings::PrepareMultisizeTables(const QString ¤tPath) { - return PrepareStandardFiles(currentPath, StandardTablesPath(), GetDefPathStandardMeasurements()); + return PrepareStandardFiles(currentPath, MultisizeTablesPath(), GetDefPathMultisizeMeasurements()); } //--------------------------------------------------------------------------------------------------------------------- @@ -272,23 +272,23 @@ void VCommonSettings::SetPathIndividualMeasurements(const QString &value) } //--------------------------------------------------------------------------------------------------------------------- -QString VCommonSettings::GetDefPathStandardMeasurements() +QString VCommonSettings::GetDefPathMultisizeMeasurements() { return QDir::homePath() + QLatin1String("/valentina/") + tr("measurements") + QLatin1String("/") + tr("multisize"); } //--------------------------------------------------------------------------------------------------------------------- -QString VCommonSettings::GetPathStandardMeasurements() const +QString VCommonSettings::GetPathMultisizeMeasurements() const { QSettings settings(this->format(), this->scope(), this->organizationName(), commonIniFilename); - return settings.value(settingPathsStandardMeasurements, GetDefPathStandardMeasurements()).toString(); + return settings.value(settingPathsMultisizeMeasurements, GetDefPathMultisizeMeasurements()).toString(); } //--------------------------------------------------------------------------------------------------------------------- -void VCommonSettings::SetPathStandardMeasurements(const QString &value) +void VCommonSettings::SetPathMultisizeMeasurements(const QString &value) { QSettings settings(this->format(), this->scope(), this->organizationName(), commonIniFilename); - settings.setValue(settingPathsStandardMeasurements, value); + settings.setValue(settingPathsMultisizeMeasurements, value); settings.sync(); } diff --git a/src/libs/vmisc/vcommonsettings.h b/src/libs/vmisc/vcommonsettings.h index ab57fe4ca..fa9a2cac2 100644 --- a/src/libs/vmisc/vcommonsettings.h +++ b/src/libs/vmisc/vcommonsettings.h @@ -48,19 +48,19 @@ public: QObject *parent = nullptr); static QString SharePath(const QString &shareItem); - static QString StandardTablesPath(); + static QString MultisizeTablesPath(); static QString StandardTemplatesPath(); static QString PrepareStandardTemplates(const QString ¤tPath); - static QString PrepareStandardTables(const QString ¤tPath); + static QString PrepareMultisizeTables(const QString ¤tPath); static QString GetDefPathIndividualMeasurements(); QString GetPathIndividualMeasurements() const; void SetPathIndividualMeasurements(const QString &value); - static QString GetDefPathStandardMeasurements(); - QString GetPathStandardMeasurements() const; - void SetPathStandardMeasurements(const QString &value); + static QString GetDefPathMultisizeMeasurements(); + QString GetPathMultisizeMeasurements() const; + void SetPathMultisizeMeasurements(const QString &value); static QString GetDefPathTemplate(); QString GetPathTemplate() const; diff --git a/src/libs/vpatterndb/variables/vmeasurement.cpp b/src/libs/vpatterndb/variables/vmeasurement.cpp index a90320f19..1a3de487c 100644 --- a/src/libs/vpatterndb/variables/vmeasurement.cpp +++ b/src/libs/vpatterndb/variables/vmeasurement.cpp @@ -38,7 +38,7 @@ //--------------------------------------------------------------------------------------------------------------------- /** - * @brief VMeasurement create measurement for standard table + * @brief VMeasurement create measurement for multisize table * @param name measurement's name * @param base value in base size and height * @param ksize increment in sizes @@ -100,7 +100,7 @@ QStringList VMeasurement::ListHeights(QMap heights, Unit pattern QStringList list; if (patternUnit == Unit::Inch) { - qWarning()<<"Standard table doesn't support inches."; + qWarning()<<"Multisize table doesn't support inches."; return list; } @@ -127,7 +127,7 @@ QStringList VMeasurement::ListSizes(QMap sizes, Unit patternUnit) QStringList list; if (patternUnit == Unit::Inch) { - qWarning()<<"Standard table doesn't support inches."; + qWarning()<<"Multisize table doesn't support inches."; return list; } @@ -154,7 +154,7 @@ QStringList VMeasurement::WholeListHeights(Unit patternUnit) QStringList list; if (patternUnit == Unit::Inch) { - qWarning()<<"Standard table doesn't support inches."; + qWarning()<<"Multisize table doesn't support inches."; return list; } @@ -172,7 +172,7 @@ QStringList VMeasurement::WholeListSizes(Unit patternUnit) QStringList list; if (patternUnit == Unit::Inch) { - qWarning()<<"Standard table doesn't support inches."; + qWarning()<<"Multisize table doesn't support inches."; return list; } diff --git a/src/libs/vpatterndb/variables/vmeasurement.h b/src/libs/vpatterndb/variables/vmeasurement.h index 444b8307a..fa02e29d7 100644 --- a/src/libs/vpatterndb/variables/vmeasurement.h +++ b/src/libs/vpatterndb/variables/vmeasurement.h @@ -26,8 +26,8 @@ ** *************************************************************************/ -#ifndef VSTANDARDTABLEROW_H -#define VSTANDARDTABLEROW_H +#ifndef VMULTISIZETABLEROW_H +#define VMULTISIZETABLEROW_H #include #include @@ -45,7 +45,7 @@ class VContainer; class VMeasurementData; /** - * @brief The VMeasurement class keep data row of standard table + * @brief The VMeasurement class keep data row of multisize table */ class VMeasurement :public VVariable { @@ -96,4 +96,4 @@ private: Q_DECLARE_TYPEINFO(VMeasurement, Q_MOVABLE_TYPE); -#endif // VSTANDARDTABLEROW_H +#endif // VMULTISIZETABLEROW_H diff --git a/src/libs/vpatterndb/vcontainer.cpp b/src/libs/vpatterndb/vcontainer.cpp index 6bb83bfaa..b6f9f1a4c 100644 --- a/src/libs/vpatterndb/vcontainer.cpp +++ b/src/libs/vpatterndb/vcontainer.cpp @@ -542,7 +542,7 @@ void VContainer::UpdatePiecePath(quint32 id, const VPiecePath &path) qreal VContainer::GetTableValue(const QString &name, MeasurementsType patternType) const { QSharedPointer m = GetVariable(name); - if (patternType == MeasurementsType::Standard) + if (patternType == MeasurementsType::Multisize) { m->SetValue(size(), height(), *GetPatternUnit()); } @@ -617,7 +617,7 @@ const QHash VContainer::PlainVariables() const while (i != d->variables.constEnd()) { QSharedPointer var = i.value(); - if ((qApp->patternType() == MeasurementsType::Standard) && + if ((qApp->patternType() == MeasurementsType::Multisize) && (var->GetType() == VarType::Measurement || var->GetType() == VarType::Increment)) { QSharedPointer m = GetVariable(i.key()); diff --git a/src/test/CollectionTest/CollectionTest.pro b/src/test/CollectionTest/CollectionTest.pro index 53086b52d..ea09240b0 100644 --- a/src/test/CollectionTest/CollectionTest.pro +++ b/src/test/CollectionTest/CollectionTest.pro @@ -213,7 +213,7 @@ VALENTINA_TEST_FILES += \ tst_valentina/wrong_formula.val COLLECTION_FILES += \ - $${PWD}/../../app/share/tables/standard/GOST_man_ru.vst \ + $${PWD}/../../app/share/tables/multisize/GOST_man_ru.vst \ $${PWD}/../../app/share/collection/bra.val \ $${PWD}/../../app/share/collection/bra.vit \ $${PWD}/../../app/share/collection/jacketМ1_52-176.val \ diff --git a/src/test/CollectionTest/tst_valentinacommandline.cpp b/src/test/CollectionTest/tst_valentinacommandline.cpp index fdf215370..2cbd076f3 100644 --- a/src/test/CollectionTest/tst_valentinacommandline.cpp +++ b/src/test/CollectionTest/tst_valentinacommandline.cpp @@ -125,12 +125,12 @@ void TST_ValentinaCommandLine::ExportMode_data() const << QString("-p;;0;;-d;;%1;;-b;;output").arg(tmp) << V_EX_OK; - QTest::newRow("A file with limited gradation. Standard measurements. Wrong data.") + QTest::newRow("A file with limited gradation. Multisize measurements. Wrong data.") << "glimited_vst.val" << QString("-p;;0;;-d;;%1;;--gsize;;46;;--gheight;;164;;-b;;output").arg(tmp) << V_EX_DATAERR; - QTest::newRow("A file with limited gradation. Standard measurements. Correct data.") + QTest::newRow("A file with limited gradation. Multisize measurements. Correct data.") << "glimited_vst.val" << QString("-p;;0;;-d;;%1;;--gsize;;40;;--gheight;;134;;-b;;output").arg(tmp) << V_EX_OK; @@ -190,12 +190,12 @@ void TST_ValentinaCommandLine::TestMode_data() const QLatin1String("issue_256_wrong.vit")) << V_EX_NOINPUT; - QTest::newRow("Issue #256. Correct standard measurements.")<< "issue_256.val" + QTest::newRow("Issue #256. Correct multisize measurements.")<< "issue_256.val" << QString("--test;;-m;;%1").arg(tmp + QDir::separator() + QLatin1String("issue_256_correct.vst")) << V_EX_OK; - QTest::newRow("Issue #256. Wrong standard measurements.")<< "issue_256.val" + QTest::newRow("Issue #256. Wrong multisize measurements.")<< "issue_256.val" << QString("--test;;-m;;%1").arg(tmp + QDir::separator() + QLatin1String("issue_256_wrong.vst")) << V_EX_NOINPUT; diff --git a/src/test/ValentinaTest/tst_vmeasurements.cpp b/src/test/ValentinaTest/tst_vmeasurements.cpp index 8a0755e14..470842c2a 100644 --- a/src/test/ValentinaTest/tst_vmeasurements.cpp +++ b/src/test/ValentinaTest/tst_vmeasurements.cpp @@ -42,9 +42,9 @@ TST_VMeasurements::TST_VMeasurements(QObject *parent) : //--------------------------------------------------------------------------------------------------------------------- /** - * @brief CreateEmptyStandardFile check if empty standard measurement file is valid. + * @brief CreateEmptyMultisizeFile check if empty multisize measurement file is valid. */ -void TST_VMeasurements::CreateEmptyStandardFile() +void TST_VMeasurements::CreateEmptyMultisizeFile() { Unit mUnit = Unit::Cm; const int height = 176; @@ -129,10 +129,10 @@ void TST_VMeasurements::CreateEmptyIndividualFile() //--------------------------------------------------------------------------------------------------------------------- /** - * @brief ValidPMCodesStandardFile helps to check that all current pattern making systems match pattern inside XSD + * @brief ValidPMCodesMultisizeFile helps to check that all current pattern making systems match pattern inside XSD * scheme. */ -void TST_VMeasurements::ValidPMCodesStandardFile() +void TST_VMeasurements::ValidPMCodesMultisizeFile() { Unit mUnit = Unit::Cm; const int height = 176; diff --git a/src/test/ValentinaTest/tst_vmeasurements.h b/src/test/ValentinaTest/tst_vmeasurements.h index a12432d70..7a41c5538 100644 --- a/src/test/ValentinaTest/tst_vmeasurements.h +++ b/src/test/ValentinaTest/tst_vmeasurements.h @@ -38,10 +38,10 @@ public: explicit TST_VMeasurements(QObject *parent = nullptr); private slots: - void CreateEmptyStandardFile(); + void CreateEmptyMultisizeFile(); void CreateEmptyIndividualFile(); - void ValidPMCodesStandardFile(); + void ValidPMCodesMultisizeFile(); void ValidPMCodesIndividualFile(); };