From bfd2620fad6250cb5c688899f2e2fb1fac4cf075 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 1 Jun 2017 13:04:25 +0300 Subject: [PATCH] Next try to fix problem with tests. Because different compilers and even different version from same vendor may produce little bit different result this cause of test fails because it expect too accurate result. We don't need such accuracy and can use variable VGObject::accuracyPointOnLine to compare two points. --HG-- branch : develop --- .../tapepreferencesconfigurationpage.cpp | 1 + src/app/tape/dialogs/dialogmdatabase.cpp | 1 + src/app/tape/tmainwindow.cpp | 1 + .../preferencesconfigurationpage.cpp | 1 + src/libs/libs.pri | 3 + src/libs/libs.pro | 3 +- src/libs/vformat/vmeasurements.cpp | 2 + src/libs/vmisc/def.cpp | 1288 ----------------- src/libs/vmisc/def.h | 346 ----- src/libs/vmisc/vcommonsettings.cpp | 3 +- src/libs/vmisc/vmisc.pri | 2 - src/libs/vmisc/vmisc.pro | 12 +- src/libs/vpatterndb/measurements.cpp | 1171 +++++++++++++++ src/libs/vpatterndb/measurements.h | 321 ++++ src/libs/vpatterndb/pmsystems.cpp | 180 +++ src/libs/vpatterndb/pmsystems.h | 97 ++ src/libs/vpatterndb/vpatterndb.pri | 8 +- .../vpatterndb/vtranslatemeasurements.cpp | 2 +- src/libs/vpatterndb/vtranslatevars.cpp | 1 + src/libs/{vmisc => vtest}/abstracttest.cpp | 9 +- src/libs/{vmisc => vtest}/abstracttest.h | 0 src/libs/vtest/stable.cpp | 30 + src/libs/vtest/stable.h | 50 + src/libs/vtest/vtest.cpp | 34 + src/libs/vtest/vtest.h | 40 + src/libs/vtest/vtest.pri | 11 + src/libs/vtest/vtest.pro | 92 ++ src/libs/vtest/warnings.pri | 83 ++ src/test/CollectionTest/CollectionTest.pro | 129 +- .../CollectionTest/tst_tapecommandline.cpp | 2 +- src/test/CollectionTest/tst_tapecommandline.h | 2 +- .../tst_valentinacommandline.cpp | 2 +- .../CollectionTest/tst_valentinacommandline.h | 2 +- .../TranslationsTest/TranslationsTest.pro | 19 +- .../TranslationsTest/tst_abstractregexp.h | 2 +- .../tst_measurementregexp.cpp | 1 + .../TranslationsTest/tst_qmuparsererrormsg.h | 2 +- src/test/ValentinaTest/ValentinaTest.pro | 9 + src/test/ValentinaTest/tst_nameregexp.cpp | 2 +- src/test/ValentinaTest/tst_vabstractcurve.h | 2 +- src/test/ValentinaTest/tst_vabstractpiece.h | 2 +- src/test/ValentinaTest/tst_vlayoutdetail.h | 2 +- src/test/ValentinaTest/tst_vmeasurements.cpp | 1 + src/test/ValentinaTest/tst_vpiece.h | 2 +- src/test/ValentinaTest/tst_vspline.h | 2 +- 45 files changed, 2251 insertions(+), 1724 deletions(-) create mode 100644 src/libs/vpatterndb/measurements.cpp create mode 100644 src/libs/vpatterndb/measurements.h create mode 100644 src/libs/vpatterndb/pmsystems.cpp create mode 100644 src/libs/vpatterndb/pmsystems.h rename src/libs/{vmisc => vtest}/abstracttest.cpp (96%) rename src/libs/{vmisc => vtest}/abstracttest.h (100%) create mode 100644 src/libs/vtest/stable.cpp create mode 100644 src/libs/vtest/stable.h create mode 100644 src/libs/vtest/vtest.cpp create mode 100644 src/libs/vtest/vtest.h create mode 100644 src/libs/vtest/vtest.pri create mode 100644 src/libs/vtest/vtest.pro create mode 100644 src/libs/vtest/warnings.pri diff --git a/src/app/tape/dialogs/configpages/tapepreferencesconfigurationpage.cpp b/src/app/tape/dialogs/configpages/tapepreferencesconfigurationpage.cpp index 795060e5b..cdc0179ee 100644 --- a/src/app/tape/dialogs/configpages/tapepreferencesconfigurationpage.cpp +++ b/src/app/tape/dialogs/configpages/tapepreferencesconfigurationpage.cpp @@ -31,6 +31,7 @@ #include "../../mapplication.h" #include "../vmisc/vtapesettings.h" #include "../vpatterndb/variables/vmeasurement.h" +#include "../vpatterndb/pmsystems.h" //--------------------------------------------------------------------------------------------------------------------- TapePreferencesConfigurationPage::TapePreferencesConfigurationPage(QWidget *parent) diff --git a/src/app/tape/dialogs/dialogmdatabase.cpp b/src/app/tape/dialogs/dialogmdatabase.cpp index 794e58bc6..aa1c68539 100644 --- a/src/app/tape/dialogs/dialogmdatabase.cpp +++ b/src/app/tape/dialogs/dialogmdatabase.cpp @@ -29,6 +29,7 @@ #include "dialogmdatabase.h" #include "ui_dialogmdatabase.h" #include "../mapplication.h" +#include "../vpatterndb/measurements.h" #include #include diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index fb55df1e4..231316005 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -34,6 +34,7 @@ #include "dialogs/dialogtapepreferences.h" #include "dialogs/dialogexporttocsv.h" #include "../vpatterndb/calculator.h" +#include "../vpatterndb/pmsystems.h" #include "../ifc/ifcdef.h" #include "../ifc/xml/vvitconverter.h" #include "../ifc/xml/vvstconverter.h" diff --git a/src/app/valentina/dialogs/configpages/preferencesconfigurationpage.cpp b/src/app/valentina/dialogs/configpages/preferencesconfigurationpage.cpp index d247a300e..015d3a0c4 100644 --- a/src/app/valentina/dialogs/configpages/preferencesconfigurationpage.cpp +++ b/src/app/valentina/dialogs/configpages/preferencesconfigurationpage.cpp @@ -29,6 +29,7 @@ #include "preferencesconfigurationpage.h" #include "ui_preferencesconfigurationpage.h" #include "../../core/vapplication.h" +#include "../vpatterndb/pmsystems.h" #include #include diff --git a/src/libs/libs.pri b/src/libs/libs.pri index f16e4c31b..322920d57 100644 --- a/src/libs/libs.pri +++ b/src/libs/libs.pri @@ -30,3 +30,6 @@ INCLUDEPATH += $${PWD}/qmuparser #VPropertyExplorer library INCLUDEPATH += $${PWD}/vpropertyexplorer + +#VTools static library +INCLUDEPATH += $${PWD}/vtest diff --git a/src/libs/libs.pro b/src/libs/libs.pro index 334d77b84..84cbd2f09 100644 --- a/src/libs/libs.pro +++ b/src/libs/libs.pro @@ -12,4 +12,5 @@ SUBDIRS = \ vwidgets \ vtools \ vformat \ - fervor + fervor \ + vtest diff --git a/src/libs/vformat/vmeasurements.cpp b/src/libs/vformat/vmeasurements.cpp index 0a0003cf6..78fb8bf4c 100644 --- a/src/libs/vformat/vmeasurements.cpp +++ b/src/libs/vformat/vmeasurements.cpp @@ -52,6 +52,8 @@ #include "../vpatterndb/calculator.h" #include "../vpatterndb/variables/vmeasurement.h" #include "../vpatterndb/vcontainer.h" +#include "../vpatterndb/measurements.h" +#include "../vpatterndb/pmsystems.h" #include "../vmisc/projectversion.h" const QString VMeasurements::TagVST = QStringLiteral("vst"); diff --git a/src/libs/vmisc/def.cpp b/src/libs/vmisc/def.cpp index 18d3725c0..3e8e424e9 100644 --- a/src/libs/vmisc/def.cpp +++ b/src/libs/vmisc/def.cpp @@ -52,335 +52,8 @@ #include #include -#include "../vpatterndb/vtranslatevars.h" #include "vabstractapplication.h" -// Keep synchronize all names with initialization in VTranslateVars class!!!!! -//measurements -// A -const QString height_M = QStringLiteral("height"); // A01 -const QString heightNeckBack_M = QStringLiteral("height_neck_back"); // A02 -const QString heightScapula_M = QStringLiteral("height_scapula"); // A03 -const QString heightArmpit_M = QStringLiteral("height_armpit"); // A04 -const QString heightWaistSide_M = QStringLiteral("height_waist_side"); // A05 -const QString heightHip_M = QStringLiteral("height_hip"); // A06 -const QString heightGlutealFold_M = QStringLiteral("height_gluteal_fold"); // A07 -const QString heightKnee_M = QStringLiteral("height_knee"); // A08 -const QString heightCalf_M = QStringLiteral("height_calf"); // A09 -const QString heightAnkleHigh_M = QStringLiteral("height_ankle_high"); // A10 -const QString heightAnkle_M = QStringLiteral("height_ankle"); // A11 -const QString heightHighhip_M = QStringLiteral("height_highhip"); // A12 -const QString heightWaistFront_M = QStringLiteral("height_waist_front"); // A13 -const QString heightBustpoint_M = QStringLiteral("height_bustpoint"); // A14 -const QString heightShoulderTip_M = QStringLiteral("height_shoulder_tip"); // A15 -const QString heightNeckFront_M = QStringLiteral("height_neck_front"); // A16 -const QString heightNeckSide_M = QStringLiteral("height_neck_side"); // A17 -const QString heightNeckBackToKnee_M = QStringLiteral("height_neck_back_to_knee"); // A18 -const QString heightWaistSideToKnee_M = QStringLiteral("height_waist_side_to_knee"); // A19 -const QString heightWaistSideToHip_M = QStringLiteral("height_waist_side_to_hip"); // A20 -const QString heightKneeToAnkle_M = QStringLiteral("height_knee_to_ankle"); // A21 -const QString heightNeckBackToWaistSide_M = QStringLiteral("height_neck_back_to_waist_side"); // A22 -const QString heightWaistBack_M = QStringLiteral("height_waist_back"); // A23 -// B -const QString widthShoulder_M = QStringLiteral("width_shoulder"); // B01 -const QString widthBust_M = QStringLiteral("width_bust"); // B02 -const QString widthWaist_M = QStringLiteral("width_waist"); // B03 -const QString widthHip_M = QStringLiteral("width_hip"); // B04 -const QString widthAbdomenToHip_M = QStringLiteral("width_abdomen_to_hip"); // B05 -// C -const QString indentNeckBack_M = QStringLiteral("indent_neck_back"); // C01 -const QString indentWaistBack_M = QStringLiteral("indent_waist_back"); // C02 -const QString indentAnkleHigh_M = QStringLiteral("indent_ankle_high"); // C03 -// D -const QString handPalmLength_M = QStringLiteral("hand_palm_length"); // D01 -const QString handLength_M = QStringLiteral("hand_length"); // D02 -const QString handPalmWidth_M = QStringLiteral("hand_palm_width"); // D03 -const QString handPalmCirc_M = QStringLiteral("hand_palm_circ"); // D04 -const QString handCirc_M = QStringLiteral("hand_circ"); // D05 -// E -const QString footWidth_M = QStringLiteral("foot_width"); // E01 -const QString footLength_M = QStringLiteral("foot_length"); // E02 -const QString footCirc_M = QStringLiteral("foot_circ"); // E03 -const QString footInstepCirc_M = QStringLiteral("foot_instep_circ"); // E04 -// F -const QString headCirc_M = QStringLiteral("head_circ"); // F01 -const QString headLength_M = QStringLiteral("head_length"); // F02 -const QString headDepth_M = QStringLiteral("head_depth"); // F03 -const QString headWidth_M = QStringLiteral("head_width"); // F04 -const QString headCrownToNeckBack_M = QStringLiteral("head_crown_to_neck_back"); // F05 -const QString headChinToNeckBack_M = QStringLiteral("head_chin_to_neck_back"); // F06 -// G -const QString neckMidCirc_M = QStringLiteral("neck_mid_circ"); // G01 -const QString neckCirc_M = QStringLiteral("neck_circ"); // G02 -const QString highbustCirc_M = QStringLiteral("highbust_circ"); // G03 -const QString bustCirc_M = QStringLiteral("bust_circ"); // G04 -const QString lowbustCirc_M = QStringLiteral("lowbust_circ"); // G05 -const QString ribCirc_M = QStringLiteral("rib_circ"); // G06 -const QString waistCirc_M = QStringLiteral("waist_circ"); // G07 -const QString highhipCirc_M = QStringLiteral("highhip_circ"); // G08 -const QString hipCirc_M = QStringLiteral("hip_circ"); // G09 -const QString neckArcF_M = QStringLiteral("neck_arc_f"); // G10 -const QString highbustArcF_M = QStringLiteral("highbust_arc_f"); // G11 -const QString bustArcF_M = QStringLiteral("bust_arc_f"); // G12 -const QString lowbustArcF_M = QStringLiteral("lowbust_arc_f"); // G13 -const QString ribArcF_M = QStringLiteral("rib_arc_f"); // G14 -const QString waistArcF_M = QStringLiteral("waist_arc_f"); // G15 -const QString highhipArcF_M = QStringLiteral("highhip_arc_f"); // G16 -const QString hipArcF_M = QStringLiteral("hip_arc_f"); // G17 -const QString neckArcHalfF_M = QStringLiteral("neck_arc_half_f"); // G18 -const QString highbustArcHalfF_M = QStringLiteral("highbust_arc_half_f"); // G19 -const QString bustArcHalfF_M = QStringLiteral("bust_arc_half_f"); // G20 -const QString lowbustArcHalfF_M = QStringLiteral("lowbust_arc_half_f"); // G21 -const QString ribArcHalfF_M = QStringLiteral("rib_arc_half_f"); // G22 -const QString waistArcHalfF_M = QStringLiteral("waist_arc_half_f"); // G23 -const QString highhipArcHalfF_M = QStringLiteral("highhip_arc_half_f"); // G24 -const QString hipArcHalfF_M = QStringLiteral("hip_arc_half_f"); // G25 -const QString neckArcB_M = QStringLiteral("neck_arc_b"); // G26 -const QString highbustArcB_M = QStringLiteral("highbust_arc_b"); // G27 -const QString bustArcB_M = QStringLiteral("bust_arc_b"); // G28 -const QString lowbustArcB_M = QStringLiteral("lowbust_arc_b"); // G29 -const QString ribArcB_M = QStringLiteral("rib_arc_b"); // G30 -const QString waistArcB_M = QStringLiteral("waist_arc_b"); // G31 -const QString highhipArcB_M = QStringLiteral("highhip_arc_b"); // G32 -const QString hipArcB_M = QStringLiteral("hip_arc_b"); // G33 -const QString neckArcHalfB_M = QStringLiteral("neck_arc_half_b"); // G34 -const QString highbustArcHalfB_M = QStringLiteral("highbust_arc_half_b"); // G35 -const QString bustArcHalfB_M = QStringLiteral("bust_arc_half_b"); // G36 -const QString lowbustArcHalfB_M = QStringLiteral("lowbust_arc_half_b"); // G37 -const QString ribArcHalfB_M = QStringLiteral("rib_arc_half_b"); // G38 -const QString waistArcHalfB_M = QStringLiteral("waist_arc_half_b"); // G39 -const QString highhipArcHalfB_M = QStringLiteral("highhip_arc_half_b"); // G40 -const QString hipArcHalfB_M = QStringLiteral("hip_arc_half_b"); // G41 -const QString hipWithAbdomenArcF_M = QStringLiteral("hip_with_abdomen_arc_f"); // G42 -const QString bodyArmfoldCirc_M = QStringLiteral("body_armfold_circ"); // G43 -const QString bodyBustCirc_M = QStringLiteral("body_bust_circ"); // G44 -const QString bodyTorsoCirc_M = QStringLiteral("body_torso_circ"); // G45 -const QString hipCircWithAbdomen_M = QStringLiteral("hip_circ_with_abdomen"); // G46 -// H -const QString neckFrontToWaistF_M = QStringLiteral("neck_front_to_waist_f"); // H01 -const QString neckFrontToWaistFlatF_M = QStringLiteral("neck_front_to_waist_flat_f"); // H02 -const QString armpitToWaistSide_M = QStringLiteral("armpit_to_waist_side"); // H03 -const QString shoulderTipToWaistSideF_M = QStringLiteral("shoulder_tip_to_waist_side_f"); // H04 -const QString neckSideToWaistF_M = QStringLiteral("neck_side_to_waist_f"); // H05 -const QString neckSideToWaistBustpointF_M = QStringLiteral("neck_side_to_waist_bustpoint_f"); // H06 -const QString neckFrontToHighbustF_M = QStringLiteral("neck_front_to_highbust_f"); // H07 -const QString highbustToWaistF_M = QStringLiteral("highbust_to_waist_f"); // H08 -const QString neckFrontToBustF_M = QStringLiteral("neck_front_to_bust_f"); // H09 -const QString bustToWaistF_M = QStringLiteral("bust_to_waist_f"); // H10 -const QString lowbustToWaistF_M = QStringLiteral("lowbust_to_waist_f"); // H11 -const QString ribToWaistSide_M = QStringLiteral("rib_to_waist_side"); // H12 -const QString shoulderTipToArmfoldF_M = QStringLiteral("shoulder_tip_to_armfold_f"); // H13 -const QString neckSideToBustF_M = QStringLiteral("neck_side_to_bust_f"); // H14 -const QString neckSideToHighbustF_M = QStringLiteral("neck_side_to_highbust_f"); // H15 -const QString shoulderCenterToHighbustF_M = QStringLiteral("shoulder_center_to_highbust_f"); // H16 -const QString shoulderTipToWaistSideB_M = QStringLiteral("shoulder_tip_to_waist_side_b"); // H17 -const QString neckSideToWaistB_M = QStringLiteral("neck_side_to_waist_b"); // H18 -const QString neckBackToWaistB_M = QStringLiteral("neck_back_to_waist_b"); // H19 -const QString neckSideToWaistScapulaB_M = QStringLiteral("neck_side_to_waist_scapula_b"); // H20 -const QString neckBackToHighbustB_M = QStringLiteral("neck_back_to_highbust_b"); // H21 -const QString highbustToWaistB_M = QStringLiteral("highbust_to_waist_b"); // H22 -const QString neckBackToBustB_M = QStringLiteral("neck_back_to_bust_b"); // H23 -const QString bustToWaistB_M = QStringLiteral("bust_to_waist_b"); // H24 -const QString lowbustToWaistB_M = QStringLiteral("lowbust_to_waist_b"); // H25 -const QString shoulderTipToArmfoldB_M = QStringLiteral("shoulder_tip_to_armfold_b"); // H26 -const QString neckSideToBustB_M = QStringLiteral("neck_side_to_bust_b"); // H27 -const QString neckSideToHighbustB_M = QStringLiteral("neck_side_to_highbust_b"); // H28 -const QString shoulderCenterToHighbustB_M = QStringLiteral("shoulder_center_to_highbust_b"); // H29 -const QString waistToHighhipF_M = QStringLiteral("waist_to_highhip_f"); // H30 -const QString waistToHipF_M = QStringLiteral("waist_to_hip_f"); // H31 -const QString waistToHighhipSide_M = QStringLiteral("waist_to_highhip_side"); // H32 -const QString waistToHighhipB_M = QStringLiteral("waist_to_highhip_b"); // H33 -const QString waistToHipB_M = QStringLiteral("waist_to_hip_b"); // H34 -const QString waistToHipSide_M = QStringLiteral("waist_to_hip_side"); // H35 -const QString shoulderSlopeNeckSideAngle_M = QStringLiteral("shoulder_slope_neck_side_angle"); // H36 -const QString shoulderSlopeNeckSideLength_M = QStringLiteral("shoulder_slope_neck_side_length"); // H37 -const QString shoulderSlopeNeckBackAngle_M = QStringLiteral("shoulder_slope_neck_back_angle"); // H38 -const QString shoulderSlopeNeckBackHeight_M = QStringLiteral("shoulder_slope_neck_back_height"); // H39 -const QString shoulderSlopeShoulderTipAngle_M = QStringLiteral("shoulder_slope_shoulder_tip_angle"); // H40 -const QString neckBackToAcrossBack_M = QStringLiteral("neck_back_to_across_back"); // H41 -const QString acrossBackToWaistB_M = QStringLiteral("across_back_to_waist_b"); // H42 -// I -const QString shoulderLength_M = QStringLiteral("shoulder_length"); // I01 -const QString shoulderTipToShoulderTipF_M = QStringLiteral("shoulder_tip_to_shoulder_tip_f"); // I02 -const QString acrossChestF_M = QStringLiteral("across_chest_f"); // I03 -const QString armfoldToArmfoldF_M = QStringLiteral("armfold_to_armfold_f"); // I04 -const QString shoulderTipToShoulderTipHalfF_M = QStringLiteral("shoulder_tip_to_shoulder_tip_half_f"); // I05 -const QString acrossChestHalfF_M = QStringLiteral("across_chest_half_f"); // I06 -const QString shoulderTipToShoulderTipB_M = QStringLiteral("shoulder_tip_to_shoulder_tip_b"); // I07 -const QString acrossBackB_M = QStringLiteral("across_back_b"); // I08 -const QString armfoldToArmfoldB_M = QStringLiteral("armfold_to_armfold_b"); // I09 -const QString shoulderTipToShoulderTipHalfB_M = QStringLiteral("shoulder_tip_to_shoulder_tip_half_b"); // I10 -const QString acrossBackHalfB_M = QStringLiteral("across_back_half_b"); // I11 -const QString neckFrontToShoulderTipF_M = QStringLiteral("neck_front_to_shoulder_tip_f"); // I12 -const QString neckBackToShoulderTipB_M = QStringLiteral("neck_back_to_shoulder_tip_b"); // I13 -const QString neckWidth_M = QStringLiteral("neck_width"); // I14 -// J -const QString bustpointToBustpoint_M = QStringLiteral("bustpoint_to_bustpoint"); // J01 -const QString bustpointToNeckSide_M = QStringLiteral("bustpoint_to_neck_side"); // J02 -const QString bustpointToLowbust_M = QStringLiteral("bustpoint_to_lowbust"); // J03 -const QString bustpointToWaist_M = QStringLiteral("bustpoint_to_waist"); // J04 -const QString bustpointToBustpointHalf_M = QStringLiteral("bustpoint_to_bustpoint_half"); // J05 -const QString bustpointNeckSideToWaist_M = QStringLiteral("bustpoint_neck_side_to_waist"); // J06 -const QString bustpointToShoulderTip_M = QStringLiteral("bustpoint_to_shoulder_tip"); // J07 -const QString bustpointToWaistFront_M = QStringLiteral("bustpoint_to_waist_front"); // J08 -const QString bustpointToBustpointHalter_M = QStringLiteral("bustpoint_to_bustpoint_halter"); // J09 -const QString bustpointToShoulderCenter_M = QStringLiteral("bustpoint_to_shoulder_center"); // J10 -// K -const QString shoulderTipToWaistFront_M = QStringLiteral("shoulder_tip_to_waist_front"); // K01 -const QString neckFrontToWaistSide_M = QStringLiteral("neck_front_to_waist_side"); // K02 -const QString neckSideToWaistSideF_M = QStringLiteral("neck_side_to_waist_side_f"); // K03 -const QString shoulderTipToWaistBack_M = QStringLiteral("shoulder_tip_to_waist_back"); // K04 -const QString shoulderTipToWaistB_1inOffset_M = QStringLiteral("shoulder_tip_to_waist_b_1in_offset"); // K05 -const QString neckBackToWaistSide_M = QStringLiteral("neck_back_to_waist_side"); // K06 -const QString neckSideToWaistSideB_M = QStringLiteral("neck_side_to_waist_side_b"); // K07 -const QString neckSideToArmfoldF_M = QStringLiteral("neck_side_to_armfold_f"); // K08 -const QString neckSideToArmpitF_M = QStringLiteral("neck_side_to_armpit_f"); // K09 -const QString neckSideToBustSideF_M = QStringLiteral("neck_side_to_bust_side_f"); // K10 -const QString neckSideToArmfoldB_M = QStringLiteral("neck_side_to_armfold_b"); // K11 -const QString neckSideToArmpitB_M = QStringLiteral("neck_side_to_armpit_b"); // K12 -const QString neckSideToBustSideB_M = QStringLiteral("neck_side_to_bust_side_b"); // K13 -// L -const QString armShoulderTipToWristBent_M = QStringLiteral("arm_shoulder_tip_to_wrist_bent"); // L01 -const QString armShoulderTipToElbowBent_M = QStringLiteral("arm_shoulder_tip_to_elbow_bent"); // L02 -const QString armElbowToWristBent_M = QStringLiteral("arm_elbow_to_wrist_bent"); // L03 -const QString armElbowCircBent_M = QStringLiteral("arm_elbow_circ_bent"); // L04 -const QString armShoulderTipToWrist_M = QStringLiteral("arm_shoulder_tip_to_wrist"); // L05 -const QString armShoulderTipToElbow_M = QStringLiteral("arm_shoulder_tip_to_elbow"); // L06 -const QString armElbowToWrist_M = QStringLiteral("arm_elbow_to_wrist"); // L07 -const QString armArmpitToWrist_M = QStringLiteral("arm_armpit_to_wrist"); // L08 -const QString armArmpitToElbow_M = QStringLiteral("arm_armpit_to_elbow"); // L09 -const QString armElbowToWristInside_M = QStringLiteral("arm_elbow_to_wrist_inside"); // L10 -const QString armUpperCirc_M = QStringLiteral("arm_upper_circ"); // L11 -const QString armAboveElbowCirc_M = QStringLiteral("arm_above_elbow_circ"); // L12 -const QString armElbowCirc_M = QStringLiteral("arm_elbow_circ"); // L13 -const QString armLowerCirc_M = QStringLiteral("arm_lower_circ"); // L14 -const QString armWristCirc_M = QStringLiteral("arm_wrist_circ"); // L15 -const QString armShoulderTipToArmfoldLine_M = QStringLiteral("arm_shoulder_tip_to_armfold_line"); // L16 -const QString armNeckSideToWrist_M = QStringLiteral("arm_neck_side_to_wrist"); // L17 -const QString armNeckSideToFingerTip_M = QStringLiteral("arm_neck_side_to_finger_tip"); // L18 -const QString armscyeCirc_M = QStringLiteral("armscye_circ"); // L19 -const QString armscyeLength_M = QStringLiteral("armscye_length"); // L20 -const QString armscyeWidth_M = QStringLiteral("armscye_width"); // L21 -const QString armNeckSideToOuterElbow_M = QStringLiteral("arm_neck_side_to_outer_elbow"); // L22 -// M -const QString legCrotchToFloor_M = QStringLiteral("leg_crotch_to_floor"); // M01 -const QString legWaistSideToFloor_M = QStringLiteral("leg_waist_side_to_floor"); // M02 -const QString legThighUpperCirc_M = QStringLiteral("leg_thigh_upper_circ"); // M03 -const QString legThighMidCirc_M = QStringLiteral("leg_thigh_mid_circ"); // M04 -const QString legKneeCirc_M = QStringLiteral("leg_knee_circ"); // M05 -const QString legKneeSmallCirc_M = QStringLiteral("leg_knee_small_circ"); // M06 -const QString legCalfCirc_M = QStringLiteral("leg_calf_circ"); // M07 -const QString legAnkleHighCirc_M = QStringLiteral("leg_ankle_high_circ"); // M08 -const QString legAnkleCirc_M = QStringLiteral("leg_ankle_circ"); // M09 -const QString legKneeCircBent_M = QStringLiteral("leg_knee_circ_bent"); // M10 -const QString legAnkleDiagCirc_M = QStringLiteral("leg_ankle_diag_circ"); // M11 -const QString legCrotchToAnkle_M = QStringLiteral("leg_crotch_to_ankle"); // M12 -const QString legWaistSideToAnkle_M = QStringLiteral("leg_waist_side_to_ankle"); // M13 -const QString legWaistSideToKnee_M = QStringLiteral("leg_waist_side_to_knee"); // M14 -// N -const QString crotchLength_M = QStringLiteral("crotch_length"); // N01 -const QString crotchLengthB_M = QStringLiteral("crotch_length_b"); // N02 -const QString crotchLengthF_M = QStringLiteral("crotch_length_f"); // N03 -const QString riseLengthSideSitting_M = QStringLiteral("rise_length_side_sitting"); // N04 -const QString riseLengthDiag_M = QStringLiteral("rise_length_diag"); // N05 -const QString riseLengthB_M = QStringLiteral("rise_length_b"); // N06 -const QString riseLengthF_M = QStringLiteral("rise_length_f"); // N07 -const QString riseLengthSide_M = QStringLiteral("rise_length_side"); // N08 -// O -const QString neckBackToWaistFront_M = QStringLiteral("neck_back_to_waist_front"); // O01 -const QString waistToWaistHalter_M = QStringLiteral("waist_to_waist_halter"); // O02 -const QString waistNaturalCirc_M = QStringLiteral("waist_natural_circ"); // O03 -const QString waistNaturalArcF_M = QStringLiteral("waist_natural_arc_f"); // O04 -const QString waistNaturalArcB_M = QStringLiteral("waist_natural_arc_b"); // O05 -const QString waistToNaturalWaistF_M = QStringLiteral("waist_to_natural_waist_f"); // O06 -const QString waistToNaturalWaistB_M = QStringLiteral("waist_to_natural_waist_b"); // O07 -const QString armNeckBackToElbowBent_M = QStringLiteral("arm_neck_back_to_elbow_bent"); // O08 -const QString armNeckBackToWristBent_M = QStringLiteral("arm_neck_back_to_wrist_bent"); // O09 -const QString armNeckSideToElbowBent_M = QStringLiteral("arm_neck_side_to_elbow_bent"); // O10 -const QString armNeckSideToWristBent_M = QStringLiteral("arm_neck_side_to_wrist_bent"); // O11 -const QString armAcrossBackCenterToElbowBent_M = QStringLiteral("arm_across_back_center_to_elbow_bent"); // O12 -const QString armAcrossBackCenterToWristBent_M = QStringLiteral("arm_across_back_center_to_wrist_bent"); // O13 -const QString armArmscyeBackCenterToWristBent_M = QStringLiteral("arm_armscye_back_center_to_wrist_bent"); // O14 -// P -const QString neckBackToBustFront_M = QStringLiteral("neck_back_to_bust_front"); // P01 -const QString neckBackToArmfoldFront_M = QStringLiteral("neck_back_to_armfold_front"); // P02 -const QString neckBackToArmfoldFrontToWaistSide_M = QStringLiteral("neck_back_to_armfold_front_to_waist_side"); // P03 -const QString highbustBackOverShoulderToArmfoldFront_M - = QStringLiteral("highbust_back_over_shoulder_to_armfold_front"); // P04 -const QString highbustBackOverShoulderToWaistFront_M - = QStringLiteral("highbust_back_over_shoulder_to_waist_front"); // P05 -const QString neckBackToArmfoldFrontToNeckBack_M = QStringLiteral("neck_back_to_armfold_front_to_neck_back"); // P06 -const QString acrossBackCenterToArmfoldFrontToAcrossBackCenter_M - = QStringLiteral("across_back_center_to_armfold_front_to_across_back_center"); // P07 -const QString neckBackToArmfoldFrontToHighbustBack_M - = QStringLiteral("neck_back_to_armfold_front_to_highbust_back"); // P08 -const QString armfoldToArmfoldBust_M = QStringLiteral("armfold_to_armfold_bust"); // P09 -const QString armfoldToBustFront_M = QStringLiteral("armfold_to_bust_front"); // P10 -const QString highbustBOverShoulderToHighbustF_M = QStringLiteral("highbust_b_over_shoulder_to_highbust_f"); // P11 -const QString armscyeArc_M = QStringLiteral("armscye_arc"); // P12 -// Q -const QString dartWidthShoulder_M = QStringLiteral("dart_width_shoulder"); // Q01 -const QString dartWidthBust_M = QStringLiteral("dart_width_bust"); // Q02 -const QString dartWidthWaist_M = QStringLiteral("dart_width_waist"); // Q03 - -// pattern making systems codes -const QString p0_S = QStringLiteral("p0"); -const QString p1_S = QStringLiteral("p1"); -const QString p2_S = QStringLiteral("p2"); -const QString p3_S = QStringLiteral("p3"); -const QString p4_S = QStringLiteral("p4"); -const QString p5_S = QStringLiteral("p5"); -const QString p6_S = QStringLiteral("p6"); -const QString p7_S = QStringLiteral("p7"); -const QString p8_S = QStringLiteral("p8"); -const QString p9_S = QStringLiteral("p9"); -const QString p10_S = QStringLiteral("p10"); -const QString p11_S = QStringLiteral("p11"); -const QString p12_S = QStringLiteral("p12"); -const QString p13_S = QStringLiteral("p13"); -const QString p14_S = QStringLiteral("p14"); -const QString p15_S = QStringLiteral("p15"); -const QString p16_S = QStringLiteral("p16"); -const QString p17_S = QStringLiteral("p17"); -const QString p18_S = QStringLiteral("p18"); -const QString p19_S = QStringLiteral("p19"); -const QString p20_S = QStringLiteral("p20"); -const QString p21_S = QStringLiteral("p21"); -const QString p22_S = QStringLiteral("p22"); -const QString p23_S = QStringLiteral("p23"); -const QString p24_S = QStringLiteral("p24"); -const QString p25_S = QStringLiteral("p25"); -const QString p26_S = QStringLiteral("p26"); -const QString p27_S = QStringLiteral("p27"); -const QString p28_S = QStringLiteral("p28"); -const QString p29_S = QStringLiteral("p29"); -const QString p30_S = QStringLiteral("p30"); -const QString p31_S = QStringLiteral("p31"); -const QString p32_S = QStringLiteral("p32"); -const QString p33_S = QStringLiteral("p33"); -const QString p34_S = QStringLiteral("p34"); -const QString p35_S = QStringLiteral("p35"); -const QString p36_S = QStringLiteral("p36"); -const QString p37_S = QStringLiteral("p37"); -const QString p38_S = QStringLiteral("p38"); -const QString p39_S = QStringLiteral("p39"); -const QString p40_S = QStringLiteral("p40"); -const QString p41_S = QStringLiteral("p41"); -const QString p42_S = QStringLiteral("p42"); -const QString p43_S = QStringLiteral("p43"); -const QString p44_S = QStringLiteral("p44"); -const QString p45_S = QStringLiteral("p45"); -const QString p46_S = QStringLiteral("p46"); -const QString p47_S = QStringLiteral("p47"); -const QString p48_S = QStringLiteral("p48"); -const QString p49_S = QStringLiteral("p49"); -const QString p50_S = QStringLiteral("p50"); -const QString p51_S = QStringLiteral("p51"); -const QString p52_S = QStringLiteral("p52"); -const QString p53_S = QStringLiteral("p53"); -const QString p54_S = QStringLiteral("p54"); -const QString p998_S = QStringLiteral("p998"); - //functions const QString degTorad_F = QStringLiteral("degTorad"); const QString radTodeg_F = QStringLiteral("radTodeg"); @@ -658,368 +331,6 @@ void CheckFactor(qreal &oldFactor, const qreal &Newfactor) } } -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListGroupA() -{ - const QStringList list = QStringList() << height_M // A01 - << heightNeckBack_M // A02 - << heightScapula_M // A03 - << heightArmpit_M // A04 - << heightWaistSide_M // A05 - << heightHip_M // A06 - << heightGlutealFold_M // A07 - << heightKnee_M // A08 - << heightCalf_M // A09 - << heightAnkleHigh_M // A10 - << heightAnkle_M // A11 - << heightHighhip_M // A12 - << heightWaistFront_M // A13 - << heightBustpoint_M // A14 - << heightShoulderTip_M // A15 - << heightNeckFront_M // A16 - << heightNeckSide_M // A17 - << heightNeckBackToKnee_M // A18 - << heightWaistSideToKnee_M // A19 - << heightWaistSideToHip_M // A20 - << heightKneeToAnkle_M // A21 - << heightNeckBackToWaistSide_M // A22 - << heightWaistBack_M; // A23 - return list; -} - -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListGroupB() -{ - const QStringList list = QStringList() << widthShoulder_M // B01 - << widthBust_M // B02 - << widthWaist_M // B03 - << widthHip_M // B04 - << widthAbdomenToHip_M; // B05 - - return list; -} - -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListGroupC() -{ - const QStringList list = QStringList() << indentNeckBack_M // C01 - << indentWaistBack_M // C02 - << indentAnkleHigh_M; // C03 - - return list; -} - -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListGroupD() -{ - const QStringList list = QStringList() << handPalmLength_M // D01 - << handLength_M // D02 - << handPalmWidth_M // D03 - << handPalmCirc_M // D04 - << handCirc_M; // D05 - - return list; -} - -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListGroupE() -{ - const QStringList list = QStringList() << footWidth_M // E01 - << footLength_M // E02 - << footCirc_M // E03 - << footInstepCirc_M; // E04 - - return list; -} - -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListGroupF() -{ - const QStringList list = QStringList() << headCirc_M // F01 - << headLength_M // F02 - << headDepth_M // F03 - << headWidth_M // F04 - << headCrownToNeckBack_M // F05 - << headChinToNeckBack_M; // F06 - - return list; -} - -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListGroupG() -{ - const QStringList list = QStringList() << neckMidCirc_M // G01 - << neckCirc_M // G02 - << highbustCirc_M // G03 - << bustCirc_M // G04 - << lowbustCirc_M // G05 - << ribCirc_M // G06 - << waistCirc_M // G07 - << highhipCirc_M // G08 - << hipCirc_M // G09 - << neckArcF_M // G10 - << highbustArcF_M // G11 - << bustArcF_M // G12 - << lowbustArcF_M // G13 - << ribArcF_M // G14 - << waistArcF_M // G15 - << highhipArcF_M // G16 - << hipArcF_M // G17 - << neckArcHalfF_M // G18 - << highbustArcHalfF_M // G19 - << bustArcHalfF_M // G20 - << lowbustArcHalfF_M // G21 - << ribArcHalfF_M // G22 - << waistArcHalfF_M // G23 - << highhipArcHalfF_M // G24 - << hipArcHalfF_M // G25 - << neckArcB_M // G26 - << highbustArcB_M // G27 - << bustArcB_M // G28 - << lowbustArcB_M // G29 - << ribArcB_M // G30 - << waistArcB_M // G31 - << highhipArcB_M // G32 - << hipArcB_M // G33 - << neckArcHalfB_M // G34 - << highbustArcHalfB_M // G35 - << bustArcHalfB_M // G36 - << lowbustArcHalfB_M // G37 - << ribArcHalfB_M // G38 - << waistArcHalfB_M // G39 - << highhipArcHalfB_M // G40 - << hipArcHalfB_M // G41 - << hipWithAbdomenArcF_M // G42 - << bodyArmfoldCirc_M // G43 - << bodyBustCirc_M // G44 - << bodyTorsoCirc_M // G45 - << hipCircWithAbdomen_M; // G46 - - return list; -} - -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListGroupH() -{ - const QStringList list = QStringList() << neckFrontToWaistF_M // H01 - << neckFrontToWaistFlatF_M // H02 - << armpitToWaistSide_M // H03 - << shoulderTipToWaistSideF_M // H04 - << neckSideToWaistF_M // H05 - << neckSideToWaistBustpointF_M // H06 - << neckFrontToHighbustF_M // H07 - << highbustToWaistF_M // H08 - << neckFrontToBustF_M // H09 - << bustToWaistF_M // H10 - << lowbustToWaistF_M // H11 - << ribToWaistSide_M // H12 - << shoulderTipToArmfoldF_M // H13 - << neckSideToBustF_M // H14 - << neckSideToHighbustF_M // H15 - << shoulderCenterToHighbustF_M // H16 - << shoulderTipToWaistSideB_M // H17 - << neckSideToWaistB_M // H18 - << neckBackToWaistB_M // H19 - << neckSideToWaistScapulaB_M // H20 - << neckBackToHighbustB_M // H21 - << highbustToWaistB_M // H22 - << neckBackToBustB_M // H23 - << bustToWaistB_M // H24 - << lowbustToWaistB_M // H25 - << shoulderTipToArmfoldB_M // H26 - << neckSideToBustB_M // H27 - << neckSideToHighbustB_M // H28 - << shoulderCenterToHighbustB_M // H29 - << waistToHighhipF_M // H30 - << waistToHipF_M // H31 - << waistToHighhipSide_M // H32 - << waistToHighhipB_M // H33 - << waistToHipB_M // H34 - << waistToHipSide_M // H35 - << shoulderSlopeNeckSideAngle_M // H36 - << shoulderSlopeNeckSideLength_M // H37 - << shoulderSlopeNeckBackAngle_M // H38 - << shoulderSlopeNeckBackHeight_M // H39 - << shoulderSlopeShoulderTipAngle_M // H40 - << neckBackToAcrossBack_M // H41 - << acrossBackToWaistB_M; // H42 - - return list; -} - -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListGroupI() -{ - const QStringList list = QStringList() << shoulderLength_M // I01 - << shoulderTipToShoulderTipF_M // I02 - << acrossChestF_M // I03 - << armfoldToArmfoldF_M // I04 - << shoulderTipToShoulderTipHalfF_M // I05 - << acrossChestHalfF_M // I06 - << shoulderTipToShoulderTipB_M // I07 - << acrossBackB_M // I08 - << armfoldToArmfoldB_M // I09 - << shoulderTipToShoulderTipHalfB_M // I10 - << acrossBackHalfB_M // I11 - << neckFrontToShoulderTipF_M // I12 - << neckBackToShoulderTipB_M // I13 - << neckWidth_M; // I14 - - return list; -} - -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListGroupJ() -{ - const QStringList list = QStringList() << bustpointToBustpoint_M // J01 - << bustpointToNeckSide_M // J02 - << bustpointToLowbust_M // J03 - << bustpointToWaist_M // J04 - << bustpointToBustpointHalf_M // J05 - << bustpointNeckSideToWaist_M // J06 - << bustpointToShoulderTip_M // J07 - << bustpointToWaistFront_M // J08 - << bustpointToBustpointHalter_M // J09 - << bustpointToShoulderCenter_M; // J10 - - return list; -} - -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListGroupK() -{ - const QStringList list = QStringList() << shoulderTipToWaistFront_M // K01 - << neckFrontToWaistSide_M // K02 - << neckSideToWaistSideF_M // K03 - << shoulderTipToWaistBack_M // K04 - << shoulderTipToWaistB_1inOffset_M // K05 - << neckBackToWaistSide_M // K06 - << neckSideToWaistSideB_M // K07 - << neckSideToArmfoldF_M // K08 - << neckSideToArmpitF_M // K09 - << neckSideToBustSideF_M // K10 - << neckSideToArmfoldB_M // K11 - << neckSideToArmpitB_M // K12 - << neckSideToBustSideB_M; // K13 - - return list; -} - -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListGroupL() -{ - const QStringList list = QStringList() << armShoulderTipToWristBent_M // L01 - << armShoulderTipToElbowBent_M // L02 - << armElbowToWristBent_M // L03 - << armElbowCircBent_M // L04 - << armShoulderTipToWrist_M // L05 - << armShoulderTipToElbow_M // L06 - << armElbowToWrist_M // L07 - << armArmpitToWrist_M // L08 - << armArmpitToElbow_M // L09 - << armElbowToWristInside_M // L10 - << armUpperCirc_M // L11 - << armAboveElbowCirc_M // L12 - << armElbowCirc_M // L13 - << armLowerCirc_M // L14 - << armWristCirc_M // L15 - << armShoulderTipToArmfoldLine_M // L16 - << armNeckSideToWrist_M // L17 - << armNeckSideToFingerTip_M // L18 - << armscyeCirc_M // L19 - << armscyeLength_M // L20 - << armscyeWidth_M // L21 - << armNeckSideToOuterElbow_M; // L22 - - return list; -} - -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListGroupM() -{ - const QStringList list = QStringList() << legCrotchToFloor_M // M01 - << legWaistSideToFloor_M // M02 - << legThighUpperCirc_M // M03 - << legThighMidCirc_M // M04 - << legKneeCirc_M // M05 - << legKneeSmallCirc_M // M06 - << legCalfCirc_M // M07 - << legAnkleHighCirc_M // M08 - << legAnkleCirc_M // M09 - << legKneeCircBent_M // M10 - << legAnkleDiagCirc_M // M11 - << legCrotchToAnkle_M // M12 - << legWaistSideToAnkle_M // M13 - << legWaistSideToKnee_M; // M14 - - return list; -} - -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListGroupN() -{ - const QStringList list = QStringList() << crotchLength_M // N01 - << crotchLengthB_M // N02 - << crotchLengthF_M // N03 - << riseLengthSideSitting_M // N04 - << riseLengthDiag_M // N05 - << riseLengthB_M // N06 - << riseLengthF_M // N07 - << riseLengthSide_M; // N08 - - return list; -} - -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListGroupO() -{ - const QStringList list = QStringList() << neckBackToWaistFront_M // O01 - << waistToWaistHalter_M // O02 - << waistNaturalCirc_M // O03 - << waistNaturalArcF_M // O04 - << waistNaturalArcB_M // O05 - << waistToNaturalWaistF_M // O06 - << waistToNaturalWaistB_M // O07 - << armNeckBackToElbowBent_M // O08 - << armNeckBackToWristBent_M // O09 - << armNeckSideToElbowBent_M // O10 - << armNeckSideToWristBent_M // O11 - << armAcrossBackCenterToElbowBent_M // O12 - << armAcrossBackCenterToWristBent_M // O13 - << armArmscyeBackCenterToWristBent_M; // O14 - - return list; -} - -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListGroupP() -{ - const QStringList list = QStringList() << neckBackToBustFront_M // P01 - << neckBackToArmfoldFront_M // P02 - << neckBackToArmfoldFrontToWaistSide_M // P03 - << highbustBackOverShoulderToArmfoldFront_M // P04 - << highbustBackOverShoulderToWaistFront_M // P05 - << neckBackToArmfoldFrontToNeckBack_M // P06 - << acrossBackCenterToArmfoldFrontToAcrossBackCenter_M // P07 - << neckBackToArmfoldFrontToHighbustBack_M // P08 - << armfoldToArmfoldBust_M // P09 - << armfoldToBustFront_M // P10 - << highbustBOverShoulderToHighbustF_M // P11 - << armscyeArc_M; // P12 - - return list; -} - -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListGroupQ() -{ - const QStringList list = QStringList() << dartWidthShoulder_M // Q01 - << dartWidthBust_M // Q02 - << dartWidthWaist_M; // Q03 - - return list; -} - //--------------------------------------------------------------------------------------------------------------------- QStringList SupportedLocales() { @@ -1045,605 +356,6 @@ QStringList SupportedLocales() return locales; } -//--------------------------------------------------------------------------------------------------------------------- -QStringList AllGroupNames() -{ - const QStringList originalNames = QStringList() << ListGroupA() - << ListGroupB() - << ListGroupC() - << ListGroupD() - << ListGroupE() - << ListGroupF() - << ListGroupG() - << ListGroupH() - << ListGroupI() - << ListGroupJ() - << ListGroupK() - << ListGroupL() - << ListGroupM() - << ListGroupN() - << ListGroupO() - << ListGroupP() - << ListGroupQ(); - - return originalNames; -} - -//--------------------------------------------------------------------------------------------------------------------- -void InitPMSystems(QComboBox *systemCombo) -{ - const QStringList listSystems = ListPMSystems(); - QMap systems; - for (int i = 0; i < listSystems.size()-1; ++i) - { - systems.insert(qApp->TrVars()->PMSystemName(listSystems.at(i)) + " ("+listSystems.at(i)+")", listSystems.at(i)); - } - -// * The default option (blank field or 'None') should appear at the top of the list. -// * The list should be sorted alphabetically so users can find their system easily. - - SCASSERT(systemCombo != nullptr) - systemCombo->addItem(qApp->TrVars()->PMSystemName(listSystems.at(listSystems.size()-1)), - listSystems.at(listSystems.size()-1)); - - QMap::const_iterator i = systems.constBegin(); - while (i != systems.constEnd()) - { - systemCombo->addItem(i.key(), i.value()); - ++i; - } -} - -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListPMSystems() -{ - QStringList list; - list << p0_S - << p1_S - << p2_S - << p3_S - << p4_S - << p5_S - << p6_S - << p7_S - << p8_S - << p9_S - << p10_S - << p11_S - << p12_S - << p13_S - << p14_S - << p15_S - << p16_S - << p17_S - << p18_S - << p19_S - << p20_S - << p21_S - << p22_S - << p23_S - << p24_S - << p25_S - << p26_S - << p27_S - << p28_S - << p29_S - << p30_S - << p31_S - << p32_S - << p33_S - << p34_S - << p35_S - << p36_S - << p37_S - << p38_S - << p39_S - << p40_S - << p41_S - << p42_S - << p43_S - << p44_S - << p45_S - << p46_S - << p47_S - << p48_S - << p49_S - << p50_S - << p51_S - << p52_S - << p53_S - << p54_S - << p998_S; - - return list; -} - -//--------------------------------------------------------------------------------------------------------------------- -QStringList ListNumbers(const VTranslateMeasurements *trM, const QStringList &listMeasurements) -{ - SCASSERT(trM != nullptr) - - QStringList numbers; - for (int i=0; i < listMeasurements.size(); ++i) - { - numbers.append(trM->MNumber(listMeasurements.at(i))); - } - return numbers; -} - -//--------------------------------------------------------------------------------------------------------------------- -QString MapDiagrams(const VTranslateMeasurements *trM, const QString &number) -{ - switch (ListNumbers(trM, ListGroupA()).indexOf(number)) - { - // A - case 0: // A01 - case 1: // A02 - case 2: // A03 - case 3: // A04 - case 4: // A05 - case 5: // A06 - case 6: // A07 - case 7: // A08 - case 8: // A09 - case 9: // A10 - case 10: // A11 - case 11: // A12 - case 12: // A13 - case 13: // A14 - case 14: // A15 - case 15: // A16 - case 16: // A17 - return QStringLiteral("Ap1"); - case 17: // A18 - case 18: // A19 - case 19: // A20 - case 20: // A21 - case 21: // A22 - case 22: // A23 - return QStringLiteral("Ap2"); - default: - break; - } - - switch (ListNumbers(trM, ListGroupB()).indexOf(number)) - { - // B - case 0: // B01 - case 1: // B02 - case 2: // B03 - case 3: // B04 - return QStringLiteral("Bp1"); - case 4: // B05 - return QStringLiteral("Bp2"); - default: - break; - } - - switch (ListNumbers(trM, ListGroupC()).indexOf(number)) - { - // C - case 0: // C01 - return QStringLiteral("Cp1"); - case 1: // C02 - case 2: // C03 - return QStringLiteral("Cp2"); - default: - break; - } - - switch (ListNumbers(trM, ListGroupD()).indexOf(number)) - { - // D - case 0: // D01 - case 1: // D02 - case 2: // D03 - return QStringLiteral("Dp1"); - case 3: // D04 - return QStringLiteral("Dp2"); - case 4: // D05 - return QStringLiteral("Dp3"); - default: - break; - } - - switch (ListNumbers(trM, ListGroupE()).indexOf(number)) - { - // E - case 0: // E01 - return QStringLiteral("Ep1"); - case 1: // E02 - case 2: // E03 - case 3: // E04 - return QStringLiteral("Ep2"); - default: - break; - } - - switch (ListNumbers(trM, ListGroupF()).indexOf(number)) - { - // F - case 0: // F01 - case 1: // F02 - case 2: // F03 - return QStringLiteral("Fp1"); - case 3: // F04 - return QStringLiteral("Fp2"); - case 4: // F05 - case 5: // F06 - return QStringLiteral("Fp3"); - default: - break; - } - - switch (ListNumbers(trM, ListGroupG()).indexOf(number)) - { - // G - case 0: // G01 - case 1: // G02 - case 2: // G03 - case 3: // G04 - case 4: // G05 - case 5: // G06 - case 6: // G07 - case 7: // G08 - case 8: // G09 - return QStringLiteral("Gp1"); - case 9: // G10 - case 10: // G11 - case 11: // G12 - case 12: // G13 - case 13: // G14 - case 14: // G15 - case 15: // G16 - case 16: // G17 - return QStringLiteral("Gp2"); - case 17: // G18 - case 18: // G19 - case 19: // G20 - case 20: // G21 - case 21: // G22 - case 22: // G23 - case 23: // G24 - case 24: // G25 - return QStringLiteral("Gp3"); - case 25: // G26 - case 26: // G27 - case 27: // G28 - case 28: // G29 - case 29: // G30 - case 30: // G31 - case 31: // G32 - case 32: // G33 - return QStringLiteral("Gp4"); - case 33: // G34 - case 34: // G35 - case 35: // G36 - case 36: // G37 - case 37: // G38 - case 38: // G39 - case 39: // G40 - case 40: // G41 - return QStringLiteral("Gp5"); - case 41: // G42 - return QStringLiteral("Gp6"); - case 42: // G43 - case 43: // G44 - return QStringLiteral("Gp7"); - case 44: // G45 - return QStringLiteral("Gp8"); - case 45: // G46 - return QStringLiteral("Gp9"); - default: - break; - } - - switch (ListNumbers(trM, ListGroupH()).indexOf(number)) - { - // H - case 0: // H01 - return QStringLiteral("Hp1"); - case 1: // H02 - return QStringLiteral("Hp2"); - case 2: // H03 - case 3: // H04 - case 4: // H05 - case 5: // H06 - return QStringLiteral("Hp3"); - case 6: // H07 - case 7: // H08 - case 8: // H09 - case 9: // H10 - case 10: // H11 - case 11: // H12 - return QStringLiteral("Hp4"); - case 12: // H13 - case 13: // H14 - case 14: // H15 - case 15: // H16 - return QStringLiteral("Hp5"); - case 16: // H17 - case 17: // H18 - case 18: // H19 - case 19: // H20 - return QStringLiteral("Hp6"); - case 20: // H21 - case 21: // H22 - case 22: // H23 - case 23: // H24 - case 24: // H25 - return QStringLiteral("Hp7"); - case 25: // H26 - case 26: // H27 - case 27: // H28 - case 28: // H29 - return QStringLiteral("Hp8"); - case 29: // H30 - case 30: // H31 - case 31: // H32 - return QStringLiteral("Hp9"); - case 32: // H33 - case 33: // H34 - case 34: // H35 - return QStringLiteral("Hp10"); - case 35: // H36 - case 36: // H37 - case 37: // H38 - case 38: // H39 - return QStringLiteral("Hp11"); - case 39: // H40 - return QStringLiteral("Hp12"); - case 40: // H41 - case 41: // H42 - return QStringLiteral("Hp13"); - default: - break; - } - - switch (ListNumbers(trM, ListGroupI()).indexOf(number)) - { - // I - case 0: // I01 - case 1: // I02 - case 2: // I03 - case 3: // I04 - return QStringLiteral("Ip1"); - case 4: // I05 - case 5: // I06 - return QStringLiteral("Ip2"); - case 6: // I07 - case 7: // I08 - case 8: // I09 - return QStringLiteral("Ip3"); - case 9: // I10 - case 10: // I11 - return QStringLiteral("Ip4"); - case 11: // I12 - return QStringLiteral("Ip5"); - case 12: // I13 - return QStringLiteral("Ip6"); - case 13: // I14 - return QStringLiteral("Ip7"); - default: - break; - } - - switch (ListNumbers(trM, ListGroupJ()).indexOf(number)) - { - // J - case 0: // J01 - case 1: // J02 - case 2: // J03 - case 3: // J04 - return QStringLiteral("Jp1"); - case 4: // J05 - return QStringLiteral("Jp2"); - case 5: // J06 - return QStringLiteral("Jp3"); - case 6: // J07 - case 7: // J08 - return QStringLiteral("Jp4"); - case 8: // J09 - return QStringLiteral("Jp5"); - case 9: // J10 - return QStringLiteral("Jp6"); - default: - break; - } - - switch (ListNumbers(trM, ListGroupK()).indexOf(number)) - { - // K - case 0: // K01 - return QStringLiteral("Kp1"); - case 1: // K02 - case 2: // K03 - return QStringLiteral("Kp2"); - case 3: // K04 - return QStringLiteral("Kp3"); - case 4: // K05 - return QStringLiteral("Kp4"); - case 5: // K06 - case 6: // K07 - return QStringLiteral("Kp5"); - case 7: // K08 - return QStringLiteral("Kp6"); - case 8: // K09 - return QStringLiteral("Kp7"); - case 9: // K10 - return QStringLiteral("Kp8"); - case 10: // K11 - return QStringLiteral("Kp9"); - case 11: // K12 - return QStringLiteral("Kp10"); - case 12: // K13 - return QStringLiteral("Kp11"); - default: - break; - } - - switch (ListNumbers(trM, ListGroupL()).indexOf(number)) - { - // L - case 0: // L01 - case 1: // L02 - case 2: // L03 - case 3: // L04 - return QStringLiteral("Lp1"); - case 4: // L05 - case 5: // L06 - case 6: // L07 - return QStringLiteral("Lp2"); - case 7: // L08 - case 8: // L09 - case 9: // L10 - return QStringLiteral("Lp3"); - case 10: // L11 - case 11: // L12 - case 12: // L13 - case 13: // L14 - case 14: // L15 - return QStringLiteral("Lp4"); - case 15: // L16 - return QStringLiteral("Lp5"); - case 16: // L17 - return QStringLiteral("Lp6"); - case 17: // L18 - return QStringLiteral("Lp7"); - case 18: // L19 - case 19: // L20 - return QStringLiteral("Lp8"); - case 20: // L21 - return QStringLiteral("Lp9"); - case 21: // L22 - return QStringLiteral("Lp10"); - default: - break; - } - - switch (ListNumbers(trM, ListGroupM()).indexOf(number)) - { - // M - case 0: // M01 - case 1: // M02 - return QStringLiteral("Mp1"); - case 2: // M03 - case 3: // M04 - case 4: // M05 - case 5: // M06 - case 6: // M07 - case 7: // M08 - case 8: // M09 - case 9: // M10 - case 10: // M11 - return QStringLiteral("Mp2"); - case 11: // M12 - case 12: // M13 - case 13: // M14 - return QStringLiteral("Mp3"); - default: - break; - } - - switch (ListNumbers(trM, ListGroupN()).indexOf(number)) - { - // N - case 0: // N01 - return QStringLiteral("Np1"); - case 1: // N02 - case 2: // N03 - return QStringLiteral("Np2"); - case 3: // N04 - case 4: // N05 - return QStringLiteral("Np3"); - case 5: // N06 - case 6: // N07 - return QStringLiteral("Np4"); - case 7: // N08 - return QStringLiteral("Np5"); - default: - break; - } - - switch (ListNumbers(trM, ListGroupO()).indexOf(number)) - { - // O - case 0: // O01 - return QStringLiteral("Op1"); - case 1: // O02 - return QStringLiteral("Op2"); - case 2: // O03 - return QStringLiteral("Op3"); - case 3: // O04 - return QStringLiteral("Op4"); - case 4: // O05 - return QStringLiteral("Op5"); - case 5: // O06 - return QStringLiteral("Op6"); - case 6: // O07 - return QStringLiteral("Op7"); - case 7: // O08 - case 8: // O09 - return QStringLiteral("Op8"); - case 9: // O10 - case 10: // O11 - return QStringLiteral("Op9"); - case 11: // O12 - case 12: // O13 - return QStringLiteral("Op10"); - case 13: // O14 - return QStringLiteral("Op11"); - default: - break; - } - - switch (ListNumbers(trM, ListGroupP()).indexOf(number)) - { - // P - case 0: // P01 - return QStringLiteral("Pp1"); - case 1: // P02 - return QStringLiteral("Pp2"); - case 2: // P03 - return QStringLiteral("Pp3"); - case 3: // P04 - return QStringLiteral("Pp4"); - case 4: // P05 - return QStringLiteral("Pp5"); - case 5: // P06 - return QStringLiteral("Pp6"); - case 6: // P07 - return QStringLiteral("Pp7"); - case 7: // P08 - return QStringLiteral("Pp8"); - case 8: // P09 - return QStringLiteral("Pp9"); - case 9: // P10 - return QStringLiteral("Pp10"); - case 10: // P11 - return QStringLiteral("Pp11"); - case 11: // P12 - return QStringLiteral("Pp12"); - default: - break; - } - - switch (ListNumbers(trM, ListGroupQ()).indexOf(number)) - { - // Q - case 0: // Q01 - return QStringLiteral("Qp1"); - case 1: // Q02 - return QStringLiteral("Qp2"); - case 2: // Q03 - return QStringLiteral("Qp3"); - default: - break; - } - - return QString(); -} - //--------------------------------------------------------------------------------------------------------------------- /** * @brief strippedName the function call around curFile to exclude the path to the file. diff --git a/src/libs/vmisc/def.h b/src/libs/vmisc/def.h index 3eb44d621..8977b7d6e 100644 --- a/src/libs/vmisc/def.h +++ b/src/libs/vmisc/def.h @@ -292,351 +292,6 @@ extern const QString LONG_OPTION_NO_HDPI_SCALING; bool IsOptionSet(int argc, char *argv[], const char *option); void InitHighDpiScaling(int argc, char *argv[]); -// measurements -// A -extern const QString height_M; // A01 -extern const QString heightNeckBack_M; // A02 -extern const QString heightScapula_M; // A03 -extern const QString heightArmpit_M; // A04 -extern const QString heightWaistSide_M; // A05 -extern const QString heightHip_M; // A06 -extern const QString heightGlutealFold_M; // A07 -extern const QString heightKnee_M; // A08 -extern const QString heightCalf_M; // A09 -extern const QString heightAnkleHigh_M; // A10 -extern const QString heightAnkle_M; // A11 -extern const QString heightHighhip_M; // A12 -extern const QString heightWaistFront_M; // A13 -extern const QString heightBustpoint_M; // A14 -extern const QString heightShoulderTip_M; // A15 -extern const QString heightNeckFront_M; // A16 -extern const QString heightNeckSide_M; // A17 -extern const QString heightNeckBackToKnee_M; // A18 -extern const QString heightWaistSideToKnee_M; // A19 -extern const QString heightWaistSideToHip_M; // A20 -extern const QString heightKneeToAnkle_M; // A21 -extern const QString heightNeckBackToWaistSide_M; // A22 -extern const QString heightWaistBack_M; // A23 -// B -extern const QString widthShoulder_M; // B01 -extern const QString widthBust_M; // B02 -extern const QString widthWaist_M; // B03 -extern const QString widthHip_M; // B04 -extern const QString widthAbdomenToHip_M; // B05 -// C -extern const QString indentNeckBack_M; // C01 -extern const QString indentWaistBack_M; // C02 -extern const QString indentAnkleHigh_M; // C03 -// D -extern const QString handPalmLength_M; // D01 -extern const QString handLength_M; // D02 -extern const QString handPalmWidth_M; // D03 -extern const QString handPalmCirc_M; // D04 -extern const QString handCirc_M; // D05 -// E -extern const QString footWidth_M; // E01 -extern const QString footLength_M; // E02 -extern const QString footCirc_M; // E03 -extern const QString footInstepCirc_M; // E04 -// F -extern const QString headCirc_M; // F01 -extern const QString headLength_M; // F02 -extern const QString headDepth_M; // F03 -extern const QString headWidth_M; // F04 -extern const QString headCrownToNeckBack_M; // F05 -extern const QString headChinToNeckBack_M; // F06 -// G -extern const QString neckMidCirc_M; // G01 -extern const QString neckCirc_M; // G02 -extern const QString highbustCirc_M; // G03 -extern const QString bustCirc_M; // G04 -extern const QString lowbustCirc_M; // G05 -extern const QString ribCirc_M; // G06 -extern const QString waistCirc_M; // G07 -extern const QString highhipCirc_M; // G08 -extern const QString hipCirc_M; // G09 -extern const QString neckArcF_M; // G10 -extern const QString highbustArcF_M; // G11 -extern const QString bustArcF_M; // G12 -extern const QString lowbustArcF_M; // G13 -extern const QString ribArcF_M; // G14 -extern const QString waistArcF_M; // G15 -extern const QString highhipArcF_M; // G16 -extern const QString hipArcF_M; // G17 -extern const QString neckArcHalfF_M; // G18 -extern const QString highbustArcHalfF_M; // G19 -extern const QString bustArcHalfF_M; // G20 -extern const QString lowbustArcHalfF_M; // G21 -extern const QString ribArcHalfF_M; // G22 -extern const QString waistArcHalfF_M; // G23 -extern const QString highhipArcHalfF_M; // G24 -extern const QString hipArcHalfF_M; // G25 -extern const QString neckArcB_M; // G26 -extern const QString highbustArcB_M; // G27 -extern const QString bustArcB_M; // G28 -extern const QString lowbustArcB_M; // G29 -extern const QString ribArcB_M; // G30 -extern const QString waistArcB_M; // G31 -extern const QString highhipArcB_M; // G32 -extern const QString hipArcB_M; // G33 -extern const QString neckArcHalfB_M; // G34 -extern const QString highbustArcHalfB_M; // G35 -extern const QString bustArcHalfB_M; // G36 -extern const QString lowbustArcHalfB_M; // G37 -extern const QString ribArcHalfB_M; // G38 -extern const QString waistArcHalfB_M; // G39 -extern const QString highhipArcHalfB_M; // G40 -extern const QString hipArcHalfB_M; // G41 -extern const QString hipWithAbdomenArcF_M; // G42 -extern const QString bodyArmfoldCirc_M; // G43 -extern const QString bodyBustCirc_M; // G44 -extern const QString bodyTorsoCirc_M; // G45 -extern const QString hipCircWithAbdomen_M; // G46 -// H -extern const QString neckFrontToWaistF_M; // H01 -extern const QString neckFrontToWaistFlatF_M; // H02 -extern const QString armpitToWaistSide_M; // H03 -extern const QString shoulderTipToWaistSideF_M; // H04 -extern const QString neckSideToWaistF_M; // H05 -extern const QString neckSideToWaistBustpointF_M; // H06 -extern const QString neckFrontToHighbustF_M; // H07 -extern const QString highbustToWaistF_M; // H08 -extern const QString neckFrontToBustF_M; // H09 -extern const QString bustToWaistF_M; // H10 -extern const QString lowbustToWaistF_M; // H11 -extern const QString ribToWaistSide_M; // H12 -extern const QString shoulderTipToArmfoldF_M; // H13 -extern const QString neckSideToBustF_M; // H14 -extern const QString neckSideToHighbustF_M; // H15 -extern const QString shoulderCenterToHighbustF_M; // H16 -extern const QString shoulderTipToWaistSideB_M; // H17 -extern const QString neckSideToWaistB_M; // H18 -extern const QString neckBackToWaistB_M; // H19 -extern const QString neckSideToWaistScapulaB_M; // H20 -extern const QString neckBackToHighbustB_M; // H21 -extern const QString highbustToWaistB_M; // H22 -extern const QString neckBackToBustB_M; // H23 -extern const QString bustToWaistB_M; // H24 -extern const QString lowbustToWaistB_M; // H25 -extern const QString shoulderTipToArmfoldB_M; // H26 -extern const QString neckSideToBustB_M; // H27 -extern const QString neckSideToHighbustB_M; // H28 -extern const QString shoulderCenterToHighbustB_M; // H29 -extern const QString waistToHighhipF_M; // H30 -extern const QString waistToHipF_M; // H31 -extern const QString waistToHighhipSide_M; // H32 -extern const QString waistToHighhipB_M; // H33 -extern const QString waistToHipB_M; // H34 -extern const QString waistToHipSide_M; // H35 -extern const QString shoulderSlopeNeckSideAngle_M; // H36 -extern const QString shoulderSlopeNeckSideLength_M; // H37 -extern const QString shoulderSlopeNeckBackAngle_M; // H38 -extern const QString shoulderSlopeNeckBackHeight_M; // H39 -extern const QString shoulderSlopeShoulderTipAngle_M; // H40 -extern const QString neckBackToAcrossBack_M; // H41 -extern const QString acrossBackToWaistB_M; // H42 -// I -extern const QString shoulderLength_M; // I01 -extern const QString shoulderTipToShoulderTipF_M; // I02 -extern const QString acrossChestF_M; // I03 -extern const QString armfoldToArmfoldF_M; // I04 -extern const QString shoulderTipToShoulderTipHalfF_M; // I05 -extern const QString acrossChestHalfF_M; // I06 -extern const QString shoulderTipToShoulderTipB_M; // I07 -extern const QString acrossBackB_M; // I08 -extern const QString armfoldToArmfoldB_M; // I09 -extern const QString shoulderTipToShoulderTipHalfB_M; // I10 -extern const QString acrossBackHalfB_M; // I11 -extern const QString neckFrontToShoulderTipF_M; // I12 -extern const QString neckBackToShoulderTipB_M; // I13 -extern const QString neckWidth_M; // I14 -// J -extern const QString bustpointToBustpoint_M; // J01 -extern const QString bustpointToNeckSide_M; // J02 -extern const QString bustpointToLowbust_M; // J03 -extern const QString bustpointToWaist_M; // J04 -extern const QString bustpointToBustpointHalf_M; // J05 -extern const QString bustpointNeckSideToWaist_M; // J06 -extern const QString bustpointToShoulderTip_M; // J07 -extern const QString bustpointToWaistFront_M; // J08 -extern const QString bustpointToBustpointHalter_M; // J09 -extern const QString bustpointToShoulderCenter_M; // J10 -// K -extern const QString shoulderTipToWaistFront_M; // K01 -extern const QString neckFrontToWaistSide_M; // K02 -extern const QString neckSideToWaistSideF_M; // K03 -extern const QString shoulderTipToWaistBack_M; // K04 -extern const QString shoulderTipToWaistB_1inOffset_M; // K05 -extern const QString neckBackToWaistSide_M; // K06 -extern const QString neckSideToWaistSideB_M; // K07 -extern const QString neckSideToArmfoldF_M; // K08 -extern const QString neckSideToArmpitF_M; // K09 -extern const QString neckSideToBustSideF_M; // K10 -extern const QString neckSideToArmfoldB_M; // K11 -extern const QString neckSideToArmpitB_M; // K12 -extern const QString neckSideToBustSideB_M; // K13 -// L -extern const QString armShoulderTipToWristBent_M; // L01 -extern const QString armShoulderTipToElbowBent_M; // L02 -extern const QString armElbowToWristBent_M; // L03 -extern const QString armElbowCircBent_M; // L04 -extern const QString armShoulderTipToWrist_M; // L05 -extern const QString armShoulderTipToElbow_M; // L06 -extern const QString armElbowToWrist_M; // L07 -extern const QString armArmpitToWrist_M; // L08 -extern const QString armArmpitToElbow_M; // L09 -extern const QString armElbowToWristInside_M; // L10 -extern const QString armUpperCirc_M; // L11 -extern const QString armAboveElbowCirc_M; // L12 -extern const QString armElbowCirc_M; // L13 -extern const QString armLowerCirc_M; // L14 -extern const QString armWristCirc_M; // L15 -extern const QString armShoulderTipToArmfoldLine_M; // L16 -extern const QString armNeckSideToWrist_M; // L17 -extern const QString armNeckSideToFingerTip_M; // L18 -extern const QString armscyeCirc_M; // L19 -extern const QString armscyeLength_M; // L20 -extern const QString armscyeWidth_M; // L21 -extern const QString armNeckSideToOuterElbow_M; // L22 -// M -extern const QString legCrotchToFloor_M; // M01 -extern const QString legWaistSideToFloor_M; // M02 -extern const QString legThighUpperCirc_M; // M03 -extern const QString legThighMidCirc_M; // M04 -extern const QString legKneeCirc_M; // M05 -extern const QString legKneeSmallCirc_M; // M06 -extern const QString legCalfCirc_M; // M07 -extern const QString legAnkleHighCirc_M; // M08 -extern const QString legAnkleCirc_M; // M09 -extern const QString legKneeCircBent_M; // M10 -extern const QString legAnkleDiagCirc_M; // M11 -extern const QString legCrotchToAnkle_M; // M12 -extern const QString legWaistSideToAnkle_M; // M13 -extern const QString legWaistSideToKnee_M; // M14 -// N -extern const QString crotchLength_M; // N01 -extern const QString crotchLengthB_M; // N02 -extern const QString crotchLengthF_M; // N03 -extern const QString riseLengthSideSitting_M; // N04 -extern const QString riseLengthDiag_M; // N05 -extern const QString riseLengthB_M; // N06 -extern const QString riseLengthF_M; // N07 -extern const QString riseLengthSide_M; // N08 -// O -extern const QString neckBackToWaistFront_M; // O01 -extern const QString waistToWaistHalter_M; // O02 -extern const QString waistNaturalCirc_M; // O03 -extern const QString waistNaturalArcF_M; // O04 -extern const QString waistNaturalArcB_M; // O05 -extern const QString waistToNaturalWaistF_M; // O06 -extern const QString waistToNaturalWaistB_M; // O07 -extern const QString armNeckBackToElbowBent_M; // O08 -extern const QString armNeckBackToWristBent_M; // O09 -extern const QString armNeckSideToElbowBent_M; // O10 -extern const QString armNeckSideToWristBent_M; // O11 -extern const QString armAcrossBackCenterToElbowBent_M; // O12 -extern const QString armAcrossBackCenterToWristBent_M; // O13 -extern const QString armArmscyeBackCenterToWristBent_M; // O14 -// P -extern const QString neckBackToBustFront_M; // P01 -extern const QString neckBackToArmfoldFront_M; // P02 -extern const QString neckBackToArmfoldFrontToWaistSide_M; // P03 -extern const QString highbustBackOverShoulderToArmfoldFront_M; // P04 -extern const QString highbustBackOverShoulderToWaistFront_M; // P05 -extern const QString neckBackToArmfoldFrontToNeckBack_M; // P06 -extern const QString acrossBackCenterToArmfoldFrontToAcrossBackCenter_M; // P07 -extern const QString neckBackToArmfoldFrontToHighbustBack_M; // P08 -extern const QString armfoldToArmfoldBust_M; // P09 -extern const QString armfoldToBustFront_M; // P10 -extern const QString highbustBOverShoulderToHighbustF_M; // P11 -extern const QString armscyeArc_M; // P12 -// Q -extern const QString dartWidthShoulder_M; // Q01 -extern const QString dartWidthBust_M; // Q02 -extern const QString dartWidthWaist_M; // Q03 - -QStringList ListGroupA(); -QStringList ListGroupB(); -QStringList ListGroupC(); -QStringList ListGroupD(); -QStringList ListGroupE(); -QStringList ListGroupF(); -QStringList ListGroupG(); -QStringList ListGroupH(); -QStringList ListGroupI(); -QStringList ListGroupJ(); -QStringList ListGroupK(); -QStringList ListGroupL(); -QStringList ListGroupM(); -QStringList ListGroupN(); -QStringList ListGroupO(); -QStringList ListGroupP(); -QStringList ListGroupQ(); - -QStringList ListNumbers(const VTranslateMeasurements *trM, const QStringList & listMeasurements); -QString MapDiagrams(const VTranslateMeasurements *trM, const QString &number); - -// pattern making systems codes -extern const QString p0_S; -extern const QString p1_S; -extern const QString p2_S; -extern const QString p3_S; -extern const QString p4_S; -extern const QString p5_S; -extern const QString p6_S; -extern const QString p7_S; -extern const QString p8_S; -extern const QString p9_S; -extern const QString p10_S; -extern const QString p11_S; -extern const QString p12_S; -extern const QString p13_S; -extern const QString p14_S; -extern const QString p15_S; -extern const QString p16_S; -extern const QString p17_S; -extern const QString p18_S; -extern const QString p19_S; -extern const QString p20_S; -extern const QString p21_S; -extern const QString p22_S; -extern const QString p23_S; -extern const QString p24_S; -extern const QString p25_S; -extern const QString p26_S; -extern const QString p27_S; -extern const QString p28_S; -extern const QString p29_S; -extern const QString p30_S; -extern const QString p31_S; -extern const QString p32_S; -extern const QString p33_S; -extern const QString p34_S; -extern const QString p35_S; -extern const QString p36_S; -extern const QString p37_S; -extern const QString p38_S; -extern const QString p39_S; -extern const QString p40_S; -extern const QString p41_S; -extern const QString p42_S; -extern const QString p43_S; -extern const QString p44_S; -extern const QString p45_S; -extern const QString p46_S; -extern const QString p47_S; -extern const QString p48_S; -extern const QString p49_S; -extern const QString p50_S; -extern const QString p51_S; -extern const QString p52_S; -extern const QString p53_S; -extern const QString p54_S; -extern const QString p998_S; - -QStringList ListPMSystems(); -void InitPMSystems(QComboBox *systemCombo); - // functions extern const QString degTorad_F; extern const QString radTodeg_F; @@ -717,7 +372,6 @@ void CheckFactor(qreal &oldFactor, const qreal &Newfactor); void InitLanguages(QComboBox *combobox); QStringList SupportedLocales() Q_REQUIRED_RESULT; -QStringList AllGroupNames() Q_REQUIRED_RESULT; QString StrippedName(const QString &fullFileName) Q_REQUIRED_RESULT; QString RelativeMPath(const QString &patternPath, const QString &absoluteMPath) Q_REQUIRED_RESULT; diff --git a/src/libs/vmisc/vcommonsettings.cpp b/src/libs/vmisc/vcommonsettings.cpp index 83f0a6073..6e583c687 100644 --- a/src/libs/vmisc/vcommonsettings.cpp +++ b/src/libs/vmisc/vcommonsettings.cpp @@ -42,6 +42,7 @@ #include "../vmisc/def.h" #include "../vmisc/vmath.h" +#include "../vpatterndb/pmsystems.h" const QString settingPathsIndividualMeasurements = QStringLiteral("paths/individual_measurements"); const QString settingPathsStandardMeasurements = QStringLiteral("paths/standard_measurements"); @@ -367,7 +368,7 @@ void VCommonSettings::SetLocale(const QString &value) //--------------------------------------------------------------------------------------------------------------------- QString VCommonSettings::GetPMSystemCode() const { - return value(settingPMSystemCode, p0_S).toString(); + return value(settingPMSystemCode, "p998").toString(); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vmisc/vmisc.pri b/src/libs/vmisc/vmisc.pri index 0809c8f24..40a07b8c2 100644 --- a/src/libs/vmisc/vmisc.pri +++ b/src/libs/vmisc/vmisc.pri @@ -12,7 +12,6 @@ SOURCES += \ $$PWD/commandoptions.cpp \ $$PWD/qxtcsvmodel.cpp \ $$PWD/vtablesearch.cpp \ - $$PWD/abstracttest.cpp \ $$PWD/dialogs/dialogexporttocsv.cpp win32-msvc*:SOURCES += $$PWD/stable.cpp @@ -34,7 +33,6 @@ HEADERS += \ $$PWD/commandoptions.h \ $$PWD/qxtcsvmodel.h \ $$PWD/vtablesearch.h \ - $$PWD/abstracttest.h \ $$PWD/diagnostic.h \ $$PWD/dialogs/dialogexporttocsv.h diff --git a/src/libs/vmisc/vmisc.pro b/src/libs/vmisc/vmisc.pro index beeadf2e6..6837861f7 100644 --- a/src/libs/vmisc/vmisc.pro +++ b/src/libs/vmisc/vmisc.pro @@ -15,9 +15,15 @@ TARGET = vmisc # We want to create a library TEMPLATE = lib -CONFIG += \ - staticlib \# Making static library - c++11 # We use C++11 standard +CONFIG += staticlib # Making static library + +# Since Q5.4 available support C++14 +greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) { + CONFIG += c++14 +} else { + # We use C++11 standard + CONFIG += c++11 +} # Use out-of-source builds (shadow builds) CONFIG -= debug_and_release debug_and_release_target diff --git a/src/libs/vpatterndb/measurements.cpp b/src/libs/vpatterndb/measurements.cpp new file mode 100644 index 000000000..26a696fe4 --- /dev/null +++ b/src/libs/vpatterndb/measurements.cpp @@ -0,0 +1,1171 @@ +/************************************************************************ + ** + ** @file + ** @author Roman Telezhynskyi + ** @date 1 6, 2017 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2017 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#include "measurements.h" +#include "vtranslatemeasurements.h" +#include "../vmisc/def.h" + +// Keep synchronize all names with initialization in VTranslateVars class!!!!! +//measurements +// A +const QString height_M = QStringLiteral("height"); // A01 +const QString heightNeckBack_M = QStringLiteral("height_neck_back"); // A02 +const QString heightScapula_M = QStringLiteral("height_scapula"); // A03 +const QString heightArmpit_M = QStringLiteral("height_armpit"); // A04 +const QString heightWaistSide_M = QStringLiteral("height_waist_side"); // A05 +const QString heightHip_M = QStringLiteral("height_hip"); // A06 +const QString heightGlutealFold_M = QStringLiteral("height_gluteal_fold"); // A07 +const QString heightKnee_M = QStringLiteral("height_knee"); // A08 +const QString heightCalf_M = QStringLiteral("height_calf"); // A09 +const QString heightAnkleHigh_M = QStringLiteral("height_ankle_high"); // A10 +const QString heightAnkle_M = QStringLiteral("height_ankle"); // A11 +const QString heightHighhip_M = QStringLiteral("height_highhip"); // A12 +const QString heightWaistFront_M = QStringLiteral("height_waist_front"); // A13 +const QString heightBustpoint_M = QStringLiteral("height_bustpoint"); // A14 +const QString heightShoulderTip_M = QStringLiteral("height_shoulder_tip"); // A15 +const QString heightNeckFront_M = QStringLiteral("height_neck_front"); // A16 +const QString heightNeckSide_M = QStringLiteral("height_neck_side"); // A17 +const QString heightNeckBackToKnee_M = QStringLiteral("height_neck_back_to_knee"); // A18 +const QString heightWaistSideToKnee_M = QStringLiteral("height_waist_side_to_knee"); // A19 +const QString heightWaistSideToHip_M = QStringLiteral("height_waist_side_to_hip"); // A20 +const QString heightKneeToAnkle_M = QStringLiteral("height_knee_to_ankle"); // A21 +const QString heightNeckBackToWaistSide_M = QStringLiteral("height_neck_back_to_waist_side"); // A22 +const QString heightWaistBack_M = QStringLiteral("height_waist_back"); // A23 +// B +const QString widthShoulder_M = QStringLiteral("width_shoulder"); // B01 +const QString widthBust_M = QStringLiteral("width_bust"); // B02 +const QString widthWaist_M = QStringLiteral("width_waist"); // B03 +const QString widthHip_M = QStringLiteral("width_hip"); // B04 +const QString widthAbdomenToHip_M = QStringLiteral("width_abdomen_to_hip"); // B05 +// C +const QString indentNeckBack_M = QStringLiteral("indent_neck_back"); // C01 +const QString indentWaistBack_M = QStringLiteral("indent_waist_back"); // C02 +const QString indentAnkleHigh_M = QStringLiteral("indent_ankle_high"); // C03 +// D +const QString handPalmLength_M = QStringLiteral("hand_palm_length"); // D01 +const QString handLength_M = QStringLiteral("hand_length"); // D02 +const QString handPalmWidth_M = QStringLiteral("hand_palm_width"); // D03 +const QString handPalmCirc_M = QStringLiteral("hand_palm_circ"); // D04 +const QString handCirc_M = QStringLiteral("hand_circ"); // D05 +// E +const QString footWidth_M = QStringLiteral("foot_width"); // E01 +const QString footLength_M = QStringLiteral("foot_length"); // E02 +const QString footCirc_M = QStringLiteral("foot_circ"); // E03 +const QString footInstepCirc_M = QStringLiteral("foot_instep_circ"); // E04 +// F +const QString headCirc_M = QStringLiteral("head_circ"); // F01 +const QString headLength_M = QStringLiteral("head_length"); // F02 +const QString headDepth_M = QStringLiteral("head_depth"); // F03 +const QString headWidth_M = QStringLiteral("head_width"); // F04 +const QString headCrownToNeckBack_M = QStringLiteral("head_crown_to_neck_back"); // F05 +const QString headChinToNeckBack_M = QStringLiteral("head_chin_to_neck_back"); // F06 +// G +const QString neckMidCirc_M = QStringLiteral("neck_mid_circ"); // G01 +const QString neckCirc_M = QStringLiteral("neck_circ"); // G02 +const QString highbustCirc_M = QStringLiteral("highbust_circ"); // G03 +const QString bustCirc_M = QStringLiteral("bust_circ"); // G04 +const QString lowbustCirc_M = QStringLiteral("lowbust_circ"); // G05 +const QString ribCirc_M = QStringLiteral("rib_circ"); // G06 +const QString waistCirc_M = QStringLiteral("waist_circ"); // G07 +const QString highhipCirc_M = QStringLiteral("highhip_circ"); // G08 +const QString hipCirc_M = QStringLiteral("hip_circ"); // G09 +const QString neckArcF_M = QStringLiteral("neck_arc_f"); // G10 +const QString highbustArcF_M = QStringLiteral("highbust_arc_f"); // G11 +const QString bustArcF_M = QStringLiteral("bust_arc_f"); // G12 +const QString lowbustArcF_M = QStringLiteral("lowbust_arc_f"); // G13 +const QString ribArcF_M = QStringLiteral("rib_arc_f"); // G14 +const QString waistArcF_M = QStringLiteral("waist_arc_f"); // G15 +const QString highhipArcF_M = QStringLiteral("highhip_arc_f"); // G16 +const QString hipArcF_M = QStringLiteral("hip_arc_f"); // G17 +const QString neckArcHalfF_M = QStringLiteral("neck_arc_half_f"); // G18 +const QString highbustArcHalfF_M = QStringLiteral("highbust_arc_half_f"); // G19 +const QString bustArcHalfF_M = QStringLiteral("bust_arc_half_f"); // G20 +const QString lowbustArcHalfF_M = QStringLiteral("lowbust_arc_half_f"); // G21 +const QString ribArcHalfF_M = QStringLiteral("rib_arc_half_f"); // G22 +const QString waistArcHalfF_M = QStringLiteral("waist_arc_half_f"); // G23 +const QString highhipArcHalfF_M = QStringLiteral("highhip_arc_half_f"); // G24 +const QString hipArcHalfF_M = QStringLiteral("hip_arc_half_f"); // G25 +const QString neckArcB_M = QStringLiteral("neck_arc_b"); // G26 +const QString highbustArcB_M = QStringLiteral("highbust_arc_b"); // G27 +const QString bustArcB_M = QStringLiteral("bust_arc_b"); // G28 +const QString lowbustArcB_M = QStringLiteral("lowbust_arc_b"); // G29 +const QString ribArcB_M = QStringLiteral("rib_arc_b"); // G30 +const QString waistArcB_M = QStringLiteral("waist_arc_b"); // G31 +const QString highhipArcB_M = QStringLiteral("highhip_arc_b"); // G32 +const QString hipArcB_M = QStringLiteral("hip_arc_b"); // G33 +const QString neckArcHalfB_M = QStringLiteral("neck_arc_half_b"); // G34 +const QString highbustArcHalfB_M = QStringLiteral("highbust_arc_half_b"); // G35 +const QString bustArcHalfB_M = QStringLiteral("bust_arc_half_b"); // G36 +const QString lowbustArcHalfB_M = QStringLiteral("lowbust_arc_half_b"); // G37 +const QString ribArcHalfB_M = QStringLiteral("rib_arc_half_b"); // G38 +const QString waistArcHalfB_M = QStringLiteral("waist_arc_half_b"); // G39 +const QString highhipArcHalfB_M = QStringLiteral("highhip_arc_half_b"); // G40 +const QString hipArcHalfB_M = QStringLiteral("hip_arc_half_b"); // G41 +const QString hipWithAbdomenArcF_M = QStringLiteral("hip_with_abdomen_arc_f"); // G42 +const QString bodyArmfoldCirc_M = QStringLiteral("body_armfold_circ"); // G43 +const QString bodyBustCirc_M = QStringLiteral("body_bust_circ"); // G44 +const QString bodyTorsoCirc_M = QStringLiteral("body_torso_circ"); // G45 +const QString hipCircWithAbdomen_M = QStringLiteral("hip_circ_with_abdomen"); // G46 +// H +const QString neckFrontToWaistF_M = QStringLiteral("neck_front_to_waist_f"); // H01 +const QString neckFrontToWaistFlatF_M = QStringLiteral("neck_front_to_waist_flat_f"); // H02 +const QString armpitToWaistSide_M = QStringLiteral("armpit_to_waist_side"); // H03 +const QString shoulderTipToWaistSideF_M = QStringLiteral("shoulder_tip_to_waist_side_f"); // H04 +const QString neckSideToWaistF_M = QStringLiteral("neck_side_to_waist_f"); // H05 +const QString neckSideToWaistBustpointF_M = QStringLiteral("neck_side_to_waist_bustpoint_f"); // H06 +const QString neckFrontToHighbustF_M = QStringLiteral("neck_front_to_highbust_f"); // H07 +const QString highbustToWaistF_M = QStringLiteral("highbust_to_waist_f"); // H08 +const QString neckFrontToBustF_M = QStringLiteral("neck_front_to_bust_f"); // H09 +const QString bustToWaistF_M = QStringLiteral("bust_to_waist_f"); // H10 +const QString lowbustToWaistF_M = QStringLiteral("lowbust_to_waist_f"); // H11 +const QString ribToWaistSide_M = QStringLiteral("rib_to_waist_side"); // H12 +const QString shoulderTipToArmfoldF_M = QStringLiteral("shoulder_tip_to_armfold_f"); // H13 +const QString neckSideToBustF_M = QStringLiteral("neck_side_to_bust_f"); // H14 +const QString neckSideToHighbustF_M = QStringLiteral("neck_side_to_highbust_f"); // H15 +const QString shoulderCenterToHighbustF_M = QStringLiteral("shoulder_center_to_highbust_f"); // H16 +const QString shoulderTipToWaistSideB_M = QStringLiteral("shoulder_tip_to_waist_side_b"); // H17 +const QString neckSideToWaistB_M = QStringLiteral("neck_side_to_waist_b"); // H18 +const QString neckBackToWaistB_M = QStringLiteral("neck_back_to_waist_b"); // H19 +const QString neckSideToWaistScapulaB_M = QStringLiteral("neck_side_to_waist_scapula_b"); // H20 +const QString neckBackToHighbustB_M = QStringLiteral("neck_back_to_highbust_b"); // H21 +const QString highbustToWaistB_M = QStringLiteral("highbust_to_waist_b"); // H22 +const QString neckBackToBustB_M = QStringLiteral("neck_back_to_bust_b"); // H23 +const QString bustToWaistB_M = QStringLiteral("bust_to_waist_b"); // H24 +const QString lowbustToWaistB_M = QStringLiteral("lowbust_to_waist_b"); // H25 +const QString shoulderTipToArmfoldB_M = QStringLiteral("shoulder_tip_to_armfold_b"); // H26 +const QString neckSideToBustB_M = QStringLiteral("neck_side_to_bust_b"); // H27 +const QString neckSideToHighbustB_M = QStringLiteral("neck_side_to_highbust_b"); // H28 +const QString shoulderCenterToHighbustB_M = QStringLiteral("shoulder_center_to_highbust_b"); // H29 +const QString waistToHighhipF_M = QStringLiteral("waist_to_highhip_f"); // H30 +const QString waistToHipF_M = QStringLiteral("waist_to_hip_f"); // H31 +const QString waistToHighhipSide_M = QStringLiteral("waist_to_highhip_side"); // H32 +const QString waistToHighhipB_M = QStringLiteral("waist_to_highhip_b"); // H33 +const QString waistToHipB_M = QStringLiteral("waist_to_hip_b"); // H34 +const QString waistToHipSide_M = QStringLiteral("waist_to_hip_side"); // H35 +const QString shoulderSlopeNeckSideAngle_M = QStringLiteral("shoulder_slope_neck_side_angle"); // H36 +const QString shoulderSlopeNeckSideLength_M = QStringLiteral("shoulder_slope_neck_side_length"); // H37 +const QString shoulderSlopeNeckBackAngle_M = QStringLiteral("shoulder_slope_neck_back_angle"); // H38 +const QString shoulderSlopeNeckBackHeight_M = QStringLiteral("shoulder_slope_neck_back_height"); // H39 +const QString shoulderSlopeShoulderTipAngle_M = QStringLiteral("shoulder_slope_shoulder_tip_angle"); // H40 +const QString neckBackToAcrossBack_M = QStringLiteral("neck_back_to_across_back"); // H41 +const QString acrossBackToWaistB_M = QStringLiteral("across_back_to_waist_b"); // H42 +// I +const QString shoulderLength_M = QStringLiteral("shoulder_length"); // I01 +const QString shoulderTipToShoulderTipF_M = QStringLiteral("shoulder_tip_to_shoulder_tip_f"); // I02 +const QString acrossChestF_M = QStringLiteral("across_chest_f"); // I03 +const QString armfoldToArmfoldF_M = QStringLiteral("armfold_to_armfold_f"); // I04 +const QString shoulderTipToShoulderTipHalfF_M = QStringLiteral("shoulder_tip_to_shoulder_tip_half_f"); // I05 +const QString acrossChestHalfF_M = QStringLiteral("across_chest_half_f"); // I06 +const QString shoulderTipToShoulderTipB_M = QStringLiteral("shoulder_tip_to_shoulder_tip_b"); // I07 +const QString acrossBackB_M = QStringLiteral("across_back_b"); // I08 +const QString armfoldToArmfoldB_M = QStringLiteral("armfold_to_armfold_b"); // I09 +const QString shoulderTipToShoulderTipHalfB_M = QStringLiteral("shoulder_tip_to_shoulder_tip_half_b"); // I10 +const QString acrossBackHalfB_M = QStringLiteral("across_back_half_b"); // I11 +const QString neckFrontToShoulderTipF_M = QStringLiteral("neck_front_to_shoulder_tip_f"); // I12 +const QString neckBackToShoulderTipB_M = QStringLiteral("neck_back_to_shoulder_tip_b"); // I13 +const QString neckWidth_M = QStringLiteral("neck_width"); // I14 +// J +const QString bustpointToBustpoint_M = QStringLiteral("bustpoint_to_bustpoint"); // J01 +const QString bustpointToNeckSide_M = QStringLiteral("bustpoint_to_neck_side"); // J02 +const QString bustpointToLowbust_M = QStringLiteral("bustpoint_to_lowbust"); // J03 +const QString bustpointToWaist_M = QStringLiteral("bustpoint_to_waist"); // J04 +const QString bustpointToBustpointHalf_M = QStringLiteral("bustpoint_to_bustpoint_half"); // J05 +const QString bustpointNeckSideToWaist_M = QStringLiteral("bustpoint_neck_side_to_waist"); // J06 +const QString bustpointToShoulderTip_M = QStringLiteral("bustpoint_to_shoulder_tip"); // J07 +const QString bustpointToWaistFront_M = QStringLiteral("bustpoint_to_waist_front"); // J08 +const QString bustpointToBustpointHalter_M = QStringLiteral("bustpoint_to_bustpoint_halter"); // J09 +const QString bustpointToShoulderCenter_M = QStringLiteral("bustpoint_to_shoulder_center"); // J10 +// K +const QString shoulderTipToWaistFront_M = QStringLiteral("shoulder_tip_to_waist_front"); // K01 +const QString neckFrontToWaistSide_M = QStringLiteral("neck_front_to_waist_side"); // K02 +const QString neckSideToWaistSideF_M = QStringLiteral("neck_side_to_waist_side_f"); // K03 +const QString shoulderTipToWaistBack_M = QStringLiteral("shoulder_tip_to_waist_back"); // K04 +const QString shoulderTipToWaistB_1inOffset_M = QStringLiteral("shoulder_tip_to_waist_b_1in_offset"); // K05 +const QString neckBackToWaistSide_M = QStringLiteral("neck_back_to_waist_side"); // K06 +const QString neckSideToWaistSideB_M = QStringLiteral("neck_side_to_waist_side_b"); // K07 +const QString neckSideToArmfoldF_M = QStringLiteral("neck_side_to_armfold_f"); // K08 +const QString neckSideToArmpitF_M = QStringLiteral("neck_side_to_armpit_f"); // K09 +const QString neckSideToBustSideF_M = QStringLiteral("neck_side_to_bust_side_f"); // K10 +const QString neckSideToArmfoldB_M = QStringLiteral("neck_side_to_armfold_b"); // K11 +const QString neckSideToArmpitB_M = QStringLiteral("neck_side_to_armpit_b"); // K12 +const QString neckSideToBustSideB_M = QStringLiteral("neck_side_to_bust_side_b"); // K13 +// L +const QString armShoulderTipToWristBent_M = QStringLiteral("arm_shoulder_tip_to_wrist_bent"); // L01 +const QString armShoulderTipToElbowBent_M = QStringLiteral("arm_shoulder_tip_to_elbow_bent"); // L02 +const QString armElbowToWristBent_M = QStringLiteral("arm_elbow_to_wrist_bent"); // L03 +const QString armElbowCircBent_M = QStringLiteral("arm_elbow_circ_bent"); // L04 +const QString armShoulderTipToWrist_M = QStringLiteral("arm_shoulder_tip_to_wrist"); // L05 +const QString armShoulderTipToElbow_M = QStringLiteral("arm_shoulder_tip_to_elbow"); // L06 +const QString armElbowToWrist_M = QStringLiteral("arm_elbow_to_wrist"); // L07 +const QString armArmpitToWrist_M = QStringLiteral("arm_armpit_to_wrist"); // L08 +const QString armArmpitToElbow_M = QStringLiteral("arm_armpit_to_elbow"); // L09 +const QString armElbowToWristInside_M = QStringLiteral("arm_elbow_to_wrist_inside"); // L10 +const QString armUpperCirc_M = QStringLiteral("arm_upper_circ"); // L11 +const QString armAboveElbowCirc_M = QStringLiteral("arm_above_elbow_circ"); // L12 +const QString armElbowCirc_M = QStringLiteral("arm_elbow_circ"); // L13 +const QString armLowerCirc_M = QStringLiteral("arm_lower_circ"); // L14 +const QString armWristCirc_M = QStringLiteral("arm_wrist_circ"); // L15 +const QString armShoulderTipToArmfoldLine_M = QStringLiteral("arm_shoulder_tip_to_armfold_line"); // L16 +const QString armNeckSideToWrist_M = QStringLiteral("arm_neck_side_to_wrist"); // L17 +const QString armNeckSideToFingerTip_M = QStringLiteral("arm_neck_side_to_finger_tip"); // L18 +const QString armscyeCirc_M = QStringLiteral("armscye_circ"); // L19 +const QString armscyeLength_M = QStringLiteral("armscye_length"); // L20 +const QString armscyeWidth_M = QStringLiteral("armscye_width"); // L21 +const QString armNeckSideToOuterElbow_M = QStringLiteral("arm_neck_side_to_outer_elbow"); // L22 +// M +const QString legCrotchToFloor_M = QStringLiteral("leg_crotch_to_floor"); // M01 +const QString legWaistSideToFloor_M = QStringLiteral("leg_waist_side_to_floor"); // M02 +const QString legThighUpperCirc_M = QStringLiteral("leg_thigh_upper_circ"); // M03 +const QString legThighMidCirc_M = QStringLiteral("leg_thigh_mid_circ"); // M04 +const QString legKneeCirc_M = QStringLiteral("leg_knee_circ"); // M05 +const QString legKneeSmallCirc_M = QStringLiteral("leg_knee_small_circ"); // M06 +const QString legCalfCirc_M = QStringLiteral("leg_calf_circ"); // M07 +const QString legAnkleHighCirc_M = QStringLiteral("leg_ankle_high_circ"); // M08 +const QString legAnkleCirc_M = QStringLiteral("leg_ankle_circ"); // M09 +const QString legKneeCircBent_M = QStringLiteral("leg_knee_circ_bent"); // M10 +const QString legAnkleDiagCirc_M = QStringLiteral("leg_ankle_diag_circ"); // M11 +const QString legCrotchToAnkle_M = QStringLiteral("leg_crotch_to_ankle"); // M12 +const QString legWaistSideToAnkle_M = QStringLiteral("leg_waist_side_to_ankle"); // M13 +const QString legWaistSideToKnee_M = QStringLiteral("leg_waist_side_to_knee"); // M14 +// N +const QString crotchLength_M = QStringLiteral("crotch_length"); // N01 +const QString crotchLengthB_M = QStringLiteral("crotch_length_b"); // N02 +const QString crotchLengthF_M = QStringLiteral("crotch_length_f"); // N03 +const QString riseLengthSideSitting_M = QStringLiteral("rise_length_side_sitting"); // N04 +const QString riseLengthDiag_M = QStringLiteral("rise_length_diag"); // N05 +const QString riseLengthB_M = QStringLiteral("rise_length_b"); // N06 +const QString riseLengthF_M = QStringLiteral("rise_length_f"); // N07 +const QString riseLengthSide_M = QStringLiteral("rise_length_side"); // N08 +// O +const QString neckBackToWaistFront_M = QStringLiteral("neck_back_to_waist_front"); // O01 +const QString waistToWaistHalter_M = QStringLiteral("waist_to_waist_halter"); // O02 +const QString waistNaturalCirc_M = QStringLiteral("waist_natural_circ"); // O03 +const QString waistNaturalArcF_M = QStringLiteral("waist_natural_arc_f"); // O04 +const QString waistNaturalArcB_M = QStringLiteral("waist_natural_arc_b"); // O05 +const QString waistToNaturalWaistF_M = QStringLiteral("waist_to_natural_waist_f"); // O06 +const QString waistToNaturalWaistB_M = QStringLiteral("waist_to_natural_waist_b"); // O07 +const QString armNeckBackToElbowBent_M = QStringLiteral("arm_neck_back_to_elbow_bent"); // O08 +const QString armNeckBackToWristBent_M = QStringLiteral("arm_neck_back_to_wrist_bent"); // O09 +const QString armNeckSideToElbowBent_M = QStringLiteral("arm_neck_side_to_elbow_bent"); // O10 +const QString armNeckSideToWristBent_M = QStringLiteral("arm_neck_side_to_wrist_bent"); // O11 +const QString armAcrossBackCenterToElbowBent_M = QStringLiteral("arm_across_back_center_to_elbow_bent"); // O12 +const QString armAcrossBackCenterToWristBent_M = QStringLiteral("arm_across_back_center_to_wrist_bent"); // O13 +const QString armArmscyeBackCenterToWristBent_M = QStringLiteral("arm_armscye_back_center_to_wrist_bent"); // O14 +// P +const QString neckBackToBustFront_M = QStringLiteral("neck_back_to_bust_front"); // P01 +const QString neckBackToArmfoldFront_M = QStringLiteral("neck_back_to_armfold_front"); // P02 +const QString neckBackToArmfoldFrontToWaistSide_M = QStringLiteral("neck_back_to_armfold_front_to_waist_side"); // P03 +const QString highbustBackOverShoulderToArmfoldFront_M + = QStringLiteral("highbust_back_over_shoulder_to_armfold_front"); // P04 +const QString highbustBackOverShoulderToWaistFront_M + = QStringLiteral("highbust_back_over_shoulder_to_waist_front"); // P05 +const QString neckBackToArmfoldFrontToNeckBack_M = QStringLiteral("neck_back_to_armfold_front_to_neck_back"); // P06 +const QString acrossBackCenterToArmfoldFrontToAcrossBackCenter_M + = QStringLiteral("across_back_center_to_armfold_front_to_across_back_center"); // P07 +const QString neckBackToArmfoldFrontToHighbustBack_M + = QStringLiteral("neck_back_to_armfold_front_to_highbust_back"); // P08 +const QString armfoldToArmfoldBust_M = QStringLiteral("armfold_to_armfold_bust"); // P09 +const QString armfoldToBustFront_M = QStringLiteral("armfold_to_bust_front"); // P10 +const QString highbustBOverShoulderToHighbustF_M = QStringLiteral("highbust_b_over_shoulder_to_highbust_f"); // P11 +const QString armscyeArc_M = QStringLiteral("armscye_arc"); // P12 +// Q +const QString dartWidthShoulder_M = QStringLiteral("dart_width_shoulder"); // Q01 +const QString dartWidthBust_M = QStringLiteral("dart_width_bust"); // Q02 +const QString dartWidthWaist_M = QStringLiteral("dart_width_waist"); // Q03 + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListGroupA() +{ + const QStringList list = QStringList() << height_M // A01 + << heightNeckBack_M // A02 + << heightScapula_M // A03 + << heightArmpit_M // A04 + << heightWaistSide_M // A05 + << heightHip_M // A06 + << heightGlutealFold_M // A07 + << heightKnee_M // A08 + << heightCalf_M // A09 + << heightAnkleHigh_M // A10 + << heightAnkle_M // A11 + << heightHighhip_M // A12 + << heightWaistFront_M // A13 + << heightBustpoint_M // A14 + << heightShoulderTip_M // A15 + << heightNeckFront_M // A16 + << heightNeckSide_M // A17 + << heightNeckBackToKnee_M // A18 + << heightWaistSideToKnee_M // A19 + << heightWaistSideToHip_M // A20 + << heightKneeToAnkle_M // A21 + << heightNeckBackToWaistSide_M // A22 + << heightWaistBack_M; // A23 + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListGroupB() +{ + const QStringList list = QStringList() << widthShoulder_M // B01 + << widthBust_M // B02 + << widthWaist_M // B03 + << widthHip_M // B04 + << widthAbdomenToHip_M; // B05 + + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListGroupC() +{ + const QStringList list = QStringList() << indentNeckBack_M // C01 + << indentWaistBack_M // C02 + << indentAnkleHigh_M; // C03 + + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListGroupD() +{ + const QStringList list = QStringList() << handPalmLength_M // D01 + << handLength_M // D02 + << handPalmWidth_M // D03 + << handPalmCirc_M // D04 + << handCirc_M; // D05 + + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListGroupE() +{ + const QStringList list = QStringList() << footWidth_M // E01 + << footLength_M // E02 + << footCirc_M // E03 + << footInstepCirc_M; // E04 + + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListGroupF() +{ + const QStringList list = QStringList() << headCirc_M // F01 + << headLength_M // F02 + << headDepth_M // F03 + << headWidth_M // F04 + << headCrownToNeckBack_M // F05 + << headChinToNeckBack_M; // F06 + + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListGroupG() +{ + const QStringList list = QStringList() << neckMidCirc_M // G01 + << neckCirc_M // G02 + << highbustCirc_M // G03 + << bustCirc_M // G04 + << lowbustCirc_M // G05 + << ribCirc_M // G06 + << waistCirc_M // G07 + << highhipCirc_M // G08 + << hipCirc_M // G09 + << neckArcF_M // G10 + << highbustArcF_M // G11 + << bustArcF_M // G12 + << lowbustArcF_M // G13 + << ribArcF_M // G14 + << waistArcF_M // G15 + << highhipArcF_M // G16 + << hipArcF_M // G17 + << neckArcHalfF_M // G18 + << highbustArcHalfF_M // G19 + << bustArcHalfF_M // G20 + << lowbustArcHalfF_M // G21 + << ribArcHalfF_M // G22 + << waistArcHalfF_M // G23 + << highhipArcHalfF_M // G24 + << hipArcHalfF_M // G25 + << neckArcB_M // G26 + << highbustArcB_M // G27 + << bustArcB_M // G28 + << lowbustArcB_M // G29 + << ribArcB_M // G30 + << waistArcB_M // G31 + << highhipArcB_M // G32 + << hipArcB_M // G33 + << neckArcHalfB_M // G34 + << highbustArcHalfB_M // G35 + << bustArcHalfB_M // G36 + << lowbustArcHalfB_M // G37 + << ribArcHalfB_M // G38 + << waistArcHalfB_M // G39 + << highhipArcHalfB_M // G40 + << hipArcHalfB_M // G41 + << hipWithAbdomenArcF_M // G42 + << bodyArmfoldCirc_M // G43 + << bodyBustCirc_M // G44 + << bodyTorsoCirc_M // G45 + << hipCircWithAbdomen_M; // G46 + + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListGroupH() +{ + const QStringList list = QStringList() << neckFrontToWaistF_M // H01 + << neckFrontToWaistFlatF_M // H02 + << armpitToWaistSide_M // H03 + << shoulderTipToWaistSideF_M // H04 + << neckSideToWaistF_M // H05 + << neckSideToWaistBustpointF_M // H06 + << neckFrontToHighbustF_M // H07 + << highbustToWaistF_M // H08 + << neckFrontToBustF_M // H09 + << bustToWaistF_M // H10 + << lowbustToWaistF_M // H11 + << ribToWaistSide_M // H12 + << shoulderTipToArmfoldF_M // H13 + << neckSideToBustF_M // H14 + << neckSideToHighbustF_M // H15 + << shoulderCenterToHighbustF_M // H16 + << shoulderTipToWaistSideB_M // H17 + << neckSideToWaistB_M // H18 + << neckBackToWaistB_M // H19 + << neckSideToWaistScapulaB_M // H20 + << neckBackToHighbustB_M // H21 + << highbustToWaistB_M // H22 + << neckBackToBustB_M // H23 + << bustToWaistB_M // H24 + << lowbustToWaistB_M // H25 + << shoulderTipToArmfoldB_M // H26 + << neckSideToBustB_M // H27 + << neckSideToHighbustB_M // H28 + << shoulderCenterToHighbustB_M // H29 + << waistToHighhipF_M // H30 + << waistToHipF_M // H31 + << waistToHighhipSide_M // H32 + << waistToHighhipB_M // H33 + << waistToHipB_M // H34 + << waistToHipSide_M // H35 + << shoulderSlopeNeckSideAngle_M // H36 + << shoulderSlopeNeckSideLength_M // H37 + << shoulderSlopeNeckBackAngle_M // H38 + << shoulderSlopeNeckBackHeight_M // H39 + << shoulderSlopeShoulderTipAngle_M // H40 + << neckBackToAcrossBack_M // H41 + << acrossBackToWaistB_M; // H42 + + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListGroupI() +{ + const QStringList list = QStringList() << shoulderLength_M // I01 + << shoulderTipToShoulderTipF_M // I02 + << acrossChestF_M // I03 + << armfoldToArmfoldF_M // I04 + << shoulderTipToShoulderTipHalfF_M // I05 + << acrossChestHalfF_M // I06 + << shoulderTipToShoulderTipB_M // I07 + << acrossBackB_M // I08 + << armfoldToArmfoldB_M // I09 + << shoulderTipToShoulderTipHalfB_M // I10 + << acrossBackHalfB_M // I11 + << neckFrontToShoulderTipF_M // I12 + << neckBackToShoulderTipB_M // I13 + << neckWidth_M; // I14 + + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListGroupJ() +{ + const QStringList list = QStringList() << bustpointToBustpoint_M // J01 + << bustpointToNeckSide_M // J02 + << bustpointToLowbust_M // J03 + << bustpointToWaist_M // J04 + << bustpointToBustpointHalf_M // J05 + << bustpointNeckSideToWaist_M // J06 + << bustpointToShoulderTip_M // J07 + << bustpointToWaistFront_M // J08 + << bustpointToBustpointHalter_M // J09 + << bustpointToShoulderCenter_M; // J10 + + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListGroupK() +{ + const QStringList list = QStringList() << shoulderTipToWaistFront_M // K01 + << neckFrontToWaistSide_M // K02 + << neckSideToWaistSideF_M // K03 + << shoulderTipToWaistBack_M // K04 + << shoulderTipToWaistB_1inOffset_M // K05 + << neckBackToWaistSide_M // K06 + << neckSideToWaistSideB_M // K07 + << neckSideToArmfoldF_M // K08 + << neckSideToArmpitF_M // K09 + << neckSideToBustSideF_M // K10 + << neckSideToArmfoldB_M // K11 + << neckSideToArmpitB_M // K12 + << neckSideToBustSideB_M; // K13 + + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListGroupL() +{ + const QStringList list = QStringList() << armShoulderTipToWristBent_M // L01 + << armShoulderTipToElbowBent_M // L02 + << armElbowToWristBent_M // L03 + << armElbowCircBent_M // L04 + << armShoulderTipToWrist_M // L05 + << armShoulderTipToElbow_M // L06 + << armElbowToWrist_M // L07 + << armArmpitToWrist_M // L08 + << armArmpitToElbow_M // L09 + << armElbowToWristInside_M // L10 + << armUpperCirc_M // L11 + << armAboveElbowCirc_M // L12 + << armElbowCirc_M // L13 + << armLowerCirc_M // L14 + << armWristCirc_M // L15 + << armShoulderTipToArmfoldLine_M // L16 + << armNeckSideToWrist_M // L17 + << armNeckSideToFingerTip_M // L18 + << armscyeCirc_M // L19 + << armscyeLength_M // L20 + << armscyeWidth_M // L21 + << armNeckSideToOuterElbow_M; // L22 + + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListGroupM() +{ + const QStringList list = QStringList() << legCrotchToFloor_M // M01 + << legWaistSideToFloor_M // M02 + << legThighUpperCirc_M // M03 + << legThighMidCirc_M // M04 + << legKneeCirc_M // M05 + << legKneeSmallCirc_M // M06 + << legCalfCirc_M // M07 + << legAnkleHighCirc_M // M08 + << legAnkleCirc_M // M09 + << legKneeCircBent_M // M10 + << legAnkleDiagCirc_M // M11 + << legCrotchToAnkle_M // M12 + << legWaistSideToAnkle_M // M13 + << legWaistSideToKnee_M; // M14 + + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListGroupN() +{ + const QStringList list = QStringList() << crotchLength_M // N01 + << crotchLengthB_M // N02 + << crotchLengthF_M // N03 + << riseLengthSideSitting_M // N04 + << riseLengthDiag_M // N05 + << riseLengthB_M // N06 + << riseLengthF_M // N07 + << riseLengthSide_M; // N08 + + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListGroupO() +{ + const QStringList list = QStringList() << neckBackToWaistFront_M // O01 + << waistToWaistHalter_M // O02 + << waistNaturalCirc_M // O03 + << waistNaturalArcF_M // O04 + << waistNaturalArcB_M // O05 + << waistToNaturalWaistF_M // O06 + << waistToNaturalWaistB_M // O07 + << armNeckBackToElbowBent_M // O08 + << armNeckBackToWristBent_M // O09 + << armNeckSideToElbowBent_M // O10 + << armNeckSideToWristBent_M // O11 + << armAcrossBackCenterToElbowBent_M // O12 + << armAcrossBackCenterToWristBent_M // O13 + << armArmscyeBackCenterToWristBent_M; // O14 + + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListGroupP() +{ + const QStringList list = QStringList() << neckBackToBustFront_M // P01 + << neckBackToArmfoldFront_M // P02 + << neckBackToArmfoldFrontToWaistSide_M // P03 + << highbustBackOverShoulderToArmfoldFront_M // P04 + << highbustBackOverShoulderToWaistFront_M // P05 + << neckBackToArmfoldFrontToNeckBack_M // P06 + << acrossBackCenterToArmfoldFrontToAcrossBackCenter_M // P07 + << neckBackToArmfoldFrontToHighbustBack_M // P08 + << armfoldToArmfoldBust_M // P09 + << armfoldToBustFront_M // P10 + << highbustBOverShoulderToHighbustF_M // P11 + << armscyeArc_M; // P12 + + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListGroupQ() +{ + const QStringList list = QStringList() << dartWidthShoulder_M // Q01 + << dartWidthBust_M // Q02 + << dartWidthWaist_M; // Q03 + + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListNumbers(const VTranslateMeasurements *trM, const QStringList &listMeasurements) +{ + SCASSERT(trM != nullptr) + + QStringList numbers; + for (int i=0; i < listMeasurements.size(); ++i) + { + numbers.append(trM->MNumber(listMeasurements.at(i))); + } + return numbers; +} + +//--------------------------------------------------------------------------------------------------------------------- +QString MapDiagrams(const VTranslateMeasurements *trM, const QString &number) +{ + switch (ListNumbers(trM, ListGroupA()).indexOf(number)) + { + // A + case 0: // A01 + case 1: // A02 + case 2: // A03 + case 3: // A04 + case 4: // A05 + case 5: // A06 + case 6: // A07 + case 7: // A08 + case 8: // A09 + case 9: // A10 + case 10: // A11 + case 11: // A12 + case 12: // A13 + case 13: // A14 + case 14: // A15 + case 15: // A16 + case 16: // A17 + return QStringLiteral("Ap1"); + case 17: // A18 + case 18: // A19 + case 19: // A20 + case 20: // A21 + case 21: // A22 + case 22: // A23 + return QStringLiteral("Ap2"); + default: + break; + } + + switch (ListNumbers(trM, ListGroupB()).indexOf(number)) + { + // B + case 0: // B01 + case 1: // B02 + case 2: // B03 + case 3: // B04 + return QStringLiteral("Bp1"); + case 4: // B05 + return QStringLiteral("Bp2"); + default: + break; + } + + switch (ListNumbers(trM, ListGroupC()).indexOf(number)) + { + // C + case 0: // C01 + return QStringLiteral("Cp1"); + case 1: // C02 + case 2: // C03 + return QStringLiteral("Cp2"); + default: + break; + } + + switch (ListNumbers(trM, ListGroupD()).indexOf(number)) + { + // D + case 0: // D01 + case 1: // D02 + case 2: // D03 + return QStringLiteral("Dp1"); + case 3: // D04 + return QStringLiteral("Dp2"); + case 4: // D05 + return QStringLiteral("Dp3"); + default: + break; + } + + switch (ListNumbers(trM, ListGroupE()).indexOf(number)) + { + // E + case 0: // E01 + return QStringLiteral("Ep1"); + case 1: // E02 + case 2: // E03 + case 3: // E04 + return QStringLiteral("Ep2"); + default: + break; + } + + switch (ListNumbers(trM, ListGroupF()).indexOf(number)) + { + // F + case 0: // F01 + case 1: // F02 + case 2: // F03 + return QStringLiteral("Fp1"); + case 3: // F04 + return QStringLiteral("Fp2"); + case 4: // F05 + case 5: // F06 + return QStringLiteral("Fp3"); + default: + break; + } + + switch (ListNumbers(trM, ListGroupG()).indexOf(number)) + { + // G + case 0: // G01 + case 1: // G02 + case 2: // G03 + case 3: // G04 + case 4: // G05 + case 5: // G06 + case 6: // G07 + case 7: // G08 + case 8: // G09 + return QStringLiteral("Gp1"); + case 9: // G10 + case 10: // G11 + case 11: // G12 + case 12: // G13 + case 13: // G14 + case 14: // G15 + case 15: // G16 + case 16: // G17 + return QStringLiteral("Gp2"); + case 17: // G18 + case 18: // G19 + case 19: // G20 + case 20: // G21 + case 21: // G22 + case 22: // G23 + case 23: // G24 + case 24: // G25 + return QStringLiteral("Gp3"); + case 25: // G26 + case 26: // G27 + case 27: // G28 + case 28: // G29 + case 29: // G30 + case 30: // G31 + case 31: // G32 + case 32: // G33 + return QStringLiteral("Gp4"); + case 33: // G34 + case 34: // G35 + case 35: // G36 + case 36: // G37 + case 37: // G38 + case 38: // G39 + case 39: // G40 + case 40: // G41 + return QStringLiteral("Gp5"); + case 41: // G42 + return QStringLiteral("Gp6"); + case 42: // G43 + case 43: // G44 + return QStringLiteral("Gp7"); + case 44: // G45 + return QStringLiteral("Gp8"); + case 45: // G46 + return QStringLiteral("Gp9"); + default: + break; + } + + switch (ListNumbers(trM, ListGroupH()).indexOf(number)) + { + // H + case 0: // H01 + return QStringLiteral("Hp1"); + case 1: // H02 + return QStringLiteral("Hp2"); + case 2: // H03 + case 3: // H04 + case 4: // H05 + case 5: // H06 + return QStringLiteral("Hp3"); + case 6: // H07 + case 7: // H08 + case 8: // H09 + case 9: // H10 + case 10: // H11 + case 11: // H12 + return QStringLiteral("Hp4"); + case 12: // H13 + case 13: // H14 + case 14: // H15 + case 15: // H16 + return QStringLiteral("Hp5"); + case 16: // H17 + case 17: // H18 + case 18: // H19 + case 19: // H20 + return QStringLiteral("Hp6"); + case 20: // H21 + case 21: // H22 + case 22: // H23 + case 23: // H24 + case 24: // H25 + return QStringLiteral("Hp7"); + case 25: // H26 + case 26: // H27 + case 27: // H28 + case 28: // H29 + return QStringLiteral("Hp8"); + case 29: // H30 + case 30: // H31 + case 31: // H32 + return QStringLiteral("Hp9"); + case 32: // H33 + case 33: // H34 + case 34: // H35 + return QStringLiteral("Hp10"); + case 35: // H36 + case 36: // H37 + case 37: // H38 + case 38: // H39 + return QStringLiteral("Hp11"); + case 39: // H40 + return QStringLiteral("Hp12"); + case 40: // H41 + case 41: // H42 + return QStringLiteral("Hp13"); + default: + break; + } + + switch (ListNumbers(trM, ListGroupI()).indexOf(number)) + { + // I + case 0: // I01 + case 1: // I02 + case 2: // I03 + case 3: // I04 + return QStringLiteral("Ip1"); + case 4: // I05 + case 5: // I06 + return QStringLiteral("Ip2"); + case 6: // I07 + case 7: // I08 + case 8: // I09 + return QStringLiteral("Ip3"); + case 9: // I10 + case 10: // I11 + return QStringLiteral("Ip4"); + case 11: // I12 + return QStringLiteral("Ip5"); + case 12: // I13 + return QStringLiteral("Ip6"); + case 13: // I14 + return QStringLiteral("Ip7"); + default: + break; + } + + switch (ListNumbers(trM, ListGroupJ()).indexOf(number)) + { + // J + case 0: // J01 + case 1: // J02 + case 2: // J03 + case 3: // J04 + return QStringLiteral("Jp1"); + case 4: // J05 + return QStringLiteral("Jp2"); + case 5: // J06 + return QStringLiteral("Jp3"); + case 6: // J07 + case 7: // J08 + return QStringLiteral("Jp4"); + case 8: // J09 + return QStringLiteral("Jp5"); + case 9: // J10 + return QStringLiteral("Jp6"); + default: + break; + } + + switch (ListNumbers(trM, ListGroupK()).indexOf(number)) + { + // K + case 0: // K01 + return QStringLiteral("Kp1"); + case 1: // K02 + case 2: // K03 + return QStringLiteral("Kp2"); + case 3: // K04 + return QStringLiteral("Kp3"); + case 4: // K05 + return QStringLiteral("Kp4"); + case 5: // K06 + case 6: // K07 + return QStringLiteral("Kp5"); + case 7: // K08 + return QStringLiteral("Kp6"); + case 8: // K09 + return QStringLiteral("Kp7"); + case 9: // K10 + return QStringLiteral("Kp8"); + case 10: // K11 + return QStringLiteral("Kp9"); + case 11: // K12 + return QStringLiteral("Kp10"); + case 12: // K13 + return QStringLiteral("Kp11"); + default: + break; + } + + switch (ListNumbers(trM, ListGroupL()).indexOf(number)) + { + // L + case 0: // L01 + case 1: // L02 + case 2: // L03 + case 3: // L04 + return QStringLiteral("Lp1"); + case 4: // L05 + case 5: // L06 + case 6: // L07 + return QStringLiteral("Lp2"); + case 7: // L08 + case 8: // L09 + case 9: // L10 + return QStringLiteral("Lp3"); + case 10: // L11 + case 11: // L12 + case 12: // L13 + case 13: // L14 + case 14: // L15 + return QStringLiteral("Lp4"); + case 15: // L16 + return QStringLiteral("Lp5"); + case 16: // L17 + return QStringLiteral("Lp6"); + case 17: // L18 + return QStringLiteral("Lp7"); + case 18: // L19 + case 19: // L20 + return QStringLiteral("Lp8"); + case 20: // L21 + return QStringLiteral("Lp9"); + case 21: // L22 + return QStringLiteral("Lp10"); + default: + break; + } + + switch (ListNumbers(trM, ListGroupM()).indexOf(number)) + { + // M + case 0: // M01 + case 1: // M02 + return QStringLiteral("Mp1"); + case 2: // M03 + case 3: // M04 + case 4: // M05 + case 5: // M06 + case 6: // M07 + case 7: // M08 + case 8: // M09 + case 9: // M10 + case 10: // M11 + return QStringLiteral("Mp2"); + case 11: // M12 + case 12: // M13 + case 13: // M14 + return QStringLiteral("Mp3"); + default: + break; + } + + switch (ListNumbers(trM, ListGroupN()).indexOf(number)) + { + // N + case 0: // N01 + return QStringLiteral("Np1"); + case 1: // N02 + case 2: // N03 + return QStringLiteral("Np2"); + case 3: // N04 + case 4: // N05 + return QStringLiteral("Np3"); + case 5: // N06 + case 6: // N07 + return QStringLiteral("Np4"); + case 7: // N08 + return QStringLiteral("Np5"); + default: + break; + } + + switch (ListNumbers(trM, ListGroupO()).indexOf(number)) + { + // O + case 0: // O01 + return QStringLiteral("Op1"); + case 1: // O02 + return QStringLiteral("Op2"); + case 2: // O03 + return QStringLiteral("Op3"); + case 3: // O04 + return QStringLiteral("Op4"); + case 4: // O05 + return QStringLiteral("Op5"); + case 5: // O06 + return QStringLiteral("Op6"); + case 6: // O07 + return QStringLiteral("Op7"); + case 7: // O08 + case 8: // O09 + return QStringLiteral("Op8"); + case 9: // O10 + case 10: // O11 + return QStringLiteral("Op9"); + case 11: // O12 + case 12: // O13 + return QStringLiteral("Op10"); + case 13: // O14 + return QStringLiteral("Op11"); + default: + break; + } + + switch (ListNumbers(trM, ListGroupP()).indexOf(number)) + { + // P + case 0: // P01 + return QStringLiteral("Pp1"); + case 1: // P02 + return QStringLiteral("Pp2"); + case 2: // P03 + return QStringLiteral("Pp3"); + case 3: // P04 + return QStringLiteral("Pp4"); + case 4: // P05 + return QStringLiteral("Pp5"); + case 5: // P06 + return QStringLiteral("Pp6"); + case 6: // P07 + return QStringLiteral("Pp7"); + case 7: // P08 + return QStringLiteral("Pp8"); + case 8: // P09 + return QStringLiteral("Pp9"); + case 9: // P10 + return QStringLiteral("Pp10"); + case 10: // P11 + return QStringLiteral("Pp11"); + case 11: // P12 + return QStringLiteral("Pp12"); + default: + break; + } + + switch (ListNumbers(trM, ListGroupQ()).indexOf(number)) + { + // Q + case 0: // Q01 + return QStringLiteral("Qp1"); + case 1: // Q02 + return QStringLiteral("Qp2"); + case 2: // Q03 + return QStringLiteral("Qp3"); + default: + break; + } + + return QString(); +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList AllGroupNames() +{ + const QStringList originalNames = QStringList() << ListGroupA() + << ListGroupB() + << ListGroupC() + << ListGroupD() + << ListGroupE() + << ListGroupF() + << ListGroupG() + << ListGroupH() + << ListGroupI() + << ListGroupJ() + << ListGroupK() + << ListGroupL() + << ListGroupM() + << ListGroupN() + << ListGroupO() + << ListGroupP() + << ListGroupQ(); + + return originalNames; +} diff --git a/src/libs/vpatterndb/measurements.h b/src/libs/vpatterndb/measurements.h new file mode 100644 index 000000000..de97539ff --- /dev/null +++ b/src/libs/vpatterndb/measurements.h @@ -0,0 +1,321 @@ +/************************************************************************ + ** + ** @file + ** @author Roman Telezhynskyi + ** @date 1 6, 2017 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2017 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#ifndef MEASUREMENTS_H +#define MEASUREMENTS_H + +#include + +class VTranslateMeasurements; + +// measurements +// A +extern const QString height_M; // A01 +extern const QString heightNeckBack_M; // A02 +extern const QString heightScapula_M; // A03 +extern const QString heightArmpit_M; // A04 +extern const QString heightWaistSide_M; // A05 +extern const QString heightHip_M; // A06 +extern const QString heightGlutealFold_M; // A07 +extern const QString heightKnee_M; // A08 +extern const QString heightCalf_M; // A09 +extern const QString heightAnkleHigh_M; // A10 +extern const QString heightAnkle_M; // A11 +extern const QString heightHighhip_M; // A12 +extern const QString heightWaistFront_M; // A13 +extern const QString heightBustpoint_M; // A14 +extern const QString heightShoulderTip_M; // A15 +extern const QString heightNeckFront_M; // A16 +extern const QString heightNeckSide_M; // A17 +extern const QString heightNeckBackToKnee_M; // A18 +extern const QString heightWaistSideToKnee_M; // A19 +extern const QString heightWaistSideToHip_M; // A20 +extern const QString heightKneeToAnkle_M; // A21 +extern const QString heightNeckBackToWaistSide_M; // A22 +extern const QString heightWaistBack_M; // A23 +// B +extern const QString widthShoulder_M; // B01 +extern const QString widthBust_M; // B02 +extern const QString widthWaist_M; // B03 +extern const QString widthHip_M; // B04 +extern const QString widthAbdomenToHip_M; // B05 +// C +extern const QString indentNeckBack_M; // C01 +extern const QString indentWaistBack_M; // C02 +extern const QString indentAnkleHigh_M; // C03 +// D +extern const QString handPalmLength_M; // D01 +extern const QString handLength_M; // D02 +extern const QString handPalmWidth_M; // D03 +extern const QString handPalmCirc_M; // D04 +extern const QString handCirc_M; // D05 +// E +extern const QString footWidth_M; // E01 +extern const QString footLength_M; // E02 +extern const QString footCirc_M; // E03 +extern const QString footInstepCirc_M; // E04 +// F +extern const QString headCirc_M; // F01 +extern const QString headLength_M; // F02 +extern const QString headDepth_M; // F03 +extern const QString headWidth_M; // F04 +extern const QString headCrownToNeckBack_M; // F05 +extern const QString headChinToNeckBack_M; // F06 +// G +extern const QString neckMidCirc_M; // G01 +extern const QString neckCirc_M; // G02 +extern const QString highbustCirc_M; // G03 +extern const QString bustCirc_M; // G04 +extern const QString lowbustCirc_M; // G05 +extern const QString ribCirc_M; // G06 +extern const QString waistCirc_M; // G07 +extern const QString highhipCirc_M; // G08 +extern const QString hipCirc_M; // G09 +extern const QString neckArcF_M; // G10 +extern const QString highbustArcF_M; // G11 +extern const QString bustArcF_M; // G12 +extern const QString lowbustArcF_M; // G13 +extern const QString ribArcF_M; // G14 +extern const QString waistArcF_M; // G15 +extern const QString highhipArcF_M; // G16 +extern const QString hipArcF_M; // G17 +extern const QString neckArcHalfF_M; // G18 +extern const QString highbustArcHalfF_M; // G19 +extern const QString bustArcHalfF_M; // G20 +extern const QString lowbustArcHalfF_M; // G21 +extern const QString ribArcHalfF_M; // G22 +extern const QString waistArcHalfF_M; // G23 +extern const QString highhipArcHalfF_M; // G24 +extern const QString hipArcHalfF_M; // G25 +extern const QString neckArcB_M; // G26 +extern const QString highbustArcB_M; // G27 +extern const QString bustArcB_M; // G28 +extern const QString lowbustArcB_M; // G29 +extern const QString ribArcB_M; // G30 +extern const QString waistArcB_M; // G31 +extern const QString highhipArcB_M; // G32 +extern const QString hipArcB_M; // G33 +extern const QString neckArcHalfB_M; // G34 +extern const QString highbustArcHalfB_M; // G35 +extern const QString bustArcHalfB_M; // G36 +extern const QString lowbustArcHalfB_M; // G37 +extern const QString ribArcHalfB_M; // G38 +extern const QString waistArcHalfB_M; // G39 +extern const QString highhipArcHalfB_M; // G40 +extern const QString hipArcHalfB_M; // G41 +extern const QString hipWithAbdomenArcF_M; // G42 +extern const QString bodyArmfoldCirc_M; // G43 +extern const QString bodyBustCirc_M; // G44 +extern const QString bodyTorsoCirc_M; // G45 +extern const QString hipCircWithAbdomen_M; // G46 +// H +extern const QString neckFrontToWaistF_M; // H01 +extern const QString neckFrontToWaistFlatF_M; // H02 +extern const QString armpitToWaistSide_M; // H03 +extern const QString shoulderTipToWaistSideF_M; // H04 +extern const QString neckSideToWaistF_M; // H05 +extern const QString neckSideToWaistBustpointF_M; // H06 +extern const QString neckFrontToHighbustF_M; // H07 +extern const QString highbustToWaistF_M; // H08 +extern const QString neckFrontToBustF_M; // H09 +extern const QString bustToWaistF_M; // H10 +extern const QString lowbustToWaistF_M; // H11 +extern const QString ribToWaistSide_M; // H12 +extern const QString shoulderTipToArmfoldF_M; // H13 +extern const QString neckSideToBustF_M; // H14 +extern const QString neckSideToHighbustF_M; // H15 +extern const QString shoulderCenterToHighbustF_M; // H16 +extern const QString shoulderTipToWaistSideB_M; // H17 +extern const QString neckSideToWaistB_M; // H18 +extern const QString neckBackToWaistB_M; // H19 +extern const QString neckSideToWaistScapulaB_M; // H20 +extern const QString neckBackToHighbustB_M; // H21 +extern const QString highbustToWaistB_M; // H22 +extern const QString neckBackToBustB_M; // H23 +extern const QString bustToWaistB_M; // H24 +extern const QString lowbustToWaistB_M; // H25 +extern const QString shoulderTipToArmfoldB_M; // H26 +extern const QString neckSideToBustB_M; // H27 +extern const QString neckSideToHighbustB_M; // H28 +extern const QString shoulderCenterToHighbustB_M; // H29 +extern const QString waistToHighhipF_M; // H30 +extern const QString waistToHipF_M; // H31 +extern const QString waistToHighhipSide_M; // H32 +extern const QString waistToHighhipB_M; // H33 +extern const QString waistToHipB_M; // H34 +extern const QString waistToHipSide_M; // H35 +extern const QString shoulderSlopeNeckSideAngle_M; // H36 +extern const QString shoulderSlopeNeckSideLength_M; // H37 +extern const QString shoulderSlopeNeckBackAngle_M; // H38 +extern const QString shoulderSlopeNeckBackHeight_M; // H39 +extern const QString shoulderSlopeShoulderTipAngle_M; // H40 +extern const QString neckBackToAcrossBack_M; // H41 +extern const QString acrossBackToWaistB_M; // H42 +// I +extern const QString shoulderLength_M; // I01 +extern const QString shoulderTipToShoulderTipF_M; // I02 +extern const QString acrossChestF_M; // I03 +extern const QString armfoldToArmfoldF_M; // I04 +extern const QString shoulderTipToShoulderTipHalfF_M; // I05 +extern const QString acrossChestHalfF_M; // I06 +extern const QString shoulderTipToShoulderTipB_M; // I07 +extern const QString acrossBackB_M; // I08 +extern const QString armfoldToArmfoldB_M; // I09 +extern const QString shoulderTipToShoulderTipHalfB_M; // I10 +extern const QString acrossBackHalfB_M; // I11 +extern const QString neckFrontToShoulderTipF_M; // I12 +extern const QString neckBackToShoulderTipB_M; // I13 +extern const QString neckWidth_M; // I14 +// J +extern const QString bustpointToBustpoint_M; // J01 +extern const QString bustpointToNeckSide_M; // J02 +extern const QString bustpointToLowbust_M; // J03 +extern const QString bustpointToWaist_M; // J04 +extern const QString bustpointToBustpointHalf_M; // J05 +extern const QString bustpointNeckSideToWaist_M; // J06 +extern const QString bustpointToShoulderTip_M; // J07 +extern const QString bustpointToWaistFront_M; // J08 +extern const QString bustpointToBustpointHalter_M; // J09 +extern const QString bustpointToShoulderCenter_M; // J10 +// K +extern const QString shoulderTipToWaistFront_M; // K01 +extern const QString neckFrontToWaistSide_M; // K02 +extern const QString neckSideToWaistSideF_M; // K03 +extern const QString shoulderTipToWaistBack_M; // K04 +extern const QString shoulderTipToWaistB_1inOffset_M; // K05 +extern const QString neckBackToWaistSide_M; // K06 +extern const QString neckSideToWaistSideB_M; // K07 +extern const QString neckSideToArmfoldF_M; // K08 +extern const QString neckSideToArmpitF_M; // K09 +extern const QString neckSideToBustSideF_M; // K10 +extern const QString neckSideToArmfoldB_M; // K11 +extern const QString neckSideToArmpitB_M; // K12 +extern const QString neckSideToBustSideB_M; // K13 +// L +extern const QString armShoulderTipToWristBent_M; // L01 +extern const QString armShoulderTipToElbowBent_M; // L02 +extern const QString armElbowToWristBent_M; // L03 +extern const QString armElbowCircBent_M; // L04 +extern const QString armShoulderTipToWrist_M; // L05 +extern const QString armShoulderTipToElbow_M; // L06 +extern const QString armElbowToWrist_M; // L07 +extern const QString armArmpitToWrist_M; // L08 +extern const QString armArmpitToElbow_M; // L09 +extern const QString armElbowToWristInside_M; // L10 +extern const QString armUpperCirc_M; // L11 +extern const QString armAboveElbowCirc_M; // L12 +extern const QString armElbowCirc_M; // L13 +extern const QString armLowerCirc_M; // L14 +extern const QString armWristCirc_M; // L15 +extern const QString armShoulderTipToArmfoldLine_M; // L16 +extern const QString armNeckSideToWrist_M; // L17 +extern const QString armNeckSideToFingerTip_M; // L18 +extern const QString armscyeCirc_M; // L19 +extern const QString armscyeLength_M; // L20 +extern const QString armscyeWidth_M; // L21 +extern const QString armNeckSideToOuterElbow_M; // L22 +// M +extern const QString legCrotchToFloor_M; // M01 +extern const QString legWaistSideToFloor_M; // M02 +extern const QString legThighUpperCirc_M; // M03 +extern const QString legThighMidCirc_M; // M04 +extern const QString legKneeCirc_M; // M05 +extern const QString legKneeSmallCirc_M; // M06 +extern const QString legCalfCirc_M; // M07 +extern const QString legAnkleHighCirc_M; // M08 +extern const QString legAnkleCirc_M; // M09 +extern const QString legKneeCircBent_M; // M10 +extern const QString legAnkleDiagCirc_M; // M11 +extern const QString legCrotchToAnkle_M; // M12 +extern const QString legWaistSideToAnkle_M; // M13 +extern const QString legWaistSideToKnee_M; // M14 +// N +extern const QString crotchLength_M; // N01 +extern const QString crotchLengthB_M; // N02 +extern const QString crotchLengthF_M; // N03 +extern const QString riseLengthSideSitting_M; // N04 +extern const QString riseLengthDiag_M; // N05 +extern const QString riseLengthB_M; // N06 +extern const QString riseLengthF_M; // N07 +extern const QString riseLengthSide_M; // N08 +// O +extern const QString neckBackToWaistFront_M; // O01 +extern const QString waistToWaistHalter_M; // O02 +extern const QString waistNaturalCirc_M; // O03 +extern const QString waistNaturalArcF_M; // O04 +extern const QString waistNaturalArcB_M; // O05 +extern const QString waistToNaturalWaistF_M; // O06 +extern const QString waistToNaturalWaistB_M; // O07 +extern const QString armNeckBackToElbowBent_M; // O08 +extern const QString armNeckBackToWristBent_M; // O09 +extern const QString armNeckSideToElbowBent_M; // O10 +extern const QString armNeckSideToWristBent_M; // O11 +extern const QString armAcrossBackCenterToElbowBent_M; // O12 +extern const QString armAcrossBackCenterToWristBent_M; // O13 +extern const QString armArmscyeBackCenterToWristBent_M; // O14 +// P +extern const QString neckBackToBustFront_M; // P01 +extern const QString neckBackToArmfoldFront_M; // P02 +extern const QString neckBackToArmfoldFrontToWaistSide_M; // P03 +extern const QString highbustBackOverShoulderToArmfoldFront_M; // P04 +extern const QString highbustBackOverShoulderToWaistFront_M; // P05 +extern const QString neckBackToArmfoldFrontToNeckBack_M; // P06 +extern const QString acrossBackCenterToArmfoldFrontToAcrossBackCenter_M; // P07 +extern const QString neckBackToArmfoldFrontToHighbustBack_M; // P08 +extern const QString armfoldToArmfoldBust_M; // P09 +extern const QString armfoldToBustFront_M; // P10 +extern const QString highbustBOverShoulderToHighbustF_M; // P11 +extern const QString armscyeArc_M; // P12 +// Q +extern const QString dartWidthShoulder_M; // Q01 +extern const QString dartWidthBust_M; // Q02 +extern const QString dartWidthWaist_M; // Q03 + +QStringList ListGroupA(); +QStringList ListGroupB(); +QStringList ListGroupC(); +QStringList ListGroupD(); +QStringList ListGroupE(); +QStringList ListGroupF(); +QStringList ListGroupG(); +QStringList ListGroupH(); +QStringList ListGroupI(); +QStringList ListGroupJ(); +QStringList ListGroupK(); +QStringList ListGroupL(); +QStringList ListGroupM(); +QStringList ListGroupN(); +QStringList ListGroupO(); +QStringList ListGroupP(); +QStringList ListGroupQ(); + +QStringList ListNumbers(const VTranslateMeasurements *trM, const QStringList & listMeasurements); +QString MapDiagrams(const VTranslateMeasurements *trM, const QString &number); +QStringList AllGroupNames() Q_REQUIRED_RESULT; + +#endif // MEASUREMENTS_H diff --git a/src/libs/vpatterndb/pmsystems.cpp b/src/libs/vpatterndb/pmsystems.cpp new file mode 100644 index 000000000..062ce1f8f --- /dev/null +++ b/src/libs/vpatterndb/pmsystems.cpp @@ -0,0 +1,180 @@ +/************************************************************************ + ** + ** @file + ** @author Roman Telezhynskyi + ** @date 1 6, 2017 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2017 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#include "pmsystems.h" +#include "../vmisc/def.h" +#include "../vmisc/vabstractapplication.h" + +#include + +// pattern making systems codes +const QString p0_S = QStringLiteral("p0"); +const QString p1_S = QStringLiteral("p1"); +const QString p2_S = QStringLiteral("p2"); +const QString p3_S = QStringLiteral("p3"); +const QString p4_S = QStringLiteral("p4"); +const QString p5_S = QStringLiteral("p5"); +const QString p6_S = QStringLiteral("p6"); +const QString p7_S = QStringLiteral("p7"); +const QString p8_S = QStringLiteral("p8"); +const QString p9_S = QStringLiteral("p9"); +const QString p10_S = QStringLiteral("p10"); +const QString p11_S = QStringLiteral("p11"); +const QString p12_S = QStringLiteral("p12"); +const QString p13_S = QStringLiteral("p13"); +const QString p14_S = QStringLiteral("p14"); +const QString p15_S = QStringLiteral("p15"); +const QString p16_S = QStringLiteral("p16"); +const QString p17_S = QStringLiteral("p17"); +const QString p18_S = QStringLiteral("p18"); +const QString p19_S = QStringLiteral("p19"); +const QString p20_S = QStringLiteral("p20"); +const QString p21_S = QStringLiteral("p21"); +const QString p22_S = QStringLiteral("p22"); +const QString p23_S = QStringLiteral("p23"); +const QString p24_S = QStringLiteral("p24"); +const QString p25_S = QStringLiteral("p25"); +const QString p26_S = QStringLiteral("p26"); +const QString p27_S = QStringLiteral("p27"); +const QString p28_S = QStringLiteral("p28"); +const QString p29_S = QStringLiteral("p29"); +const QString p30_S = QStringLiteral("p30"); +const QString p31_S = QStringLiteral("p31"); +const QString p32_S = QStringLiteral("p32"); +const QString p33_S = QStringLiteral("p33"); +const QString p34_S = QStringLiteral("p34"); +const QString p35_S = QStringLiteral("p35"); +const QString p36_S = QStringLiteral("p36"); +const QString p37_S = QStringLiteral("p37"); +const QString p38_S = QStringLiteral("p38"); +const QString p39_S = QStringLiteral("p39"); +const QString p40_S = QStringLiteral("p40"); +const QString p41_S = QStringLiteral("p41"); +const QString p42_S = QStringLiteral("p42"); +const QString p43_S = QStringLiteral("p43"); +const QString p44_S = QStringLiteral("p44"); +const QString p45_S = QStringLiteral("p45"); +const QString p46_S = QStringLiteral("p46"); +const QString p47_S = QStringLiteral("p47"); +const QString p48_S = QStringLiteral("p48"); +const QString p49_S = QStringLiteral("p49"); +const QString p50_S = QStringLiteral("p50"); +const QString p51_S = QStringLiteral("p51"); +const QString p52_S = QStringLiteral("p52"); +const QString p53_S = QStringLiteral("p53"); +const QString p54_S = QStringLiteral("p54"); +const QString p998_S = QStringLiteral("p998"); + +//--------------------------------------------------------------------------------------------------------------------- +QStringList ListPMSystems() +{ + QStringList list; + list << p0_S + << p1_S + << p2_S + << p3_S + << p4_S + << p5_S + << p6_S + << p7_S + << p8_S + << p9_S + << p10_S + << p11_S + << p12_S + << p13_S + << p14_S + << p15_S + << p16_S + << p17_S + << p18_S + << p19_S + << p20_S + << p21_S + << p22_S + << p23_S + << p24_S + << p25_S + << p26_S + << p27_S + << p28_S + << p29_S + << p30_S + << p31_S + << p32_S + << p33_S + << p34_S + << p35_S + << p36_S + << p37_S + << p38_S + << p39_S + << p40_S + << p41_S + << p42_S + << p43_S + << p44_S + << p45_S + << p46_S + << p47_S + << p48_S + << p49_S + << p50_S + << p51_S + << p52_S + << p53_S + << p54_S + << p998_S; + + return list; +} + +//--------------------------------------------------------------------------------------------------------------------- +void InitPMSystems(QComboBox *systemCombo) +{ + const QStringList listSystems = ListPMSystems(); + QMap systems; + for (int i = 0; i < listSystems.size()-1; ++i) + { + systems.insert(qApp->TrVars()->PMSystemName(listSystems.at(i)) + " ("+listSystems.at(i)+")", listSystems.at(i)); + } + +// * The default option (blank field or 'None') should appear at the top of the list. +// * The list should be sorted alphabetically so users can find their system easily. + + SCASSERT(systemCombo != nullptr) + systemCombo->addItem(qApp->TrVars()->PMSystemName(listSystems.at(listSystems.size()-1)), + listSystems.at(listSystems.size()-1)); + + QMap::const_iterator i = systems.constBegin(); + while (i != systems.constEnd()) + { + systemCombo->addItem(i.key(), i.value()); + ++i; + } +} diff --git a/src/libs/vpatterndb/pmsystems.h b/src/libs/vpatterndb/pmsystems.h new file mode 100644 index 000000000..ade3bef18 --- /dev/null +++ b/src/libs/vpatterndb/pmsystems.h @@ -0,0 +1,97 @@ +/************************************************************************ + ** + ** @file + ** @author Roman Telezhynskyi + ** @date 1 6, 2017 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2017 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#ifndef PMSYSTEMS_H +#define PMSYSTEMS_H + +#include + +class QComboBox; + +// pattern making systems codes +extern const QString p0_S; +extern const QString p1_S; +extern const QString p2_S; +extern const QString p3_S; +extern const QString p4_S; +extern const QString p5_S; +extern const QString p6_S; +extern const QString p7_S; +extern const QString p8_S; +extern const QString p9_S; +extern const QString p10_S; +extern const QString p11_S; +extern const QString p12_S; +extern const QString p13_S; +extern const QString p14_S; +extern const QString p15_S; +extern const QString p16_S; +extern const QString p17_S; +extern const QString p18_S; +extern const QString p19_S; +extern const QString p20_S; +extern const QString p21_S; +extern const QString p22_S; +extern const QString p23_S; +extern const QString p24_S; +extern const QString p25_S; +extern const QString p26_S; +extern const QString p27_S; +extern const QString p28_S; +extern const QString p29_S; +extern const QString p30_S; +extern const QString p31_S; +extern const QString p32_S; +extern const QString p33_S; +extern const QString p34_S; +extern const QString p35_S; +extern const QString p36_S; +extern const QString p37_S; +extern const QString p38_S; +extern const QString p39_S; +extern const QString p40_S; +extern const QString p41_S; +extern const QString p42_S; +extern const QString p43_S; +extern const QString p44_S; +extern const QString p45_S; +extern const QString p46_S; +extern const QString p47_S; +extern const QString p48_S; +extern const QString p49_S; +extern const QString p50_S; +extern const QString p51_S; +extern const QString p52_S; +extern const QString p53_S; +extern const QString p54_S; +extern const QString p998_S; + +QStringList ListPMSystems(); +void InitPMSystems(QComboBox *systemCombo); + +#endif // PMSYSTEMS_H diff --git a/src/libs/vpatterndb/vpatterndb.pri b/src/libs/vpatterndb/vpatterndb.pri index ddd66977d..46e4e0fde 100644 --- a/src/libs/vpatterndb/vpatterndb.pri +++ b/src/libs/vpatterndb/vpatterndb.pri @@ -24,7 +24,9 @@ SOURCES += \ $$PWD/floatItemData/vpiecelabeldata.cpp \ $$PWD/floatItemData/vpatternlabeldata.cpp \ $$PWD/floatItemData/vgrainlinedata.cpp \ - $$PWD/floatItemData/vabstractfloatitemdata.cpp + $$PWD/floatItemData/vabstractfloatitemdata.cpp \ + $$PWD/measurements.cpp \ + $$PWD/pmsystems.cpp win32-msvc*:SOURCES += $$PWD/stable.cpp @@ -70,4 +72,6 @@ HEADERS += \ $$PWD/floatItemData/vgrainlinedata_p.h \ $$PWD/floatItemData/floatitemdef.h \ $$PWD/floatItemData/vpatternlabeldata_p.h \ - $$PWD/floatItemData/vpiecelabeldata_p.h + $$PWD/floatItemData/vpiecelabeldata_p.h \ + $$PWD/measurements.h \ + $$PWD/pmsystems.h diff --git a/src/libs/vpatterndb/vtranslatemeasurements.cpp b/src/libs/vpatterndb/vtranslatemeasurements.cpp index 902049217..f1bc8b6ef 100644 --- a/src/libs/vpatterndb/vtranslatemeasurements.cpp +++ b/src/libs/vpatterndb/vtranslatemeasurements.cpp @@ -29,7 +29,7 @@ #include "vtranslatemeasurements.h" #include "../qmuparser/qmutranslation.h" -#include "../vmisc/def.h" +#include "measurements.h" //--------------------------------------------------------------------------------------------------------------------- VTranslateMeasurements::VTranslateMeasurements() diff --git a/src/libs/vpatterndb/vtranslatevars.cpp b/src/libs/vpatterndb/vtranslatevars.cpp index d0cd0a39c..627464819 100644 --- a/src/libs/vpatterndb/vtranslatevars.cpp +++ b/src/libs/vpatterndb/vtranslatevars.cpp @@ -43,6 +43,7 @@ #include "../vmisc/def.h" #include "../vmisc/vabstractapplication.h" #include "vtranslatemeasurements.h" +#include "pmsystems.h" //--------------------------------------------------------------------------------------------------------------------- VTranslateVars::VTranslateVars() diff --git a/src/libs/vmisc/abstracttest.cpp b/src/libs/vtest/abstracttest.cpp similarity index 96% rename from src/libs/vmisc/abstracttest.cpp rename to src/libs/vtest/abstracttest.cpp index 1d7e7b4b3..bff138664 100644 --- a/src/libs/vmisc/abstracttest.cpp +++ b/src/libs/vtest/abstracttest.cpp @@ -49,6 +49,7 @@ #include "logging.h" #include "vsysexits.h" +#include "../vgeometry/vgobject.h" //--------------------------------------------------------------------------------------------------------------------- AbstractTest::AbstractTest(QObject *parent) : @@ -61,14 +62,16 @@ void AbstractTest::Comparison(const QVector &ekv, const QVector + ** @date 10 12, 2014 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013-2015 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +// Build the precompiled headers. +#include "stable.h" diff --git a/src/libs/vtest/stable.h b/src/libs/vtest/stable.h new file mode 100644 index 000000000..c6e229a5d --- /dev/null +++ b/src/libs/vtest/stable.h @@ -0,0 +1,50 @@ +/************************************************************************ + ** + ** @file stable.h + ** @author Roman Telezhynskyi + ** @date 10 12, 2014 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013-2015 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#ifndef STABLE_H +#define STABLE_H + +/* I like to include this pragma too, so the build log indicates if pre-compiled headers were in use. */ +#pragma message("Compiling precompiled headers for VTest library.\n") + +/* Add C includes here */ + +#if defined __cplusplus +/* Add C++ includes here */ + +#ifdef QT_CORE_LIB +#include +#endif + +#ifdef QT_GUI_LIB +# include +#endif + +#endif/*__cplusplus*/ + +#endif // STABLE_H diff --git a/src/libs/vtest/vtest.cpp b/src/libs/vtest/vtest.cpp new file mode 100644 index 000000000..710a7da09 --- /dev/null +++ b/src/libs/vtest/vtest.cpp @@ -0,0 +1,34 @@ +/************************************************************************ + ** + ** @file vtest.cpp + ** @author Roman Telezhynskyi + ** @date 1 6, 2017 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2017 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#include "vtest.h" + + +VTest::VTest() +{ +} diff --git a/src/libs/vtest/vtest.h b/src/libs/vtest/vtest.h new file mode 100644 index 000000000..c941bb0b6 --- /dev/null +++ b/src/libs/vtest/vtest.h @@ -0,0 +1,40 @@ +/************************************************************************ + ** + ** @file vtest.h + ** @author Roman Telezhynskyi + ** @date 1 6, 2017 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2017 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#ifndef VTEST_H +#define VTEST_H + + +class VTest +{ + +public: + VTest(); +}; + +#endif // VTEST_H diff --git a/src/libs/vtest/vtest.pri b/src/libs/vtest/vtest.pri new file mode 100644 index 000000000..471c37137 --- /dev/null +++ b/src/libs/vtest/vtest.pri @@ -0,0 +1,11 @@ +# ADD TO EACH PATH $$PWD VARIABLE!!!!!! +# This need for corect working file translations.pro + +SOURCES += \ + $$PWD/abstracttest.cpp + +win32-msvc*:SOURCES += $$PWD/stable.cpp + +HEADERS += \ + $$PWD/stable.h \ + $$PWD/abstracttest.h diff --git a/src/libs/vtest/vtest.pro b/src/libs/vtest/vtest.pro new file mode 100644 index 000000000..4080aabb1 --- /dev/null +++ b/src/libs/vtest/vtest.pro @@ -0,0 +1,92 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2017-06-01T10:07:06 +# +#------------------------------------------------- + +# File with common stuff for whole project +include(../../../common.pri) + +QT += testlib widgets + +# Name of library +TARGET = vtest + +# We want to create a library +TEMPLATE = lib + +CONFIG += staticlib # Making static library + +# Since Q5.4 available support C++14 +greaterThan(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 3) { + CONFIG += c++14 +} else { + # We use C++11 standard + CONFIG += c++11 +} + +# Use out-of-source builds (shadow builds) +CONFIG -= debug_and_release debug_and_release_target + +# Since Qt 5.4.0 the source code location is recorded only in debug builds. +# We need this information also in release builds. For this need define QT_MESSAGELOGCONTEXT. +DEFINES += QT_MESSAGELOGCONTEXT + +include(vtest.pri) + +# This is static library so no need in "make install" + +# directory for executable file +DESTDIR = bin + +# files created moc +MOC_DIR = moc + +# objecs files +OBJECTS_DIR = obj + +# Set using ccache. Function enable_ccache() defined in common.pri. +$$enable_ccache() + +include(warnings.pri) + +CONFIG(debug, debug|release){ + # Debug mode + #Calculate latest tag distance and build revision only in release mode. Change number each time requare + #recompilation precompiled headers file. + DEFINES += "LATEST_TAG_DISTANCE=0" +}else{ + # Release mode + !win32-msvc*:CONFIG += silent + DEFINES += V_NO_ASSERT + !unix:*-g++{ + QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll + } + + noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols + # do nothing + } else { + !macx:!win32-msvc*{ + # Turn on debug symbols in release mode on Unix systems. + # On Mac OS X temporarily disabled. TODO: find way how to strip binary file. + QMAKE_CXXFLAGS_RELEASE += -g -gdwarf-3 + QMAKE_CFLAGS_RELEASE += -g -gdwarf-3 + QMAKE_LFLAGS_RELEASE = + } + } + + macx{ + HG = /usr/local/bin/hg # Can't defeat PATH variable on Mac OS. + }else { + HG = hg # All other platforms all OK. + } + #latest tag distance number for using in version + HG_DISTANCE=$$system($${HG} log -r. --template '{latesttagdistance}') + isEmpty(HG_DISTANCE){ + HG_DISTANCE = 0 # if we can't find local revision left 0. + } + message("Latest tag distance:" $${HG_DISTANCE}) + DEFINES += "LATEST_TAG_DISTANCE=$${HG_DISTANCE}" # Make available latest tag distance number in sources. +} + +include (../libs.pri) diff --git a/src/libs/vtest/warnings.pri b/src/libs/vtest/warnings.pri new file mode 100644 index 000000000..436c13e29 --- /dev/null +++ b/src/libs/vtest/warnings.pri @@ -0,0 +1,83 @@ +#Turn on compilers warnings. +unix { + *-g++{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } + + noAddressSanitizer{ # For enable run qmake with CONFIG+=noAddressSanitizer + # do nothing + } else { + CONFIG(debug, debug|release){ + # Debug mode + #gcc’s 4.8.0 Address Sanitizer + #http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/ + QMAKE_CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer + QMAKE_CFLAGS += -fsanitize=address -fno-omit-frame-pointer + QMAKE_LFLAGS += -fsanitize=address + } + } + + gccUbsan{ # For enable run qmake with CONFIG+=gccUbsan + CONFIG(debug, debug|release){ + # Debug mode + #gcc’s 4.9.0 Undefined Behavior Sanitizer (ubsan) + QMAKE_CXXFLAGS += -fsanitize=undefined + QMAKE_CFLAGS += -fsanitize=undefined + QMAKE_LFLAGS += -fsanitize=undefined + } + } + + # -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and + # want them in global list. Compromise decision delete them from local list. + QMAKE_CXXFLAGS -= \ + -Wswitch-default + } + + clang*{ + QMAKE_CXXFLAGS += \ + # Key -isystem disable checking errors in system headers. + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } + + # -isystem key works only for headers. In some cases it's not enough. But we can't delete these warnings and + # want them in global list. Compromise decision delete them from local list. + QMAKE_CXXFLAGS -= \ + -Wundefined-reinterpret-cast + } + + *-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } + } +} else { # Windows + *-g++{ + QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -Werror + } + } + + win32-msvc*{ + QMAKE_CXXFLAGS += $$MSVC_DEBUG_CXXFLAGS # See common.pri for more details. + + checkWarnings{ # For enable run qmake with CONFIG+=checkWarnings + QMAKE_CXXFLAGS += -WX + } + } +} diff --git a/src/test/CollectionTest/CollectionTest.pro b/src/test/CollectionTest/CollectionTest.pro index f65abc652..9a6a62de4 100644 --- a/src/test/CollectionTest/CollectionTest.pro +++ b/src/test/CollectionTest/CollectionTest.pro @@ -4,7 +4,7 @@ # #------------------------------------------------- -QT += testlib widgets +QT += testlib widgets printsupport QT -= gui @@ -80,41 +80,68 @@ CONFIG(release, debug|release){ } } -##VTools static library (depend on VWidgets, VMisc, VPatternDB) -#unix|win32: LIBS += -L$$OUT_PWD/../../libs/vtools/$${DESTDIR}/ -lvtools +#VTools static library (depend on VWidgets, VMisc, VPatternDB) +unix|win32: LIBS += -L$$OUT_PWD/../../libs/vtools/$${DESTDIR}/ -lvtools -#INCLUDEPATH += $$PWD/../../libs/vtools -#DEPENDPATH += $$PWD/../../libs/vtools +INCLUDEPATH += $$PWD/../../libs/vtools +DEPENDPATH += $$PWD/../../libs/vtools -#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vtools/$${DESTDIR}/vtools.lib -#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vtools/$${DESTDIR}/libvtools.a +win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vtools/$${DESTDIR}/vtools.lib +else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vtools/$${DESTDIR}/libvtools.a -##VWidgets static library -#unix|win32: LIBS += -L$$OUT_PWD/../../libs/vwidgets/$${DESTDIR}/ -lvwidgets +#VWidgets static library +unix|win32: LIBS += -L$$OUT_PWD/../../libs/vwidgets/$${DESTDIR}/ -lvwidgets -#INCLUDEPATH += $$PWD/../../libs/vwidgets -#DEPENDPATH += $$PWD/../../libs/vwidgets +INCLUDEPATH += $$PWD/../../libs/vwidgets +DEPENDPATH += $$PWD/../../libs/vwidgets -#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vwidgets/$${DESTDIR}/vwidgets.lib -#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vwidgets/$${DESTDIR}/libvwidgets.a +win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vwidgets/$${DESTDIR}/vwidgets.lib +else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vwidgets/$${DESTDIR}/libvwidgets.a -## VFormat static library (depend on VPatternDB, IFC) -#unix|win32: LIBS += -L$$OUT_PWD/../../libs/vformat/$${DESTDIR}/ -lvformat +# VFormat static library (depend on VPatternDB, IFC) +unix|win32: LIBS += -L$$OUT_PWD/../../libs/vformat/$${DESTDIR}/ -lvformat -#INCLUDEPATH += $$PWD/../../libs/vformat -#DEPENDPATH += $$PWD/../../libs/vformat +INCLUDEPATH += $$PWD/../../libs/vformat +DEPENDPATH += $$PWD/../../libs/vformat -#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vformat/$${DESTDIR}/vformat.lib -#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vformat/$${DESTDIR}/libvformat.a +win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vformat/$${DESTDIR}/vformat.lib +else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vformat/$${DESTDIR}/libvformat.a #VPatternDB static library (depend on vgeometry, vmisc, VLayout) -#unix|win32: LIBS += -L$$OUT_PWD/../../libs/vpatterndb/$${DESTDIR} -lvpatterndb +unix|win32: LIBS += -L$$OUT_PWD/../../libs/vpatterndb/$${DESTDIR} -lvpatterndb -#INCLUDEPATH += $$PWD/../../libs/vpatterndb -#DEPENDPATH += $$PWD/../../libs/vpatterndb +INCLUDEPATH += $$PWD/../../libs/vpatterndb +DEPENDPATH += $$PWD/../../libs/vpatterndb -#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vpatterndb/$${DESTDIR}/vpatterndb.lib -#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vpatterndb/$${DESTDIR}/libvpatterndb.a +win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vpatterndb/$${DESTDIR}/vpatterndb.lib +else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vpatterndb/$${DESTDIR}/libvpatterndb.a + +#VTest static library +unix|win32: LIBS += -L$$OUT_PWD/../../libs/vtest/$${DESTDIR} -lvtest + +INCLUDEPATH += $$PWD/../../libs/vtest +DEPENDPATH += $$PWD/../../libs/vtest + +win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vtest/$${DESTDIR}/vtest.lib +else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vtest/$${DESTDIR}/libvtest.a + +# VGeometry static library (depend on ifc) +unix|win32: LIBS += -L$$OUT_PWD/../../libs/vgeometry/$${DESTDIR} -lvgeometry + +INCLUDEPATH += $$PWD/../../libs/vgeometry +DEPENDPATH += $$PWD/../../libs/vgeometry + +win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vgeometry/$${DESTDIR}/vgeometry.lib +else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vgeometry/$${DESTDIR}/libvgeometry.a + +# IFC static library (depend on QMuParser) +unix|win32: LIBS += -L$$OUT_PWD/../../libs/ifc/$${DESTDIR}/ -lifc + +INCLUDEPATH += $$PWD/../../libs/ifc +DEPENDPATH += $$PWD/../../libs/ifc + +win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/ifc/$${DESTDIR}/ifc.lib +else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/ifc/$${DESTDIR}/libifc.a #VMisc static library unix|win32: LIBS += -L$$OUT_PWD/../../libs/vmisc/$${DESTDIR} -lvmisc @@ -125,49 +152,31 @@ DEPENDPATH += $$PWD/../../libs/vmisc win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vmisc/$${DESTDIR}/vmisc.lib else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vmisc/$${DESTDIR}/libvmisc.a -## VGeometry static library (depend on ifc) -#unix|win32: LIBS += -L$$OUT_PWD/../../libs/vgeometry/$${DESTDIR} -lvgeometry +# VLayout static library +unix|win32: LIBS += -L$$OUT_PWD/../../libs/vlayout/$${DESTDIR} -lvlayout -#INCLUDEPATH += $$PWD/../../libs/vgeometry -#DEPENDPATH += $$PWD/../../libs/vgeometry +INCLUDEPATH += $$PWD/../../libs/vlayout +DEPENDPATH += $$PWD/../../libs/vlayout -#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vgeometry/$${DESTDIR}/vgeometry.lib -#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vgeometry/$${DESTDIR}/libvgeometry.a - -# IFC static library (depend on QMuParser) -#unix|win32: LIBS += -L$$OUT_PWD/../../libs/ifc/$${DESTDIR}/ -lifc - -#INCLUDEPATH += $$PWD/../../libs/ifc -#DEPENDPATH += $$PWD/../../libs/ifc - -#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/ifc/$${DESTDIR}/ifc.lib -#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/ifc/$${DESTDIR}/libifc.a - -## VLayout static library -#unix|win32: LIBS += -L$$OUT_PWD/../../libs/vlayout/$${DESTDIR} -lvlayout - -#INCLUDEPATH += $$PWD/../../libs/vlayout -#DEPENDPATH += $$PWD/../../libs/vlayout - -#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vlayout/$${DESTDIR}/vlayout.lib -#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vlayout/$${DESTDIR}/libvlayout.a +win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vlayout/$${DESTDIR}/vlayout.lib +else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vlayout/$${DESTDIR}/libvlayout.a # QMuParser library -#win32:CONFIG(release, debug|release): LIBS += -L$${OUT_PWD}/../../libs/qmuparser/$${DESTDIR} -lqmuparser2 -#else:win32:CONFIG(debug, debug|release): LIBS += -L$${OUT_PWD}/../../libs/qmuparser/$${DESTDIR} -lqmuparser2 -#else:unix: LIBS += -L$${OUT_PWD}/../../libs/qmuparser/$${DESTDIR} -lqmuparser +win32:CONFIG(release, debug|release): LIBS += -L$${OUT_PWD}/../../libs/qmuparser/$${DESTDIR} -lqmuparser2 +else:win32:CONFIG(debug, debug|release): LIBS += -L$${OUT_PWD}/../../libs/qmuparser/$${DESTDIR} -lqmuparser2 +else:unix: LIBS += -L$${OUT_PWD}/../../libs/qmuparser/$${DESTDIR} -lqmuparser -#INCLUDEPATH += $${PWD}/../../libs/qmuparser -#DEPENDPATH += $${PWD}/../../libs/qmuparser +INCLUDEPATH += $${PWD}/../../libs/qmuparser +DEPENDPATH += $${PWD}/../../libs/qmuparser -## Only for adding path to LD_LIBRARY_PATH -## VPropertyExplorer library -#win32:CONFIG(release, debug|release): LIBS += -L$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR} -lvpropertyexplorer -#else:win32:CONFIG(debug, debug|release): LIBS += -L$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR} -lvpropertyexplorer -#else:unix: LIBS += -L$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR} -lvpropertyexplorer +# Only for adding path to LD_LIBRARY_PATH +# VPropertyExplorer library +win32:CONFIG(release, debug|release): LIBS += -L$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR} -lvpropertyexplorer +else:win32:CONFIG(debug, debug|release): LIBS += -L$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR} -lvpropertyexplorer +else:unix: LIBS += -L$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR} -lvpropertyexplorer -#INCLUDEPATH += $${PWD}/../../libs/vpropertyexplorer -#DEPENDPATH += $${PWD}/../../libs/vpropertyexplorer +INCLUDEPATH += $${PWD}/../../libs/vpropertyexplorer +DEPENDPATH += $${PWD}/../../libs/vpropertyexplorer TAPE_TEST_FILES += \ tst_tape/keiko.vit \ diff --git a/src/test/CollectionTest/tst_tapecommandline.cpp b/src/test/CollectionTest/tst_tapecommandline.cpp index 53f616a44..18867d24f 100644 --- a/src/test/CollectionTest/tst_tapecommandline.cpp +++ b/src/test/CollectionTest/tst_tapecommandline.cpp @@ -28,7 +28,7 @@ #include "tst_tapecommandline.h" #include "../vmisc/vsysexits.h" -#include "logging.h" +#include "../vmisc/logging.h" #include diff --git a/src/test/CollectionTest/tst_tapecommandline.h b/src/test/CollectionTest/tst_tapecommandline.h index f936866f4..db353c4a5 100644 --- a/src/test/CollectionTest/tst_tapecommandline.h +++ b/src/test/CollectionTest/tst_tapecommandline.h @@ -29,7 +29,7 @@ #ifndef TST_TAPECOMMANDLINE_H #define TST_TAPECOMMANDLINE_H -#include "../vmisc/abstracttest.h" +#include "../vtest/abstracttest.h" class TST_TapeCommandLine : public AbstractTest { diff --git a/src/test/CollectionTest/tst_valentinacommandline.cpp b/src/test/CollectionTest/tst_valentinacommandline.cpp index 6a1b57be1..d11186903 100644 --- a/src/test/CollectionTest/tst_valentinacommandline.cpp +++ b/src/test/CollectionTest/tst_valentinacommandline.cpp @@ -28,7 +28,7 @@ #include "tst_valentinacommandline.h" #include "../vmisc/vsysexits.h" -#include "logging.h" +#include "../vmisc/logging.h" #include diff --git a/src/test/CollectionTest/tst_valentinacommandline.h b/src/test/CollectionTest/tst_valentinacommandline.h index 03b2b65d4..6d2c98d09 100644 --- a/src/test/CollectionTest/tst_valentinacommandline.h +++ b/src/test/CollectionTest/tst_valentinacommandline.h @@ -29,7 +29,7 @@ #ifndef TST_VALENTINACOMMANDLINE_H #define TST_VALENTINACOMMANDLINE_H -#include "../vmisc/abstracttest.h" +#include "../vtest/abstracttest.h" class TST_ValentinaCommandLine : public AbstractTest { diff --git a/src/test/TranslationsTest/TranslationsTest.pro b/src/test/TranslationsTest/TranslationsTest.pro index d4f392b13..fe50bb019 100644 --- a/src/test/TranslationsTest/TranslationsTest.pro +++ b/src/test/TranslationsTest/TranslationsTest.pro @@ -124,6 +124,15 @@ DEPENDPATH += $$PWD/../../libs/vpatterndb win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vpatterndb/$${DESTDIR}/vpatterndb.lib else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vpatterndb/$${DESTDIR}/libvpatterndb.a +#VTest static library (depend on VGeometry) +unix|win32: LIBS += -L$$OUT_PWD/../../libs/vtest/$${DESTDIR} -lvtest + +INCLUDEPATH += $$PWD/../../libs/vtest +DEPENDPATH += $$PWD/../../libs/vtest + +win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vtest/$${DESTDIR}/vtest.lib +else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vtest/$${DESTDIR}/libvtest.a + #VMisc static library unix|win32: LIBS += -L$$OUT_PWD/../../libs/vmisc/$${DESTDIR} -lvmisc @@ -134,13 +143,13 @@ win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vmisc/$${DESTDIR}/vmisc else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vmisc/$${DESTDIR}/libvmisc.a ## VGeometry static library (depend on ifc) -#unix|win32: LIBS += -L$$OUT_PWD/../../libs/vgeometry/$${DESTDIR} -lvgeometry +unix|win32: LIBS += -L$$OUT_PWD/../../libs/vgeometry/$${DESTDIR} -lvgeometry -#INCLUDEPATH += $$PWD/../../libs/vgeometry -#DEPENDPATH += $$PWD/../../libs/vgeometry +INCLUDEPATH += $$PWD/../../libs/vgeometry +DEPENDPATH += $$PWD/../../libs/vgeometry -#win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vgeometry/$${DESTDIR}/vgeometry.lib -#else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vgeometry/$${DESTDIR}/libvgeometry.a +win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vgeometry/$${DESTDIR}/vgeometry.lib +else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vgeometry/$${DESTDIR}/libvgeometry.a # IFC static library (depend on QMuParser) unix|win32: LIBS += -L$$OUT_PWD/../../libs/ifc/$${DESTDIR}/ -lifc diff --git a/src/test/TranslationsTest/tst_abstractregexp.h b/src/test/TranslationsTest/tst_abstractregexp.h index 387f16b66..3967cd963 100644 --- a/src/test/TranslationsTest/tst_abstractregexp.h +++ b/src/test/TranslationsTest/tst_abstractregexp.h @@ -29,7 +29,7 @@ #ifndef TST_ABSTRACTREGEXP_H #define TST_ABSTRACTREGEXP_H -#include "../vmisc/abstracttest.h" +#include "../vtest/abstracttest.h" #include diff --git a/src/test/TranslationsTest/tst_measurementregexp.cpp b/src/test/TranslationsTest/tst_measurementregexp.cpp index dc6bc5eb5..82a0160d9 100644 --- a/src/test/TranslationsTest/tst_measurementregexp.cpp +++ b/src/test/TranslationsTest/tst_measurementregexp.cpp @@ -31,6 +31,7 @@ #include "../vmisc/logging.h" #include "../vpatterndb/vtranslatevars.h" +#include "../vpatterndb/measurements.h" #include "../ifc/ifcdef.h" #include diff --git a/src/test/TranslationsTest/tst_qmuparsererrormsg.h b/src/test/TranslationsTest/tst_qmuparsererrormsg.h index 9c3f081da..7ca519574 100644 --- a/src/test/TranslationsTest/tst_qmuparsererrormsg.h +++ b/src/test/TranslationsTest/tst_qmuparsererrormsg.h @@ -29,7 +29,7 @@ #ifndef TST_QMUPARSERERRORMSG_H #define TST_QMUPARSERERRORMSG_H -#include "../vmisc/abstracttest.h" +#include "../vtest/abstracttest.h" #include "../qmuparser/qmuparsererror.h" #include diff --git a/src/test/ValentinaTest/ValentinaTest.pro b/src/test/ValentinaTest/ValentinaTest.pro index a0587dac5..9c36931cd 100644 --- a/src/test/ValentinaTest/ValentinaTest.pro +++ b/src/test/ValentinaTest/ValentinaTest.pro @@ -161,6 +161,15 @@ DEPENDPATH += $$PWD/../../libs/ifc win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/ifc/$${DESTDIR}/ifc.lib else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/ifc/$${DESTDIR}/libifc.a +#VTest static library +unix|win32: LIBS += -L$$OUT_PWD/../../libs/vtest/$${DESTDIR} -lvtest + +INCLUDEPATH += $$PWD/../../libs/vtest +DEPENDPATH += $$PWD/../../libs/vtest + +win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vtest/$${DESTDIR}/vtest.lib +else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vtest/$${DESTDIR}/libvtest.a + #VMisc static library unix|win32: LIBS += -L$$OUT_PWD/../../libs/vmisc/$${DESTDIR}/ -lvmisc diff --git a/src/test/ValentinaTest/tst_nameregexp.cpp b/src/test/ValentinaTest/tst_nameregexp.cpp index 73e8bd206..8f6995fe7 100644 --- a/src/test/ValentinaTest/tst_nameregexp.cpp +++ b/src/test/ValentinaTest/tst_nameregexp.cpp @@ -28,8 +28,8 @@ #include "tst_nameregexp.h" #include "../qmuparser/qmudef.h" -#include "../vmisc/def.h" #include "../vmisc/logging.h" +#include "../vpatterndb/measurements.h" #include diff --git a/src/test/ValentinaTest/tst_vabstractcurve.h b/src/test/ValentinaTest/tst_vabstractcurve.h index 438b77ad9..2d52db370 100644 --- a/src/test/ValentinaTest/tst_vabstractcurve.h +++ b/src/test/ValentinaTest/tst_vabstractcurve.h @@ -29,7 +29,7 @@ #ifndef TST_VABSTRACTCURVE_H #define TST_VABSTRACTCURVE_H -#include "../vmisc/abstracttest.h" +#include "../vtest/abstracttest.h" class TST_VAbstractCurve : public AbstractTest { diff --git a/src/test/ValentinaTest/tst_vabstractpiece.h b/src/test/ValentinaTest/tst_vabstractpiece.h index 7eaf2770f..45877f2d0 100644 --- a/src/test/ValentinaTest/tst_vabstractpiece.h +++ b/src/test/ValentinaTest/tst_vabstractpiece.h @@ -29,7 +29,7 @@ #ifndef TST_VABSTRACTPIECE_H #define TST_VABSTRACTPIECE_H -#include "../vmisc/abstracttest.h" +#include "../vtest/abstracttest.h" class VSAPoint; diff --git a/src/test/ValentinaTest/tst_vlayoutdetail.h b/src/test/ValentinaTest/tst_vlayoutdetail.h index eb0eb21c8..af18532b9 100644 --- a/src/test/ValentinaTest/tst_vlayoutdetail.h +++ b/src/test/ValentinaTest/tst_vlayoutdetail.h @@ -29,7 +29,7 @@ #ifndef TST_VLAYOUTDETAIL_H #define TST_VLAYOUTDETAIL_H -#include "../vmisc/abstracttest.h" +#include "../vtest/abstracttest.h" class TST_VLayoutDetail : public AbstractTest { diff --git a/src/test/ValentinaTest/tst_vmeasurements.cpp b/src/test/ValentinaTest/tst_vmeasurements.cpp index 05be20ca5..8a0755e14 100644 --- a/src/test/ValentinaTest/tst_vmeasurements.cpp +++ b/src/test/ValentinaTest/tst_vmeasurements.cpp @@ -30,6 +30,7 @@ #include "../vformat/vmeasurements.h" #include "../ifc/xml/vvstconverter.h" #include "../ifc/xml/vvitconverter.h" +#include "../vpatterndb/pmsystems.h" #include diff --git a/src/test/ValentinaTest/tst_vpiece.h b/src/test/ValentinaTest/tst_vpiece.h index 93956fc5a..82f97d687 100644 --- a/src/test/ValentinaTest/tst_vpiece.h +++ b/src/test/ValentinaTest/tst_vpiece.h @@ -29,7 +29,7 @@ #ifndef TST_VDETAIL_H #define TST_VDETAIL_H -#include "../vmisc/abstracttest.h" +#include "../vtest/abstracttest.h" class TST_VPiece : public AbstractTest { diff --git a/src/test/ValentinaTest/tst_vspline.h b/src/test/ValentinaTest/tst_vspline.h index 776274222..54efb99f6 100644 --- a/src/test/ValentinaTest/tst_vspline.h +++ b/src/test/ValentinaTest/tst_vspline.h @@ -29,7 +29,7 @@ #ifndef TST_VSPLINE_H #define TST_VSPLINE_H -#include "../vmisc/abstracttest.h" +#include "../vtest/abstracttest.h" class VSpline;