Save option Full Circumference.
This commit is contained in:
parent
daef1799ab
commit
a0cfebf10d
|
@ -197,6 +197,12 @@ QVector<MeasurementDimension_p> DialogSetupMultisize::Dimensions() const
|
||||||
return dimensions;
|
return dimensions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
bool DialogSetupMultisize::FullCircumference() const
|
||||||
|
{
|
||||||
|
return ui->checkBoxFullCircumference->isChecked();
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSetupMultisize::changeEvent(QEvent *event)
|
void DialogSetupMultisize::changeEvent(QEvent *event)
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,6 +50,8 @@ public:
|
||||||
|
|
||||||
QVector<MeasurementDimension_p> Dimensions() const;
|
QVector<MeasurementDimension_p> Dimensions() const;
|
||||||
|
|
||||||
|
bool FullCircumference() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void changeEvent(QEvent* event) override;
|
virtual void changeEvent(QEvent* event) override;
|
||||||
virtual void showEvent(QShowEvent *event) override;
|
virtual void showEvent(QShowEvent *event) override;
|
||||||
|
|
|
@ -381,6 +381,7 @@ void TMainWindow::FileNew()
|
||||||
data = new VContainer(qApp->TrVars(), &mUnit, VContainer::UniqueNamespace());
|
data = new VContainer(qApp->TrVars(), &mUnit, VContainer::UniqueNamespace());
|
||||||
|
|
||||||
m = new VMeasurements(mUnit, setup.Dimensions(), data);
|
m = new VMeasurements(mUnit, setup.Dimensions(), data);
|
||||||
|
m->SetFullCircumference(setup.FullCircumference());
|
||||||
m_curFileFormatVersion = VVSTConverter::MeasurementMaxVer;
|
m_curFileFormatVersion = VVSTConverter::MeasurementMaxVer;
|
||||||
m_curFileFormatVersionStr = VVSTConverter::MeasurementMaxVerStr;
|
m_curFileFormatVersionStr = VVSTConverter::MeasurementMaxVerStr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
|
<xs:attribute name="fullCircumference" type="xs:boolean"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="restrictions">
|
<xs:element name="restrictions">
|
||||||
|
|
|
@ -83,6 +83,7 @@ const QString VMeasurements::AttrMin = QStringLiteral("min");
|
||||||
const QString VMeasurements::AttrMax = QStringLiteral("max");
|
const QString VMeasurements::AttrMax = QStringLiteral("max");
|
||||||
const QString VMeasurements::AttrStep = QStringLiteral("step");
|
const QString VMeasurements::AttrStep = QStringLiteral("step");
|
||||||
const QString VMeasurements::AttrCircumference = QStringLiteral("circumference");
|
const QString VMeasurements::AttrCircumference = QStringLiteral("circumference");
|
||||||
|
const QString VMeasurements::AttrFullCircumference = QStringLiteral("fullCircumference");
|
||||||
|
|
||||||
const QString VMeasurements::GenderMale = QStringLiteral("male");
|
const QString VMeasurements::GenderMale = QStringLiteral("male");
|
||||||
const QString VMeasurements::GenderFemale = QStringLiteral("female");
|
const QString VMeasurements::GenderFemale = QStringLiteral("female");
|
||||||
|
@ -509,6 +510,36 @@ void VMeasurements::SetReadOnly(bool ro)
|
||||||
setTagText(TagReadOnly, ro ? trueStr : falseStr);
|
setTagText(TagReadOnly, ro ? trueStr : falseStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
bool VMeasurements::IsFullCircumference() const
|
||||||
|
{
|
||||||
|
QDomElement dimenstionsTag = firstChildElement(TagDimensions);
|
||||||
|
if (not dimenstionsTag.isNull())
|
||||||
|
{
|
||||||
|
return GetParametrBool(dimenstionsTag, AttrFullCircumference, falseStr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
qDebug()<<"Can't read full circumference "<<Q_FUNC_INFO;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void VMeasurements::SetFullCircumference(bool fc)
|
||||||
|
{
|
||||||
|
QDomElement dimenstionsTag = firstChildElement(TagDimensions);
|
||||||
|
if (not dimenstionsTag.isNull())
|
||||||
|
{
|
||||||
|
SetAttributeOrRemoveIf(dimenstionsTag, AttrFullCircumference, fc, not fc);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
qDebug()<<"Can't save full circumference "<<Q_FUNC_INFO;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VMeasurements::SetMName(const QString &name, const QString &text)
|
void VMeasurements::SetMName(const QString &name, const QString &text)
|
||||||
{
|
{
|
||||||
|
|
|
@ -96,6 +96,9 @@ public:
|
||||||
bool IsReadOnly() const;
|
bool IsReadOnly() const;
|
||||||
void SetReadOnly(bool ro);
|
void SetReadOnly(bool ro);
|
||||||
|
|
||||||
|
bool IsFullCircumference() const;
|
||||||
|
void SetFullCircumference(bool fc);
|
||||||
|
|
||||||
void SetMName(const QString &name, const QString &text);
|
void SetMName(const QString &name, const QString &text);
|
||||||
void SetMValue(const QString &name, const QString &text);
|
void SetMValue(const QString &name, const QString &text);
|
||||||
void SetMBaseValue(const QString &name, double value);
|
void SetMBaseValue(const QString &name, double value);
|
||||||
|
@ -133,6 +136,7 @@ public:
|
||||||
static const QString AttrMax;
|
static const QString AttrMax;
|
||||||
static const QString AttrStep;
|
static const QString AttrStep;
|
||||||
static const QString AttrCircumference;
|
static const QString AttrCircumference;
|
||||||
|
static const QString AttrFullCircumference;
|
||||||
|
|
||||||
static const QString GenderMale;
|
static const QString GenderMale;
|
||||||
static const QString GenderFemale;
|
static const QString GenderFemale;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user