You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
3.9 KiB
101 lines
3.9 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
xmlns:qxg="https://skycoder42.de/QXmlCodeGen"><!-- TODO proper name/url -->
|
|
<!-- QXG Definitions -->
|
|
<qxg:config class="SettingsGeneratorBase"
|
|
stdcompat="true">
|
|
<qxg:include>QtCore/QHash</qxg:include>
|
|
</qxg:config>
|
|
<qxg:method name="read_type_mapping" type="QHash<QString, QString>" asGroup="true"/>
|
|
|
|
<!-- Type definitions -->
|
|
<xs:complexType name="IncludeType">
|
|
<xs:simpleContent>
|
|
<xs:extension base="xs:string" qxg:member="include">
|
|
<xs:attribute default="false" name="local" type="xs:boolean" use="optional"/>
|
|
</xs:extension>
|
|
</xs:simpleContent>
|
|
</xs:complexType>
|
|
|
|
<!--xs:complexType name="Import">
|
|
<xs:simpleContent>
|
|
<xs:extension base="xs:string">
|
|
<xs:attribute default="true" name="required" type="xs:boolean" use="optional"/>
|
|
<xs:attribute name="rootNode" type="xs:string" use="optional"/>
|
|
</xs:extension>
|
|
</xs:simpleContent>
|
|
</xs:complexType-->
|
|
|
|
<xs:complexType name="TypeMappingEntry">
|
|
<xs:attribute name="key" type="xs:string" use="required"/>
|
|
<xs:attribute name="type" type="xs:string" use="required"/>
|
|
</xs:complexType>
|
|
|
|
<xs:group name="TypeMappingGroup">
|
|
<xs:sequence>
|
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="TypeMapping" type="TypeMappingEntry"/>
|
|
</xs:sequence>
|
|
</xs:group>
|
|
|
|
<xs:complexType name="ParamType">
|
|
<xs:simpleContent>
|
|
<xs:extension base="xs:string" qxg:member="value">
|
|
<xs:attribute name="key" type="xs:string" use="required"/>
|
|
<xs:attribute name="type" type="xs:string" use="required"/>
|
|
<xs:attribute default="false" name="asStr" type="xs:boolean" use="optional"/>
|
|
</xs:extension>
|
|
</xs:simpleContent>
|
|
</xs:complexType>
|
|
|
|
<xs:complexType name="BackendType">
|
|
<xs:sequence>
|
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Param" type="ParamType"/>
|
|
</xs:sequence>
|
|
<xs:attribute name="class" type="xs:string" use="required" qxg:member="className"/>
|
|
</xs:complexType>
|
|
|
|
<xs:group name="NodeContentGroup">
|
|
<xs:sequence>
|
|
<xs:choice maxOccurs="unbounded" minOccurs="0" qxg:unordered="true">
|
|
<xs:element name="Node" type="NodeType" qxg:member="nodes"/>
|
|
<xs:element name="Entry" type="EntryType" qxg:member="entries"/>
|
|
<!--xs:element name="Import" type="Import"/-->
|
|
</xs:choice>
|
|
</xs:sequence>
|
|
</xs:group>
|
|
|
|
<xs:complexType name="NodeType" qxg:declare="true">
|
|
<xs:group ref="NodeContentGroup" qxg:inherit="true"/>
|
|
<xs:attribute name="key" type="xs:string" use="required"/>
|
|
</xs:complexType>
|
|
|
|
<xs:complexType name="EntryType" qxg:declare="true">
|
|
<xs:complexContent>
|
|
<xs:extension base="NodeType">
|
|
<xs:sequence>
|
|
<xs:element maxOccurs="1" minOccurs="0" name="Code" type="xs:string"/>
|
|
</xs:sequence>
|
|
<xs:attribute name="type" type="xs:string" use="required"/>
|
|
<xs:attribute name="qmlGroupKey" type="xs:string" use="optional"/>
|
|
<xs:attribute name="default" type="xs:string" use="optional" qxg:member="defaultValue"/>
|
|
<xs:attribute default="false" name="tr" type="xs:boolean" use="optional"/>
|
|
<xs:attribute name="trContext" type="xs:string" use="optional"/>
|
|
</xs:extension>
|
|
</xs:complexContent>
|
|
</xs:complexType>
|
|
|
|
<xs:complexType name="SettingsType">
|
|
<xs:sequence>
|
|
<xs:element maxOccurs="unbounded" minOccurs="0" name="Include" type="IncludeType" qxg:member="includes"/>
|
|
<xs:element maxOccurs="1" minOccurs="0" name="Backend" type="BackendType"/>
|
|
<xs:group ref="TypeMappingGroup" qxg:member="typeMappings" qxg:method="read_type_mapping" qxg:methodType="QHash<QString, QString>"/> <!-- TODO should be auto-detected -->
|
|
<xs:group ref="NodeContentGroup" qxg:inherit="true"/>
|
|
</xs:sequence>
|
|
<xs:attribute name="name" type="xs:string" use="optional"/>
|
|
<xs:attribute name="prefix" type="xs:string" use="optional"/>
|
|
<xs:attribute name="baseKey" type="xs:string" use="optional"/>
|
|
</xs:complexType>
|
|
|
|
<!-- root elements-->
|
|
<xs:element name="Settings" type="SettingsType"/>
|
|
</xs:schema>
|
|
|