#include <vvstconverter.h>
Public Member Functions | |
VVSTConverter (const QString &fileName) | |
virtual | ~VVSTConverter () Q_DECL_EQ_DEFAULT |
Public Member Functions inherited from VAbstractMConverter | |
VAbstractMConverter (const QString &fileName) | |
virtual | ~VAbstractMConverter () Q_DECL_EQ_DEFAULT |
Public Member Functions inherited from VAbstractConverter | |
VAbstractConverter (const QString &fileName) | |
virtual | ~VAbstractConverter () Q_DECL_EQ_DEFAULT |
QString | Convert () |
int | GetCurrentFormatVarsion () const |
QString | GetVersionStr () const |
Public Member Functions inherited from VDomDocument | |
VDomDocument () | |
virtual | ~VDomDocument () Q_DECL_EQ_DEFAULT |
QDomElement | elementById (quint32 id, const QString &tagName=QString()) |
template<typename T > | |
void | SetAttribute (QDomElement &domElement, const QString &name, const T &value) const |
SetAttribute set attribute in pattern file. Replace "," by ".". More... | |
Unit | MUnit () const |
virtual void | setXMLContent (const QString &fileName) |
virtual bool | SaveDocument (const QString &fileName, QString &error) |
QString | Major () const |
QString | Minor () const |
QString | Patch () const |
QDomNode | ParentNodeById (const quint32 &nodeId) |
QDomElement | CloneNodeById (const quint32 &nodeId) |
QDomElement | NodeById (const quint32 &nodeId) |
QVector< VLabelTemplateLine > | GetLabelTemplate (const QDomElement &element) const |
void | SetLabelTemplate (QDomElement &element, const QVector< VLabelTemplateLine > &lines) |
template<> | |
void | SetAttribute (QDomElement &domElement, const QString &name, const QString &value) const |
template<> | |
void | SetAttribute (QDomElement &domElement, const QString &name, const bool &value) const |
template<> | |
void | SetAttribute (QDomElement &domElement, const QString &name, const MeasurementsType &value) const |
Static Public Attributes | |
static const QString | MeasurementMaxVerStr = QStringLiteral("0.4.4") |
static const QString | CurrentSchema = QStringLiteral("://schema/standard_measurements/v0.4.4.xsd") |
static Q_DECL_CONSTEXPR const int | MeasurementMinVer = (( 0 <<16)|( 3 <<8)|( 0 )) |
static Q_DECL_CONSTEXPR const int | MeasurementMaxVer = (( 0 <<16)|( 4 <<8)|( 4 )) |
Static Public Attributes inherited from VDomDocument | |
static const QString | AttrId = QStringLiteral("id") |
static const QString | AttrText = QStringLiteral("text") |
static const QString | AttrBold = QStringLiteral("bold") |
static const QString | AttrItalic = QStringLiteral("italic") |
static const QString | AttrAlignment = QStringLiteral("alignment") |
static const QString | AttrFSIncrement = QStringLiteral("sfIncrement") |
static const QString | TagVersion = QStringLiteral("version") |
static const QString | TagUnit = QStringLiteral("unit") |
static const QString | TagLine = QStringLiteral("line") |
Protected Member Functions | |
virtual int | MinVer () const Q_DECL_OVERRIDE |
virtual int | MaxVer () const Q_DECL_OVERRIDE |
virtual QString | MinVerStr () const Q_DECL_OVERRIDE |
virtual QString | MaxVerStr () const Q_DECL_OVERRIDE |
virtual QString | XSDSchema (int ver) const Q_DECL_OVERRIDE |
virtual void | ApplyPatches () Q_DECL_OVERRIDE |
virtual void | DowngradeToCurrentMaxVersion () Q_DECL_OVERRIDE |
virtual bool | IsReadOnly () const Q_DECL_OVERRIDE |
Protected Member Functions inherited from VAbstractMConverter | |
void | AddRootComment () |
Protected Member Functions inherited from VAbstractConverter | |
void | ValidateInputFile (const QString ¤tSchema) const |
Q_NORETURN void | InvalidVersion (int ver) const |
void | Save () |
void | SetVersion (const QString &version) |
void | Replace (QString &formula, const QString &newName, int position, const QString &token, int &bias) const |
void | CorrectionsPositions (int position, int bias, QMap< int, QString > &tokens) const |
Protected Member Functions inherited from VDomDocument | |
bool | setTagText (const QString &tag, const QString &text) |
bool | setTagText (const QDomElement &domElement, const QString &text) |
QString | UniqueTagText (const QString &tagName, const QString &defVal=QString()) const |
void | TestUniqueId () const |
TestUniqueId test exist unique id in pattern file. Each id must be unique. More... | |
void | CollectId (const QDomElement &node, QVector< quint32 > &vector) const |
Private Member Functions | |
void | AddNewTagsForV0_4_0 () |
void | RemoveTagsForV0_4_0 () |
void | ConvertMeasurementsToV0_4_0 () |
QDomElement | AddMV0_4_0 (const QString &name, qreal value, qreal sizeIncrease, qreal heightIncrease) |
void | PM_SystemV0_4_1 () |
void | ConvertMeasurementsToV0_4_2 () |
void | ToV0_4_0 () |
void | ToV0_4_1 () |
void | ToV0_4_2 () |
void | ToV0_4_3 () |
void | ToV0_4_4 () |
Static Private Attributes | |
static const QString | MeasurementMinVerStr = QStringLiteral("0.3.0") |
Additional Inherited Members | |
Static Public Member Functions inherited from VAbstractConverter | |
static int | GetVersion (const QString &version) |
Static Public Member Functions inherited from VDomDocument | |
static quint32 | GetParametrUInt (const QDomElement &domElement, const QString &name, const QString &defValue) |
Returns the long long value of the given attribute. RENAME: GetParameterLongLong? More... | |
static bool | getParameterBool (const QDomElement &domElement, const QString &name, const QString &defValue) |
static NodeUsage | GetParametrUsage (const QDomElement &domElement, const QString &name) |
static void | SetParametrUsage (QDomElement &domElement, const QString &name, const NodeUsage &value) |
static QString | GetParametrString (const QDomElement &domElement, const QString &name, const QString &defValue=QString()) |
Returns the string value of the given attribute. RENAME: see above. More... | |
static QString | GetParametrEmptyString (const QDomElement &domElement, const QString &name) |
static qreal | GetParametrDouble (const QDomElement &domElement, const QString &name, const QString &defValue) |
Returns the double value of the given attribute. More... | |
static quint32 | getParameterId (const QDomElement &domElement) |
getParameterId return value id attribute. More... | |
static void | ValidateXML (const QString &schema, const QString &fileName) |
ValidateXML validate xml file by xsd schema. More... | |
static QString | UnitsHelpString () |
static void | RemoveAllChildren (QDomElement &domElement) |
RemoveAllChildren remove all children from file. More... | |
static bool | SafeCopy (const QString &source, const QString &destination, QString &error) |
Static Protected Member Functions inherited from VAbstractMConverter | |
static QMultiMap< QString, QString > | OldNamesToNewNames_InV0_3_0 () |
static QMap< QString, QString > | OldNamesToNewNames_InV0_3_3 () |
Static Protected Member Functions inherited from VAbstractConverter | |
static void | BiasTokens (int position, int bias, QMap< int, QString > &tokens) |
Protected Attributes inherited from VAbstractConverter | |
int | m_ver |
QString | m_convertedFileName |
Definition at line 65 of file vvstconverter.h.
|
explicit |
Definition at line 88 of file vvstconverter.cpp.
References CurrentSchema, and VAbstractConverter::ValidateInputFile().
|
virtual |
|
private |
Definition at line 274 of file vvstconverter.cpp.
References CONVERTER_VERSION_CHECK, MeasurementMinVer, and VDomDocument::SetAttribute().
Referenced by ConvertMeasurementsToV0_4_0().
|
private |
Definition at line 173 of file vvstconverter.cpp.
References CONVERTER_VERSION_CHECK, MeasurementMinVer, and VDomDocument::UniqueTagText().
Referenced by ToV0_4_0().
|
protectedvirtual |
Implements VAbstractConverter.
Definition at line 119 of file vvstconverter.cpp.
References VAbstractConverter::InvalidVersion(), VAbstractConverter::m_convertedFileName, VAbstractConverter::m_ver, ToV0_4_0(), ToV0_4_1(), ToV0_4_2(), ToV0_4_3(), ToV0_4_4(), V_FALLTHROUGH, VDomDocument::ValidateXML(), and XSDSchema().
|
private |
Definition at line 224 of file vvstconverter.cpp.
References AddMV0_4_0(), CONVERTER_VERSION_CHECK, VDomDocument::GetParametrDouble(), MeasurementMinVer, and VAbstractMConverter::OldNamesToNewNames_InV0_3_0().
Referenced by ToV0_4_0().
|
private |
Definition at line 310 of file vvstconverter.cpp.
References CONVERTER_VERSION_CHECK, VDomDocument::GetParametrString(), MeasurementMinVer, VAbstractMConverter::OldNamesToNewNames_InV0_3_3(), and VDomDocument::SetAttribute().
Referenced by ToV0_4_2().
|
protectedvirtual |
Implements VAbstractConverter.
Definition at line 152 of file vvstconverter.cpp.
References MeasurementMaxVerStr, VAbstractConverter::Save(), and VAbstractConverter::SetVersion().
|
protectedvirtual |
Implements VAbstractConverter.
Definition at line 159 of file vvstconverter.cpp.
References CONVERTER_VERSION_CHECK, falseStr, MeasurementMaxVer, strTagRead_Only, trueStr, and VDomDocument::UniqueTagText().
|
inlineprotectedvirtual |
Implements VAbstractConverter.
Definition at line 120 of file vvstconverter.h.
References MeasurementMaxVer.
|
inlineprotectedvirtual |
Implements VAbstractConverter.
Definition at line 132 of file vvstconverter.h.
References MeasurementMaxVerStr.
|
inlineprotectedvirtual |
Implements VAbstractConverter.
Definition at line 114 of file vvstconverter.h.
References MeasurementMinVer.
|
inlineprotectedvirtual |
Implements VAbstractConverter.
Definition at line 126 of file vvstconverter.h.
References MeasurementMinVerStr.
|
private |
Definition at line 293 of file vvstconverter.cpp.
References CONVERTER_VERSION_CHECK, and MeasurementMinVer.
Referenced by ToV0_4_1().
|
private |
Definition at line 198 of file vvstconverter.cpp.
References CONVERTER_VERSION_CHECK, and MeasurementMinVer.
Referenced by ToV0_4_0().
|
private |
Definition at line 343 of file vvstconverter.cpp.
References AddNewTagsForV0_4_0(), VAbstractMConverter::AddRootComment(), CONVERTER_VERSION_CHECK, ConvertMeasurementsToV0_4_0(), MeasurementMinVer, RemoveTagsForV0_4_0(), VAbstractConverter::Save(), and VAbstractConverter::SetVersion().
Referenced by ApplyPatches().
|
private |
Definition at line 358 of file vvstconverter.cpp.
References CONVERTER_VERSION_CHECK, MeasurementMinVer, PM_SystemV0_4_1(), VAbstractConverter::Save(), and VAbstractConverter::SetVersion().
Referenced by ApplyPatches().
|
private |
Definition at line 370 of file vvstconverter.cpp.
References CONVERTER_VERSION_CHECK, ConvertMeasurementsToV0_4_2(), MeasurementMinVer, VAbstractConverter::Save(), and VAbstractConverter::SetVersion().
Referenced by ApplyPatches().
|
private |
Definition at line 382 of file vvstconverter.cpp.
References CONVERTER_VERSION_CHECK, MeasurementMinVer, VAbstractConverter::Save(), and VAbstractConverter::SetVersion().
Referenced by ApplyPatches().
|
private |
Definition at line 393 of file vvstconverter.cpp.
References CONVERTER_VERSION_CHECK, MeasurementMinVer, VAbstractConverter::Save(), and VAbstractConverter::SetVersion().
Referenced by ApplyPatches().
|
protectedvirtual |
Implements VAbstractConverter.
Definition at line 95 of file vvstconverter.cpp.
References CurrentSchema, and VAbstractConverter::InvalidVersion().
Referenced by ApplyPatches().
|
static |
Definition at line 73 of file vvstconverter.h.
Referenced by VVSTConverter(), and XSDSchema().
|
static |
Definition at line 80 of file vvstconverter.h.
Referenced by TMainWindow::FileNew(), TMainWindow::FileSave(), IsReadOnly(), and MaxVer().
|
static |
Definition at line 72 of file vvstconverter.h.
Referenced by VMeasurements::CreateEmptyMultisizeFile(), DowngradeToCurrentMaxVersion(), TMainWindow::FileNew(), TMainWindow::FileSave(), and MaxVerStr().
|
static |
Definition at line 79 of file vvstconverter.h.
Referenced by AddMV0_4_0(), AddNewTagsForV0_4_0(), ConvertMeasurementsToV0_4_0(), ConvertMeasurementsToV0_4_2(), MinVer(), PM_SystemV0_4_1(), RemoveTagsForV0_4_0(), ToV0_4_0(), ToV0_4_1(), ToV0_4_2(), ToV0_4_3(), and ToV0_4_4().
|
staticprivate |
Definition at line 97 of file vvstconverter.h.
Referenced by MinVerStr().