From 506ca0612c3469ab64589e5f315a58ca8c129add Mon Sep 17 00:00:00 2001 From: Murloc Date: Thu, 9 Mar 2017 21:41:48 +0100 Subject: [PATCH] Add 200 in heights --HG-- branch : feature --- ChangeLog.txt | 1 + src/app/valentina/dialogs/dialogpatternproperties.cpp | 4 +++- src/app/valentina/dialogs/dialogpatternproperties.ui | 10 ++++++++++ src/libs/ifc/xml/vabstractpattern.cpp | 5 +++++ src/libs/ifc/xml/vabstractpattern.h | 1 + src/libs/vmisc/def.h | 2 +- src/libs/vpatterndb/variables/vmeasurement.cpp | 2 +- 7 files changed, 22 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 7cb5477de..788da933b 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,4 +1,5 @@ # Version 0.5.0 +- Add 200 in heights - [#581] User can now filter input lists by keyword in function wizard. - [#24] User can now add labels with different information on the detail - [#505] New installer script based on Inno Setup 5. diff --git a/src/app/valentina/dialogs/dialogpatternproperties.cpp b/src/app/valentina/dialogs/dialogpatternproperties.cpp index 32317f765..5392f45af 100644 --- a/src/app/valentina/dialogs/dialogpatternproperties.cpp +++ b/src/app/valentina/dialogs/dialogpatternproperties.cpp @@ -38,7 +38,7 @@ #include "../core/vapplication.h" // calc how many combinations we have -static const int heightsCount = (static_cast(GHeights::H194) - +static const int heightsCount = (static_cast(GHeights::H200) - (static_cast(GHeights::H50) - heightStep))/heightStep; static const int sizesCount = (static_cast(GSizes::S72) - (static_cast(GSizes::S22) - sizeStep))/sizeStep; @@ -469,6 +469,7 @@ void DialogPatternProperties::SetHeightsChecked(bool enabled) ui->checkBoxH182->setChecked(enabled); ui->checkBoxH188->setChecked(enabled); ui->checkBoxH194->setChecked(enabled); + ui->checkBoxH200->setChecked(enabled); } //--------------------------------------------------------------------------------------------------------------------- @@ -532,6 +533,7 @@ void DialogPatternProperties::InitHeights() Init(ui->checkBoxH182, static_cast(GHeights::H182), &DialogPatternProperties::CheckStateHeight); Init(ui->checkBoxH188, static_cast(GHeights::H188), &DialogPatternProperties::CheckStateHeight); Init(ui->checkBoxH194, static_cast(GHeights::H194), &DialogPatternProperties::CheckStateHeight); + Init(ui->checkBoxH200, static_cast(GHeights::H200), &DialogPatternProperties::CheckStateHeight); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/valentina/dialogs/dialogpatternproperties.ui b/src/app/valentina/dialogs/dialogpatternproperties.ui index 173d4e34e..6af2721d1 100644 --- a/src/app/valentina/dialogs/dialogpatternproperties.ui +++ b/src/app/valentina/dialogs/dialogpatternproperties.ui @@ -722,6 +722,16 @@ + + + + 200 + + + true + + + diff --git a/src/libs/ifc/xml/vabstractpattern.cpp b/src/libs/ifc/xml/vabstractpattern.cpp index 64abed537..8e714f415 100644 --- a/src/libs/ifc/xml/vabstractpattern.cpp +++ b/src/libs/ifc/xml/vabstractpattern.cpp @@ -143,6 +143,7 @@ const QString VAbstractPattern::AttrH176 = QStringLiteral("h176"); const QString VAbstractPattern::AttrH182 = QStringLiteral("h182"); const QString VAbstractPattern::AttrH188 = QStringLiteral("h188"); const QString VAbstractPattern::AttrH194 = QStringLiteral("h194"); +const QString VAbstractPattern::AttrH200 = QStringLiteral("h200"); const QString VAbstractPattern::AttrS22 = QStringLiteral("s22"); const QString VAbstractPattern::AttrS24 = QStringLiteral("s24"); @@ -862,6 +863,7 @@ QMap VAbstractPattern::GetGradationHeights() const map.insert(GHeights::H182, true); map.insert(GHeights::H188, true); map.insert(GHeights::H194, true); + map.insert(GHeights::H200, true); QDomNodeList tags = elementsByTagName(TagGradation); if (tags.size() == 0) @@ -916,6 +918,7 @@ QMap VAbstractPattern::GetGradationHeights() const map.insert(GHeights::H182, GetParametrBool(domElement, AttrH182, defValue)); map.insert(GHeights::H188, GetParametrBool(domElement, AttrH188, defValue)); map.insert(GHeights::H194, GetParametrBool(domElement, AttrH194, defValue)); + map.insert(GHeights::H200, GetParametrBool(domElement, AttrH200, defValue)); return map; break; case 1: // TagSizes @@ -981,6 +984,7 @@ void VAbstractPattern::SetGradationHeights(const QMap &options) domElement.removeAttribute(AttrH182); domElement.removeAttribute(AttrH188); domElement.removeAttribute(AttrH194); + domElement.removeAttribute(AttrH200); } else { @@ -1009,6 +1013,7 @@ void VAbstractPattern::SetGradationHeights(const QMap &options) SetAttribute(domElement, AttrH182, options.value(GHeights::H182)); SetAttribute(domElement, AttrH188, options.value(GHeights::H188)); SetAttribute(domElement, AttrH194, options.value(GHeights::H194)); + SetAttribute(domElement, AttrH200, options.value(GHeights::H200)); } modified = true; diff --git a/src/libs/ifc/xml/vabstractpattern.h b/src/libs/ifc/xml/vabstractpattern.h index 3e221ab73..bdc11de53 100644 --- a/src/libs/ifc/xml/vabstractpattern.h +++ b/src/libs/ifc/xml/vabstractpattern.h @@ -253,6 +253,7 @@ public: static const QString AttrH182; static const QString AttrH188; static const QString AttrH194; + static const QString AttrH200; static const QString AttrS22; static const QString AttrS24; diff --git a/src/libs/vmisc/def.h b/src/libs/vmisc/def.h index 74afc98f8..c8149b503 100644 --- a/src/libs/vmisc/def.h +++ b/src/libs/vmisc/def.h @@ -211,7 +211,7 @@ enum class GHeights : unsigned char { ALL, H50=50, H56=56, H62=62, H68=68, H74=74, H80=80, H86=86, H92=92, H98=98, H104=104, H110=110, H116=116, H122=122, H128=128, H134=134, H140=140, H146=146, H152=152, H158=158, H164=164, H170=170, H176=176, H182=182, H188=188, - H194=194}; + H194=194, H200=200}; static const int sizeStep = 2; enum class GSizes : unsigned char { ALL, diff --git a/src/libs/vpatterndb/variables/vmeasurement.cpp b/src/libs/vpatterndb/variables/vmeasurement.cpp index 52a5cd874..d5e224a6e 100644 --- a/src/libs/vpatterndb/variables/vmeasurement.cpp +++ b/src/libs/vpatterndb/variables/vmeasurement.cpp @@ -158,7 +158,7 @@ QStringList VMeasurement::WholeListHeights(Unit patternUnit) return list; } - for (int i = static_cast(GHeights::H50); i<= static_cast(GHeights::H194); i = i+heightStep) + for (int i = static_cast(GHeights::H50); i<= static_cast(GHeights::H200); i = i+heightStep) { ListValue(list, i, patternUnit); }