Change for reading individual measurements.
--HG-- branch : feature
This commit is contained in:
parent
f2cc874e7e
commit
3fc99547fb
|
@ -30,21 +30,18 @@
|
|||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VMeasurement::VMeasurement()
|
||||
:base(0), ksize(50.0), kheight(176.0), gui_text(QString()), number(QString()), virtualM(false),
|
||||
_tagName(QString())
|
||||
:base(0), ksize(50.0), kheight(176.0), gui_text(QString()), number(QString()), _tagName(QString())
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VMeasurement::VMeasurement(const qreal &base, const qreal &ksize, const qreal &kgrowth,
|
||||
const QString &gui_text, const QString &number, const QString &tagName)
|
||||
:base(base), ksize(ksize), kheight(kgrowth), gui_text(gui_text), number(number), virtualM(false),
|
||||
_tagName(tagName)
|
||||
:base(base), ksize(ksize), kheight(kgrowth), gui_text(gui_text), number(number), _tagName(tagName)
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VMeasurement::VMeasurement(const qreal &base, const QString &gui_text, const QString &number, const QString &tagName)
|
||||
:base(base), ksize(50.0), kheight(176.0), gui_text(gui_text), number(number), virtualM(false),
|
||||
_tagName(tagName)
|
||||
:base(base), ksize(50.0), kheight(176.0), gui_text(gui_text), number(number), _tagName(tagName)
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -100,7 +100,6 @@ private:
|
|||
*/
|
||||
QString gui_text;
|
||||
QString number;
|
||||
bool virtualM;
|
||||
QString _tagName;
|
||||
};
|
||||
|
||||
|
@ -144,14 +143,4 @@ inline void VMeasurement::setTagName(const QString &tagName)
|
|||
_tagName = tagName;
|
||||
}
|
||||
|
||||
inline bool VMeasurement::Virtual() const
|
||||
{
|
||||
return virtualM;
|
||||
}
|
||||
|
||||
inline void VMeasurement::setVirtual(bool value)
|
||||
{
|
||||
virtualM = value;
|
||||
}
|
||||
|
||||
#endif // VSTANDARDTABLEROW_H
|
||||
|
|
|
@ -110,6 +110,7 @@ const QString waistToHipHeight = QStringLiteral("waist_to_hip_height"
|
|||
const QString waistToKneeHeight = QStringLiteral("waist_to_knee_height");
|
||||
const QString crotchHeight = QStringLiteral("crotch_height");
|
||||
//extended measurements
|
||||
const QString size = QStringLiteral("size");
|
||||
const QString heightFrontNeckBasePoint = QStringLiteral("height_front_neck_base_point");
|
||||
const QString heightBaseNeckSidePoint = QStringLiteral("height_base_neck_side_point");
|
||||
const QString heightShoulderPoint = QStringLiteral("height_shoulder_point");
|
||||
|
|
|
@ -194,6 +194,7 @@ extern const QString waistToHipHeight;
|
|||
extern const QString waistToKneeHeight;
|
||||
extern const QString crotchHeight;
|
||||
//extended measurements
|
||||
extern const QString size;
|
||||
extern const QString heightFrontNeckBasePoint;
|
||||
extern const QString heightBaseNeckSidePoint;
|
||||
extern const QString heightShoulderPoint;
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="bust__girth">
|
||||
<xs:element name="bust_girth">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
|
@ -203,12 +203,12 @@
|
|||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front_upper-bust_arc">
|
||||
<xs:element name="front_upper_chest_arc">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="back_upper-bust_arc">
|
||||
<xs:element name="back_upper_chest_arc">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
|
@ -223,12 +223,12 @@
|
|||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front_upper-hip_arc">
|
||||
<xs:element name="front_upper_hip_arc">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="back_upper-hip_arc">
|
||||
<xs:element name="back_upper_hip_arc">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
|
@ -263,12 +263,12 @@
|
|||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front-neck_to_upper-chest_height">
|
||||
<xs:element name="front_neck_to_upper_chest_height">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front-neck_to_bust_height">
|
||||
<xs:element name="front_neck_to_bust_height">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
|
@ -289,7 +289,7 @@
|
|||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="upper-arm_girth">
|
||||
<xs:element name="upper_arm_girth">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="bust__girth">
|
||||
<xs:element name="bust_girth">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
|
||||
|
@ -276,14 +276,14 @@
|
|||
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front_upper-bust_arc">
|
||||
<xs:element name="front_upper_chest_arc">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="back_upper-bust_arc">
|
||||
<xs:element name="back_upper_chest_arc">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
|
||||
|
@ -304,14 +304,14 @@
|
|||
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front_upper-hip_arc">
|
||||
<xs:element name="front_upper_hip_arc">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="back_upper-hip_arc">
|
||||
<xs:element name="back_upper_hip_arc">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
|
||||
|
@ -360,14 +360,14 @@
|
|||
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front-neck_to_upper-chest_height">
|
||||
<xs:element name="front_neck_to_upper_chest_height">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front-neck_to_bust_height">
|
||||
<xs:element name="front_neck_to_bust_height">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
|
||||
|
@ -394,7 +394,7 @@
|
|||
<xs:attribute name="size_increace" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="upper-arm_girth">
|
||||
<xs:element name="upper_arm_girth">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="height_increase" type="xs:double" use="required"></xs:attribute>
|
||||
|
|
|
@ -48,25 +48,25 @@
|
|||
<back_shoulder_to_waist_length value="0.0"/>
|
||||
<front_neck_arc value="0.0"/>
|
||||
<back_neck_arc value="0.0"/>
|
||||
<front_upper-bust_arc value="0.0"/>
|
||||
<back_upper-bust_arc value="0.0"/>
|
||||
<front_upper_chest_arc value="0.0"/>
|
||||
<back_upper_chest_arc value="0.0"/>
|
||||
<front_waist_arc value="0.0"/>
|
||||
<back_waist_arc value="0.0"/>
|
||||
<front_upper-hip_arc value="0.0"/>
|
||||
<back_upper-hip_arc value="0.0"/>
|
||||
<front_upper_hip_arc value="0.0"/>
|
||||
<back_upper_hip_arc value="0.0"/>
|
||||
<front_hip_arc value="0.0"/>
|
||||
<back_hip_arc value="0.0"/>
|
||||
<chest_slope value="0.0"/>
|
||||
<back_slope value="0.0"/>
|
||||
<front_waist_slope value="0.0"/>
|
||||
<back_waist_slope value="0.0"/>
|
||||
<front-neck_to_upper-chest_height value="0.0"/>
|
||||
<front-neck_to_bust_height value="0.0"/>
|
||||
<front_neck_to_upper_chest_height value="0.0"/>
|
||||
<front_neck_to_bust_height value="0.0"/>
|
||||
</torso>
|
||||
<arm>
|
||||
<armscye_girth value="0.0"/>
|
||||
<elbow_girth value="0.0"/>
|
||||
<upper-arm_girth value="0.0"/>
|
||||
<upper_arm_girth value="0.0"/>
|
||||
<wrist_girth value="0.0"/>
|
||||
<scye_depth value="0.0"/>
|
||||
<shoulder_and_arm_length value="0.0"/>
|
||||
|
|
|
@ -44,25 +44,25 @@
|
|||
<back_shoulder_to_waist_length value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_neck_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_neck_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_upper-bust_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_upper-bust_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_upper_chest_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_upper_chest_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_waist_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_waist_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_upper-hip_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_upper-hip_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_upper_hip_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_upper_hip_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_hip_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_hip_arc value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<chest_slope value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_slope value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_waist_slope value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<back_waist_slope value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front-neck_to_upper-chest_height value="0.0" size_increace="0" height_increase=""/><!--Нету перевода-->
|
||||
<front-neck_to_bust_height value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_neck_to_upper_chest_height value="0.0" size_increace="0" height_increase=""/><!--Нету перевода-->
|
||||
<front_neck_to_bust_height value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
</torso>
|
||||
<arm>
|
||||
<armscye_girth value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<elbow_girth value="0.0" size_increace="0" height_increase="0"/><!--Олк(Обхват локтя)-->
|
||||
<upper-arm_girth value="316" size_increace="12" height_increase ="0"/><!--Оп(Обхват плеча)-->
|
||||
<upper_arm_girth value="316" size_increace="12" height_increase ="0"/><!--Оп(Обхват плеча)-->
|
||||
<wrist_girth value="180" size_increace="4" height_increase ="0"/><!--Озап(Обхват запястья)-->
|
||||
<scye_depth value="0.0" size_increace="0" height_increase="0"/><!--Нету перевода-->
|
||||
<shoulder_and_arm_length value="768" size_increace="2" height_increase ="24"/><!--Дзап(Расстояние от точки основания шеи сбоку до линии обхвата запястья)-->
|
||||
|
|
|
@ -45,7 +45,7 @@ const qreal VApplication::PrintDPI = 96.0;
|
|||
VApplication::VApplication(int &argc, char **argv)
|
||||
: QApplication(argc, argv), _patternUnit(Valentina::Cm), _patternType(Pattern::Individual),
|
||||
_widthMainLine(DefWidth), _widthHairLine(DefWidth/3.0), measurements(QMap<QString, VTranslation>()),
|
||||
guiText(QMap<QString, VTranslation>()), description(QMap<QString, VTranslation>()),
|
||||
guiTexts(QMap<QString, VTranslation>()), descriptions(QMap<QString, VTranslation>()),
|
||||
variables(QMap<QString, VTranslation>()), functions(QMap<QString, VTranslation>())
|
||||
{
|
||||
InitLineWidth();
|
||||
|
@ -569,7 +569,7 @@ void VApplication::InitMeasurements()
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VApplication::InitMeasurement(const QString &measurement, const QString &guiTxt, const QString &desc)
|
||||
void VApplication::InitMeasurement(const QString &measurement, const QString &guiText, const QString &desc)
|
||||
{
|
||||
const QString context = QStringLiteral("Measurements");
|
||||
const QString disambiguation1 = QStringLiteral("Short measurement name. Don't use math symbols in name!!!!");
|
||||
|
@ -577,8 +577,8 @@ void VApplication::InitMeasurement(const QString &measurement, const QString &gu
|
|||
const QString disambiguation3 = QStringLiteral("Full measurement description");
|
||||
|
||||
measurements.insert(measurement, VTranslation::translate(context, measurement, disambiguation1));
|
||||
guiText.insert(measurement, VTranslation::translate(context, guiTxt, disambiguation2));
|
||||
description.insert(measurement, VTranslation::translate(context, desc, disambiguation3));
|
||||
guiTexts.insert(measurement, VTranslation::translate(context, guiText, disambiguation2));
|
||||
descriptions.insert(measurement, VTranslation::translate(context, desc, disambiguation3));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -636,3 +636,33 @@ void VApplication::setPatternUnit(const Valentina::Units &patternUnit)
|
|||
_patternUnit = patternUnit;
|
||||
InitLineWidth();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString VApplication::Measurement(const QString &measurement) const
|
||||
{
|
||||
return measurements.value(measurement).translate();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString VApplication::GuiText(const QString &measurement) const
|
||||
{
|
||||
return guiTexts.value(measurement).translate();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString VApplication::Description(const QString &measurement) const
|
||||
{
|
||||
return descriptions.value(measurement).translate();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString VApplication::Variable(const QString &name) const
|
||||
{
|
||||
return variables.value(name).translate();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString VApplication::Function(const QString &name) const
|
||||
{
|
||||
return functions.value(name).translate();
|
||||
}
|
||||
|
|
|
@ -72,19 +72,24 @@ public:
|
|||
QString pathToTables() const;
|
||||
qreal widthMainLine() const;
|
||||
qreal widthHairLine() const;
|
||||
QString Measurement(const QString &measurement) const;
|
||||
QString GuiText(const QString &measurement) const;
|
||||
QString Description(const QString &measurement) const;
|
||||
QString Variable(const QString &name) const;
|
||||
QString Function(const QString &name) const;
|
||||
private:
|
||||
Valentina::Units _patternUnit;
|
||||
Pattern::Measurements _patternType;
|
||||
qreal _widthMainLine;
|
||||
qreal _widthHairLine;
|
||||
QMap<QString, VTranslation> measurements;
|
||||
QMap<QString, VTranslation> guiText;
|
||||
QMap<QString, VTranslation> description;
|
||||
QMap<QString, VTranslation> guiTexts;
|
||||
QMap<QString, VTranslation> descriptions;
|
||||
QMap<QString, VTranslation> variables;
|
||||
QMap<QString, VTranslation> functions;
|
||||
void InitLineWidth();
|
||||
void InitMeasurements();
|
||||
void InitMeasurement(const QString &measurement, const QString &guiTxt, const QString & desc);
|
||||
void InitMeasurement(const QString &measurement, const QString &guiText, const QString & desc);
|
||||
void InitVariables();
|
||||
void InitFunctions();
|
||||
|
||||
|
|
|
@ -40,12 +40,15 @@ VTranslation VTranslation::translate(const QString &context, const QString &sour
|
|||
return t;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VTranslation::VTranslation()
|
||||
:mcontext(QString()), msourceText(QString()), mdisambiguation(QString()), mn(-1)
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VTranslation::VTranslation(const QString &context, const QString &sourceText, const QString &disambiguation, int n)
|
||||
:mcontext(context), msourceText(sourceText), mdisambiguation(disambiguation), mn(n)
|
||||
{
|
||||
mn = -1;
|
||||
}
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString VTranslation::VTranslation::translate() const
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
class VTranslation
|
||||
{
|
||||
public:
|
||||
VTranslation();
|
||||
VTranslation(const QString &context, const QString &sourceText, const QString &disambiguation = 0, int n = -1);
|
||||
QString translate() const;
|
||||
static VTranslation translate(const QString &context, const QString &sourceText, const QString &disambiguation = 0,
|
||||
|
|
|
@ -27,22 +27,15 @@
|
|||
*************************************************************************/
|
||||
|
||||
#include "vindividualmeasurements.h"
|
||||
#include "../widgets/vapplication.h"
|
||||
|
||||
const QString VIndividualMeasurements::AttrIgnore = QStringLiteral("ignore");
|
||||
const QString VIndividualMeasurements::AttrName = QStringLiteral("name");
|
||||
const QString VIndividualMeasurements::AttrM_number = QStringLiteral("m_number");
|
||||
const QString VIndividualMeasurements::AttrGui_text = QStringLiteral("gui_text");
|
||||
const QString VIndividualMeasurements::AttrValue = QStringLiteral("value");
|
||||
const QString VIndividualMeasurements::AttrDescription = QStringLiteral("description");
|
||||
|
||||
const QString VIndividualMeasurements::TagLang = QStringLiteral("lang");
|
||||
const QString VIndividualMeasurements::TagFamily_name = QStringLiteral("family-name");
|
||||
const QString VIndividualMeasurements::TagGiven_name = QStringLiteral("given-name");
|
||||
const QString VIndividualMeasurements::TagBirth_date = QStringLiteral("birth-date");
|
||||
const QString VIndividualMeasurements::TagSex = QStringLiteral("sex");
|
||||
const QString VIndividualMeasurements::TagUnit = QStringLiteral("unit");
|
||||
const QString VIndividualMeasurements::TagEmail = QStringLiteral("email");
|
||||
|
||||
const QString VIndividualMeasurements::SexMale = QStringLiteral("male");
|
||||
const QString VIndividualMeasurements::SexFemale = QStringLiteral("female");
|
||||
|
||||
|
@ -67,92 +60,142 @@ void VIndividualMeasurements::setUnit(const Valentina::Units &unit)
|
|||
void VIndividualMeasurements::Measurements()
|
||||
{
|
||||
//head and neck
|
||||
Measurement("head_girth");
|
||||
Measurement("mid_neck_girth");
|
||||
Measurement("neck_base_girth");
|
||||
Measurement("head_and_neck_length");
|
||||
Measurement(headGirth);
|
||||
Measurement(midNeckGirth);
|
||||
Measurement(neckBaseGirth);
|
||||
Measurement(headAndNeckLength);
|
||||
//torso
|
||||
Measurement("center_front_waist_length");
|
||||
Measurement("center_back_waist_length");
|
||||
Measurement("shoulder_length");
|
||||
Measurement("side_waist_length");
|
||||
Measurement("trunk_length");
|
||||
Measurement("shoulder_girth");
|
||||
Measurement("upper_chest_girth");
|
||||
Measurement("bust__girth");
|
||||
Measurement("under_bust_girth");
|
||||
Measurement("waist_girth");
|
||||
Measurement("high_hip_girth");
|
||||
Measurement("hip_girth");
|
||||
Measurement("upper_front_chest_width");
|
||||
Measurement("front_chest_width");
|
||||
Measurement("across_front_shoulder_width");
|
||||
Measurement("across_back_shoulder_width");
|
||||
Measurement("upper_back_width");
|
||||
Measurement("back_width");
|
||||
Measurement("bustpoint_to_bustpoint");
|
||||
Measurement("halter_bustpoint_to_bustpoint");
|
||||
Measurement("neck_to_bustpoint");
|
||||
Measurement("crotch_length");
|
||||
Measurement("rise_height");
|
||||
Measurement("shoulder_drop");
|
||||
Measurement("shoulder_slope_degrees");
|
||||
Measurement("front_shoulder_slope_length");
|
||||
Measurement("back_shoulder_slope_length");
|
||||
Measurement("front_shoulder_to_waist_length");
|
||||
Measurement("back_shoulder_to_waist_length");
|
||||
Measurement("front_neck_arc");
|
||||
Measurement("back_neck_arc");
|
||||
Measurement("front_upper-bust_arc");
|
||||
Measurement("back_upper-bust_arc");
|
||||
Measurement("front_waist_arc");
|
||||
Measurement("back_waist_arc");
|
||||
Measurement("front_upper-hip_arc");
|
||||
Measurement("back_upper-hip_arc");
|
||||
Measurement("front_hip_arc");
|
||||
Measurement("back_hip_arc");
|
||||
Measurement("chest_slope");
|
||||
Measurement("back_slope");
|
||||
Measurement("front_waist_slope");
|
||||
Measurement("back_waist_slope");
|
||||
Measurement("front-neck_to_upper-chest_height");
|
||||
Measurement("front-neck_to_bust_height");
|
||||
Measurement(centerFrontWaistLength);
|
||||
Measurement(centerBackWaistLength);
|
||||
Measurement(shoulderLength);
|
||||
Measurement(sideWaistLength);
|
||||
Measurement(trunkLength);
|
||||
Measurement(shoulderGirth);
|
||||
Measurement(upperChestGirth);
|
||||
Measurement(bustGirth);
|
||||
Measurement(underBustGirth);
|
||||
Measurement(waistGirth);
|
||||
Measurement(highHipGirth);
|
||||
Measurement(hipGirth);
|
||||
Measurement(upperFrontChestWidth);
|
||||
Measurement(frontChestWidth);
|
||||
Measurement(acrossFrontShoulderWidth);
|
||||
Measurement(acrossBackShoulderWidth);
|
||||
Measurement(upperBackWidth);
|
||||
Measurement(backWidth);
|
||||
Measurement(bustpointToBustpoint);
|
||||
Measurement(halterBustpointToBustpoint);
|
||||
Measurement(neckToBustpoint);
|
||||
Measurement(crotchLength);
|
||||
Measurement(riseHeight);
|
||||
Measurement(shoulderDrop);
|
||||
Measurement(shoulderSlopeDegrees);
|
||||
Measurement(frontShoulderSlopeLength);
|
||||
Measurement(backShoulderSlopeLength);
|
||||
Measurement(frontShoulderToWaistLength);
|
||||
Measurement(backShoulderToWaistLength);
|
||||
Measurement(frontNeckArc);
|
||||
Measurement(backNeckArc);
|
||||
Measurement(frontUpperChestArc);
|
||||
Measurement(backUpperChestArc);
|
||||
Measurement(frontWaistArc);
|
||||
Measurement(backWaistArc);
|
||||
Measurement(frontUpperHipArc);
|
||||
Measurement(backUpperHipArc);
|
||||
Measurement(frontHipArc);
|
||||
Measurement(backHipArc);
|
||||
Measurement(chestSlope);
|
||||
Measurement(backSlope);
|
||||
Measurement(frontWaistSlope);
|
||||
Measurement(backWaistSlope);
|
||||
Measurement(frontNeckToUpperChestHeight);
|
||||
Measurement(frontNeckToBustHeight);
|
||||
//arm
|
||||
Measurement("armscye_girth");
|
||||
Measurement("elbow_girth");
|
||||
Measurement("upper-arm_girth");
|
||||
Measurement("wrist_girth");
|
||||
Measurement("scye_depth");
|
||||
Measurement("shoulder_and_arm_length");
|
||||
Measurement("underarm_length");
|
||||
Measurement("cervicale_to_wrist_length");
|
||||
Measurement("shoulder_to_elbow_length");
|
||||
Measurement("arm_length");
|
||||
Measurement(armscyeGirth);
|
||||
Measurement(elbowGirth);
|
||||
Measurement(upperArmGirth);
|
||||
Measurement(wristGirth);
|
||||
Measurement(scyeDepth);
|
||||
Measurement(shoulderAndArmLength);
|
||||
Measurement(underarmLength);
|
||||
Measurement(cervicaleToWristLength);
|
||||
Measurement(shoulderToElbowLength);
|
||||
Measurement(armLength);
|
||||
//hand
|
||||
Measurement("hand_width");
|
||||
Measurement("hand_length");
|
||||
Measurement("hand_girth");
|
||||
Measurement(handWidth);
|
||||
Measurement(handLength);
|
||||
Measurement(handGirth);
|
||||
//leg
|
||||
Measurement("thigh_girth");
|
||||
Measurement("mid_thigh_girth");
|
||||
Measurement("knee_girth");
|
||||
Measurement("calf_girth");
|
||||
Measurement("ankle_girth");
|
||||
Measurement("knee_height");
|
||||
Measurement("ankle_height");
|
||||
Measurement(thighGirth);
|
||||
Measurement(midThighGirth);
|
||||
Measurement(kneeGirth);
|
||||
Measurement(calfGirth);
|
||||
Measurement(ankleGirth);
|
||||
Measurement(kneeHeight);
|
||||
Measurement(ankleHeight);
|
||||
//foot
|
||||
Measurement("foot_width");
|
||||
Measurement("foot_length");
|
||||
Measurement(footWidth);
|
||||
Measurement(footLength);
|
||||
//heights
|
||||
Measurement("height");
|
||||
Measurement("cervicale_height");
|
||||
Measurement("cervicale_to_knee_height");
|
||||
Measurement("waist_height");
|
||||
Measurement("high_hip_height");
|
||||
Measurement("hip_height");
|
||||
Measurement("waist_to_hip_height");
|
||||
Measurement("waist_to_knee_height");
|
||||
Measurement("crotch_height");
|
||||
Measurement(height);
|
||||
Measurement(cervicaleHeight);
|
||||
Measurement(cervicaleToKneeHeight);
|
||||
Measurement(waistHeight);
|
||||
Measurement(highHipHeight);
|
||||
Measurement(hipHeight);
|
||||
Measurement(waistToHipHeight);
|
||||
Measurement(waistToKneeHeight);
|
||||
Measurement(crotchHeight);
|
||||
//extended
|
||||
Measurement(size);
|
||||
Measurement(heightFrontNeckBasePoint);
|
||||
Measurement(heightBaseNeckSidePoint);
|
||||
Measurement(heightShoulderPoint);
|
||||
Measurement(heightNipplePoint);
|
||||
Measurement(heightBackAngleAxilla);
|
||||
Measurement(heightScapularPoint);
|
||||
Measurement(heightUnderButtockFolds);
|
||||
Measurement(hipsExcludingProtrudingAbdomen);
|
||||
Measurement(girthFootInstep);
|
||||
Measurement(sideWaistToFloor);
|
||||
Measurement(frontWaistToFloor);
|
||||
Measurement(arcThroughGroinArea);
|
||||
Measurement(waistToPlaneSeat);
|
||||
Measurement(neckToRadialPoint);
|
||||
Measurement(neckToThirdFinger);
|
||||
Measurement(neckToFirstLineChestCircumference);
|
||||
Measurement(frontWaistLength);
|
||||
Measurement(arcThroughShoulderJoint);
|
||||
Measurement(neckToBackLineChestCircumference);
|
||||
Measurement(waistToNeckSide);
|
||||
Measurement(arcLengthUpperBody);
|
||||
Measurement(chestWidth);
|
||||
Measurement(anteroposteriorDiameterHands);
|
||||
Measurement(heightClavicularPoint);
|
||||
Measurement(heightArmholeSlash);
|
||||
Measurement(slashShoulderHeight);
|
||||
Measurement(halfGirthNeck);
|
||||
Measurement(halfGirthNeckForShirts);
|
||||
Measurement(halfGirthChestFirst);
|
||||
Measurement(halfGirthChestSecond);
|
||||
Measurement(halfGirthChestThird);
|
||||
Measurement(halfGirthWaist);
|
||||
Measurement(halfGirthHipsConsideringProtrudingAbdomen);
|
||||
Measurement(halfGirthHipsExcludingProtrudingAbdomen);
|
||||
Measurement(girthKneeFlexedFeet);
|
||||
Measurement(neckTransverseDiameter);
|
||||
Measurement(frontSlashShoulderHeight);
|
||||
Measurement(neckToFrontWaistLine);
|
||||
Measurement(handVerticalDiameter);
|
||||
Measurement(neckToKneePoint);
|
||||
Measurement(waistToKnee);
|
||||
Measurement(shoulderHeight);
|
||||
Measurement(headHeight);
|
||||
Measurement(bodyPosition);
|
||||
Measurement(arcBehindShoulderGirdle);
|
||||
Measurement(neckToNeckBase);
|
||||
Measurement(depthWaistFirst);
|
||||
Measurement(depthWaistSecond);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -172,61 +215,17 @@ void VIndividualMeasurements::Measurement(const QString &tag)
|
|||
const QDomElement domElement = domNode.toElement();
|
||||
if (domElement.isNull() == false)
|
||||
{
|
||||
const bool ignore = QVariant(GetParametrString(domElement, AttrIgnore, "false")).toBool();
|
||||
if (ignore)
|
||||
{
|
||||
return;
|
||||
}
|
||||
const QString name = GetParametrString(domElement, AttrName, "");
|
||||
if (name.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
const QString m_number = GetParametrString(domElement, AttrM_number, "");
|
||||
const QString gui_text = GetParametrString(domElement, AttrGui_text, "");
|
||||
const qreal value = GetParametrDouble(domElement, AttrValue, "0.0");
|
||||
const QString description = GetParametrString(domElement, AttrDescription, "");
|
||||
qreal value = GetParametrDouble(domElement, AttrValue, "0.0");
|
||||
|
||||
if (Unit() == Valentina::Mm)//Convert to Cm.
|
||||
{
|
||||
data->AddMeasurement(name, VMeasurement(value/10.0, gui_text, description, tag));
|
||||
if (m_number.isEmpty())
|
||||
{
|
||||
qDebug()<<"Can't find language-independent measurement name for "<< tag;
|
||||
return;
|
||||
value = value / 10.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
VMeasurement m(value/10.0, gui_text, description, tag);
|
||||
m.setVirtual(true);
|
||||
data->AddMeasurement(m_number, m);
|
||||
}
|
||||
}
|
||||
else//Cm or inch.
|
||||
{
|
||||
data->AddMeasurement(name, VMeasurement(value, gui_text, description, tag));
|
||||
if (m_number.isEmpty())
|
||||
{
|
||||
qDebug()<<"Can't find language-independent measurement name for "<< tag;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
VMeasurement m(value, gui_text, description, tag);
|
||||
m.setVirtual(true);
|
||||
data->AddMeasurement(m_number, m);
|
||||
data->AddMeasurement(tag, VMeasurement(value, qApp->GuiText(tag), qApp->Description(tag), tag));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString VIndividualMeasurements::Language() const
|
||||
{
|
||||
return UniqueTagText(TagLang, "en");
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString VIndividualMeasurements::FamilyName() const
|
||||
|
|
|
@ -42,7 +42,6 @@ public:
|
|||
Valentina::Units Unit() const;
|
||||
void setUnit(const Valentina::Units &unit);
|
||||
void Measurements();
|
||||
QString Language() const;
|
||||
QString FamilyName() const;
|
||||
void setFamilyName(const QString &text);
|
||||
QString GivenName() const;
|
||||
|
@ -53,21 +52,13 @@ public:
|
|||
void setSex(const VIndividualMeasurements::Genders &sex);
|
||||
QString Mail() const;
|
||||
void setMail(const QString &text);
|
||||
static const QString AttrIgnore;
|
||||
static const QString AttrName;
|
||||
static const QString AttrM_number;
|
||||
static const QString AttrGui_text;
|
||||
static const QString AttrValue;
|
||||
static const QString AttrDescription;
|
||||
|
||||
static const QString TagLang;
|
||||
static const QString TagFamily_name;
|
||||
static const QString TagGiven_name;
|
||||
static const QString TagBirth_date;
|
||||
static const QString TagSex;
|
||||
static const QString TagUnit;
|
||||
static const QString TagEmail;
|
||||
|
||||
static const QString SexMale;
|
||||
static const QString SexFemale;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user