Four new measurements.
--HG-- branch : develop
This commit is contained in:
parent
4127e3ec16
commit
8c50e0a9b3
|
@ -84,6 +84,7 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con
|
|||
messageBox.setStandardButtons(QMessageBox::Ok);
|
||||
fprintf(stderr, "Warning: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line,
|
||||
context.function);
|
||||
messageBox.exec();
|
||||
break;
|
||||
case QtCriticalMsg:
|
||||
messageBox.setIcon(QMessageBox::Critical);
|
||||
|
@ -91,6 +92,8 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con
|
|||
messageBox.setStandardButtons(QMessageBox::Ok);
|
||||
fprintf(stderr, "Critical: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line,
|
||||
context.function);
|
||||
messageBox.exec();
|
||||
abort();
|
||||
break;
|
||||
case QtFatalMsg:
|
||||
messageBox.setIcon(QMessageBox::Critical);
|
||||
|
@ -98,16 +101,12 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con
|
|||
messageBox.setStandardButtons(QMessageBox::Ok);
|
||||
fprintf(stderr, "Fatal: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line,
|
||||
context.function);
|
||||
messageBox.exec();
|
||||
abort();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
const int ret = messageBox.exec();
|
||||
if (ret == QMessageBox::Cancel)
|
||||
{
|
||||
abort();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -2127,6 +2127,7 @@ void MainWindow::LoadPattern(const QString &fileName)
|
|||
if (qApp->patternType() == MeasurementsType::Standard)
|
||||
{
|
||||
VStandardMeasurements m(pattern);
|
||||
VDomDocument::ValidateXML("://schema/standard_measurements.xsd", path);
|
||||
m.setContent(path);
|
||||
if (m.MUnit() == Unit::Inch)
|
||||
{
|
||||
|
@ -2138,6 +2139,10 @@ void MainWindow::LoadPattern(const QString &fileName)
|
|||
m.SetSize();
|
||||
m.SetHeight();
|
||||
}
|
||||
else
|
||||
{
|
||||
VDomDocument::ValidateXML("://schema/individual_measurements.xsd", path);
|
||||
}
|
||||
ToolBarOption();
|
||||
}
|
||||
catch (VException &e)
|
||||
|
|
|
@ -32,12 +32,14 @@
|
|||
//Same regexp in pattern.xsd shema file. Don't forget synchronize.
|
||||
const QString nameRegExp = QStringLiteral("^([^0-9-*/^+=\\s\\(\\)%:;!.,]){1,1}([^-*/^+=\\s\\(\\)%:;!.,]){0,}$");
|
||||
|
||||
// Keep synchronize all names with initialization in VApllication class.
|
||||
// Keep synchronize all names with initialization in VApllication class!!!!!
|
||||
//measurements
|
||||
//head and neck
|
||||
const QString headGirth_M = QStringLiteral("head_girth");
|
||||
const QString midNeckGirth_M = QStringLiteral("mid_neck_girth");
|
||||
const QString neckBaseGirth_M = QStringLiteral("neck_base_girth");
|
||||
const QString headAndNeckLength_M = QStringLiteral("head_and_neck_length");
|
||||
//torso
|
||||
const QString centerFrontWaistLength_M = QStringLiteral("center_front_waist_length");
|
||||
const QString centerBackWaistLength_M = QStringLiteral("center_back_waist_length");
|
||||
const QString shoulderLength_M = QStringLiteral("shoulder_length");
|
||||
|
@ -83,6 +85,11 @@ const QString frontWaistSlope_M = QStringLiteral("front_waist_slope"
|
|||
const QString backWaistSlope_M = QStringLiteral("back_waist_slope");
|
||||
const QString frontNeckToUpperChestHeight_M = QStringLiteral("front_neck_to_upper_chest_height");
|
||||
const QString frontNeckToBustHeight_M = QStringLiteral("front_neck_to_bust_height");
|
||||
const QString frontWaistToUpperChest_M = QStringLiteral("front_waist_to_upper_chest");
|
||||
const QString frontWaistToLowerBreast_M = QStringLiteral("front_waist_to_lower_breast");
|
||||
const QString backWaistToUpperChest_M = QStringLiteral("back_waist_to_upper_chest");
|
||||
const QString strapLength_M = QStringLiteral("strap_length");
|
||||
//arm
|
||||
const QString armscyeGirth_M = QStringLiteral("armscye_girth");
|
||||
const QString elbowGirth_M = QStringLiteral("elbow_girth");
|
||||
const QString upperArmGirth_M = QStringLiteral("upper_arm_girth");
|
||||
|
@ -93,9 +100,11 @@ const QString underarmLength_M = QStringLiteral("underarm_length");
|
|||
const QString cervicaleToWristLength_M = QStringLiteral("cervicale_to_wrist_length");
|
||||
const QString shoulderToElbowLength_M = QStringLiteral("shoulder_to_elbow_length");
|
||||
const QString armLength_M = QStringLiteral("arm_length");
|
||||
//hand
|
||||
const QString handWidth_M = QStringLiteral("hand_width");
|
||||
const QString handLength_M = QStringLiteral("hand_length");
|
||||
const QString handGirth_M = QStringLiteral("hand_girth");
|
||||
//leg
|
||||
const QString thighGirth_M = QStringLiteral("thigh_girth");
|
||||
const QString midThighGirth_M = QStringLiteral("mid_thigh_girth");
|
||||
const QString kneeGirth_M = QStringLiteral("knee_girth");
|
||||
|
@ -103,8 +112,10 @@ const QString calfGirth_M = QStringLiteral("calf_girth");
|
|||
const QString ankleGirth_M = QStringLiteral("ankle_girth");
|
||||
const QString kneeHeight_M = QStringLiteral("knee_height");
|
||||
const QString ankleHeight_M = QStringLiteral("ankle_height");
|
||||
//foot
|
||||
const QString footWidth_M = QStringLiteral("foot_width");
|
||||
const QString footLength_M = QStringLiteral("foot_length");
|
||||
//heights
|
||||
const QString height_M = QStringLiteral("height");
|
||||
const QString cervicaleHeight_M = QStringLiteral("cervicale_height");
|
||||
const QString cervicaleToKneeHeight_M = QStringLiteral("cervicale_to_knee_height");
|
||||
|
|
|
@ -128,10 +128,12 @@ enum class GSizes : unsigned char { ALL,
|
|||
S42=42, S44=44, S46=46, S48=48, S50=50, S52=52, S54=54, S56=56 };
|
||||
|
||||
// measurements
|
||||
//head and neck
|
||||
extern const QString headGirth_M;
|
||||
extern const QString midNeckGirth_M;
|
||||
extern const QString neckBaseGirth_M;
|
||||
extern const QString headAndNeckLength_M;
|
||||
//torso
|
||||
extern const QString centerFrontWaistLength_M;
|
||||
extern const QString centerBackWaistLength_M;
|
||||
extern const QString shoulderLength_M;
|
||||
|
@ -177,6 +179,11 @@ extern const QString frontWaistSlope_M;
|
|||
extern const QString backWaistSlope_M;
|
||||
extern const QString frontNeckToUpperChestHeight_M;
|
||||
extern const QString frontNeckToBustHeight_M;
|
||||
extern const QString frontWaistToUpperChest_M;
|
||||
extern const QString frontWaistToLowerBreast_M;
|
||||
extern const QString backWaistToUpperChest_M;
|
||||
extern const QString strapLength_M;
|
||||
//arm
|
||||
extern const QString armscyeGirth_M;
|
||||
extern const QString elbowGirth_M;
|
||||
extern const QString upperArmGirth_M;
|
||||
|
@ -187,9 +194,11 @@ extern const QString underarmLength_M;
|
|||
extern const QString cervicaleToWristLength_M;
|
||||
extern const QString shoulderToElbowLength_M;
|
||||
extern const QString armLength_M;
|
||||
//hand
|
||||
extern const QString handWidth_M;
|
||||
extern const QString handLength_M;
|
||||
extern const QString handGirth_M;
|
||||
//leg
|
||||
extern const QString thighGirth_M;
|
||||
extern const QString midThighGirth_M;
|
||||
extern const QString kneeGirth_M;
|
||||
|
@ -197,8 +206,10 @@ extern const QString calfGirth_M;
|
|||
extern const QString ankleGirth_M;
|
||||
extern const QString kneeHeight_M;
|
||||
extern const QString ankleHeight_M;
|
||||
//foot
|
||||
extern const QString footWidth_M;
|
||||
extern const QString footLength_M;
|
||||
//heights
|
||||
extern const QString height_M;
|
||||
extern const QString cervicaleHeight_M;
|
||||
extern const QString cervicaleToKneeHeight_M;
|
||||
|
|
|
@ -273,6 +273,26 @@
|
|||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front_waist_to_upper_chest">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front_waist_to_lower_breast">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="back_waist_to_upper_chest">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="strap_length">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="value" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
|
|
@ -372,6 +372,34 @@
|
|||
<xs:attribute name="size_increase" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front_waist_to_upper_chest">
|
||||
<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_increase" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="front_waist_to_lower_breast">
|
||||
<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_increase" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="back_waist_to_upper_chest">
|
||||
<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_increase" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="strap_length">
|
||||
<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_increase" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<vit>
|
||||
<version>0.1.0</version>
|
||||
<version>0.2.0</version>
|
||||
<personal>
|
||||
<family-name/>
|
||||
<given-name/>
|
||||
|
@ -62,6 +62,10 @@
|
|||
<back_waist_slope value="0.0"/>
|
||||
<front_neck_to_upper_chest_height value="0.0"/>
|
||||
<front_neck_to_bust_height value="0.0"/>
|
||||
<front_waist_to_upper_chest value="0.0"/>
|
||||
<front_waist_to_lower_breast value="0.0"/>
|
||||
<back_waist_to_upper_chest value="0.0"/>
|
||||
<strap_length value="0.0"/>
|
||||
</torso>
|
||||
<arm>
|
||||
<armscye_girth value="0.0"/>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<vst>
|
||||
<version>0.1.0</version>
|
||||
<version>0.2.0</version>
|
||||
<description>Типовые фигуры мужчин 1-й полнотной группы, обхват груди 100 см</description>
|
||||
<unit>mm</unit>
|
||||
<size base="500"/>
|
||||
|
@ -58,6 +58,10 @@
|
|||
<back_waist_slope value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_neck_to_upper_chest_height value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_neck_to_bust_height value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
<front_waist_to_upper_chest value="0.0" size_increase="0" height_increase="0"/><!--Дпер(Длина переда от линии талии вверх по центру до начала ложбины)-->
|
||||
<front_waist_to_lower_breast value="0.0" size_increase="0" height_increase="0"/><!--Дпг(Длина от талии до основания грудных желез)-->
|
||||
<back_waist_to_upper_chest value="0.0" size_increase="0" height_increase="0"/><!--Дст(Длина спинки по спине от линии талии вверх до выступающего уголка лопатки)-->
|
||||
<strap_length value="0.0" size_increase="0" height_increase="0"/><!--Дбр(Длина бретели от выступающего уголка лопатки вертикально до начала грудной железы)-->
|
||||
</torso>
|
||||
<arm>
|
||||
<armscye_girth value="0.0" size_increase="0" height_increase="0"/><!--Нету перевода-->
|
||||
|
@ -112,7 +116,7 @@
|
|||
<side_waist_to_floor value="1120" size_increase="0" height_increase ="44"/><!--Дсб(Расстояние от линии талии до пола сбоку)-->
|
||||
<front_waist_to_floor value="1110" size_increase="0" height_increase ="43"/><!--Дсп(Расстояние от линии талии до пола спереди)-->
|
||||
<arc_through_groin_area value="783" size_increase="14" height_increase ="15"/><!--Дпоб(Дуга через паховую область)-->
|
||||
<waist_to_plane_seat value="260" size_increase="1" height_increase ="6"/><!--Дс(Расстояние от линии талии до плоскости сидения)-->
|
||||
<waist_to_plane_seat value="260" size_increase="1" height_increase ="6"/><!--Вс(Расстояние от линии талии до плоскости сидения)-->
|
||||
<neck_to_radial_point value="500" size_increase="2" height_increase ="15"/><!--Длуч(Расстояние от точки основания шеи сбоку до лучевой точки)-->
|
||||
<neck_to_third_finger value="970" size_increase="2" height_increase ="29"/><!--ДIIIп(Расстояние от точки основания шеи сбоку до конца третьего пальца)-->
|
||||
<neck_to_first_line_chest_circumference value="214" size_increase="3" height_increase ="3"/><!--Впрп(Расстояние от точки основания шеи сбоку до линии обхвата груди первого спереди)-->
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -146,6 +146,8 @@ private:
|
|||
void CorrectionsPositions(int position, int bias, QMap<int, QString> &tokens,
|
||||
QMap<int, QString> &numbers);
|
||||
void BiasTokens(int position, int bias, QMap<int, QString> &tokens) const;
|
||||
void InitMeasurement(const QString &name, const VTranslation &m, const VTranslation &g,
|
||||
const VTranslation &d);
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -51,6 +51,7 @@ VAbstractMeasurements::~VAbstractMeasurements()
|
|||
*/
|
||||
void VAbstractMeasurements::Measurements()
|
||||
{
|
||||
//Set of measurements common for both standard.
|
||||
//head and neck
|
||||
Measurement(headGirth_M);
|
||||
Measurement(midNeckGirth_M);
|
||||
|
@ -102,6 +103,10 @@ void VAbstractMeasurements::Measurements()
|
|||
Measurement(backWaistSlope_M);
|
||||
Measurement(frontNeckToUpperChestHeight_M);
|
||||
Measurement(frontNeckToBustHeight_M);
|
||||
Measurement(frontWaistToUpperChest_M);
|
||||
Measurement(frontWaistToLowerBreast_M);
|
||||
Measurement(backWaistToUpperChest_M);
|
||||
Measurement(strapLength_M);
|
||||
//arm
|
||||
Measurement(armscyeGirth_M);
|
||||
Measurement(elbowGirth_M);
|
||||
|
@ -251,7 +256,7 @@ void VAbstractMeasurements::Measurement(const QString &tag)
|
|||
const QDomNodeList nodeList = this->elementsByTagName(tag);
|
||||
if (nodeList.isEmpty())
|
||||
{
|
||||
qDebug()<<"Measurement" << tag <<"doesn't exist"<<Q_FUNC_INFO;
|
||||
qWarning()<<"Measurement" << tag <<"doesn't exist";
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -391,8 +391,8 @@ void VDomDocument::ValidateXML(const QString &schema, const QString &fileName)
|
|||
pattern.close();
|
||||
fileSchema.close();
|
||||
VException e(messageHandler.statusMessage());
|
||||
e.AddMoreInformation(tr("Validation error in line %1 column %2").arg(messageHandler.line())
|
||||
.arg(messageHandler.column()));
|
||||
e.AddMoreInformation(tr("Validation error file %3 in line %1 column %2").arg(messageHandler.line())
|
||||
.arg(messageHandler.column()).arg(fileName));
|
||||
throw e;
|
||||
}
|
||||
pattern.close();
|
||||
|
@ -416,7 +416,8 @@ void VDomDocument::setContent(const QString &fileName)
|
|||
{
|
||||
file.close();
|
||||
VException e(errorMsg);
|
||||
e.AddMoreInformation(tr("Parsing error in line %1 column %2").arg(errorLine).arg(errorColumn));
|
||||
e.AddMoreInformation(tr("Parsing error file %3 in line %1 column %2").arg(errorLine).arg(errorColumn)
|
||||
.arg(fileName));
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2471,18 +2471,29 @@ void VPattern::PrepareForParse(const Document &parse)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPattern::UpdateMeasurements()
|
||||
{
|
||||
const QString path = MPath();
|
||||
if (MType() == MeasurementsType::Standard)
|
||||
try
|
||||
{
|
||||
VStandardMeasurements m(data);
|
||||
m.setContent(path);
|
||||
m.Measurements();
|
||||
const QString path = MPath();
|
||||
if (MType() == MeasurementsType::Standard)
|
||||
{
|
||||
VStandardMeasurements m(data);
|
||||
ValidateXML("://schema/standard_measurements.xsd", path);
|
||||
m.setContent(path);
|
||||
m.Measurements();
|
||||
}
|
||||
else
|
||||
{
|
||||
VIndividualMeasurements m(data);
|
||||
ValidateXML("://schema/individual_measurements.xsd", path);
|
||||
m.setContent(path);
|
||||
m.Measurements();
|
||||
}
|
||||
}
|
||||
else
|
||||
catch (VException &e)
|
||||
{
|
||||
VIndividualMeasurements m(data);
|
||||
m.setContent(path);
|
||||
m.Measurements();
|
||||
e.CriticalMessageBox(tr("File error."), qApp->getMainWindow());
|
||||
emit ClearMainWindow();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user