From 76074f282002f83ed37c959b9e73b51208801c7c Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 3 Feb 2015 13:15:52 +0200 Subject: [PATCH] Pattern format 0.1.3 support colors. --HG-- branch : feature --- src/libs/ifc/schema.qrc | 1 + src/libs/ifc/schema/pattern/v0.1.3.xsd | 307 +++++++++++++++++++++++++ src/libs/ifc/xml/vpatternconverter.cpp | 22 +- src/libs/ifc/xml/vpatternconverter.h | 1 + 4 files changed, 328 insertions(+), 3 deletions(-) create mode 100644 src/libs/ifc/schema/pattern/v0.1.3.xsd diff --git a/src/libs/ifc/schema.qrc b/src/libs/ifc/schema.qrc index 2037ec8b5..f8b8fe11e 100644 --- a/src/libs/ifc/schema.qrc +++ b/src/libs/ifc/schema.qrc @@ -5,5 +5,6 @@ schema/pattern/v0.1.0.xsd schema/pattern/v0.1.1.xsd schema/pattern/v0.1.2.xsd + schema/pattern/v0.1.3.xsd diff --git a/src/libs/ifc/schema/pattern/v0.1.3.xsd b/src/libs/ifc/schema/pattern/v0.1.3.xsd new file mode 100644 index 000000000..18cf62b78 --- /dev/null +++ b/src/libs/ifc/schema/pattern/v0.1.3.xsd @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/libs/ifc/xml/vpatternconverter.cpp b/src/libs/ifc/xml/vpatternconverter.cpp index af47c64ed..df94c32cc 100644 --- a/src/libs/ifc/xml/vpatternconverter.cpp +++ b/src/libs/ifc/xml/vpatternconverter.cpp @@ -40,8 +40,8 @@ */ const QString VPatternConverter::PatternMinVerStr = QStringLiteral("0.1.0"); -const QString VPatternConverter::PatternMaxVerStr = QStringLiteral("0.1.2"); -const QString VPatternConverter::CurrentSchema = QStringLiteral("://schema/pattern/v0.1.2.xsd"); +const QString VPatternConverter::PatternMaxVerStr = QStringLiteral("0.1.3"); +const QString VPatternConverter::CurrentSchema = QStringLiteral("://schema/pattern/v0.1.3.xsd"); //--------------------------------------------------------------------------------------------------------------------- VPatternConverter::VPatternConverter(const QString &fileName) @@ -91,6 +91,8 @@ QString VPatternConverter::XSDSchema(int ver) const case (0x000101): return QStringLiteral("://schema/pattern/v0.1.1.xsd"); case (0x000102): + return QStringLiteral("://schema/pattern/v0.1.2.xsd"); + case (0x000103): return CurrentSchema; default: { @@ -119,9 +121,16 @@ void VPatternConverter::ApplyPatches() ToV0_1_2(); const QString schema = XSDSchema(0x000102); ValidateXML(schema, fileName); - break; + // continue conversion } case (0x000102): + { + ToV0_1_3(); + const QString schema = XSDSchema(0x000103); + ValidateXML(schema, fileName); + // continue conversion + } + case (0x000103): break; default: break; @@ -159,3 +168,10 @@ void VPatternConverter::ToV0_1_2() SetVersion(QStringLiteral("0.1.2")); Save(); } + +//--------------------------------------------------------------------------------------------------------------------- +void VPatternConverter::ToV0_1_3() +{ + SetVersion(QStringLiteral("0.1.3")); + Save(); +} diff --git a/src/libs/ifc/xml/vpatternconverter.h b/src/libs/ifc/xml/vpatternconverter.h index 5d8b4c651..b8afb8c3c 100644 --- a/src/libs/ifc/xml/vpatternconverter.h +++ b/src/libs/ifc/xml/vpatternconverter.h @@ -57,6 +57,7 @@ private: void ToV0_1_1(); void ToV0_1_2(); + void ToV0_1_3(); }; #endif // VPATTERNCONVERTER_H