Compare commits

...

6 Commits
v1.3.8 ... main

15 changed files with 191 additions and 1842 deletions

View File

@ -11,7 +11,7 @@ ReflowComments: true
SpacesBeforeTrailingComments: 3 SpacesBeforeTrailingComments: 3
TabWidth: 4 TabWidth: 4
ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerAllOnOneLineOrOnePerLine: true
ColumnLimit: 80 ColumnLimit: 130
AllowShortBlocksOnASingleLine: Never AllowShortBlocksOnASingleLine: Never
AllowShortFunctionsOnASingleLine: None AllowShortFunctionsOnASingleLine: None
AllowShortEnumsOnASingleLine: false AllowShortEnumsOnASingleLine: false

814
.vscode/qt5.natvis vendored
View File

@ -1,814 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--************************************************************************************************
Copyright (C) 2023 The Qt Company Ltd.
SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
*************************************************************************************************-->
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="QUuid">
<DisplayString>{{{data1,Xb}-{data2,Xb}-{data3,Xb}-{(data4[0]),nvoXb}{(data4[1]),nvoXb}-{(data4[2]),nvoXb}{(data4[3]),nvoXb}{(data4[4]),nvoXb}{(data4[5]),nvoXb}{(data4[6]),nvoXb}{(data4[7]),nvoXb}}}</DisplayString>
</Type>
<Type Name="QPoint">
<AlternativeType Name="QPointF"/>
<DisplayString>{{ x = {xp}, y = {yp} }}</DisplayString>
<Expand>
<Item Name="[x]">xp</Item>
<Item Name="[y]">yp</Item>
</Expand>
</Type>
<Type Name="QRect">
<DisplayString>{{ x = {x1}, y = {y1}, width = {x2 - x1 + 1}, height = {y2 - y1 + 1} }}</DisplayString>
<Expand>
<Item Name="[x]">x1</Item>
<Item Name="[y]">y1</Item>
<Item Name="[width]">x2 - x1 + 1</Item>
<Item Name="[height]">y2 - y1 + 1</Item>
</Expand>
</Type>
<Type Name="QRectF">
<DisplayString>{{ x = {xp}, y = {yp}, width = {w}, height = {h} }}</DisplayString>
<Expand>
<Item Name="[x]">xp</Item>
<Item Name="[y]">yp</Item>
<Item Name="[width]">w</Item>
<Item Name="[height]">h</Item>
</Expand>
</Type>
<Type Name="QSize">
<AlternativeType Name="QSizeF"/>
<DisplayString>{{ width = {wd}, height = {ht} }}</DisplayString>
<Expand>
<Item Name="[width]">wd</Item>
<Item Name="[height]">ht</Item>
</Expand>
</Type>
<Type Name="QLine">
<AlternativeType Name="QLineF"/>
<DisplayString>{{ start point = {pt1}, end point = {pt2} }}</DisplayString>
<Expand>
<Synthetic Name="[start point]">
<DisplayString>{pt1}</DisplayString>
<Expand>
<ExpandedItem>pt1</ExpandedItem>
</Expand>
</Synthetic>
<Synthetic Name="[end point]">
<DisplayString>{pt2}</DisplayString>
<Expand>
<ExpandedItem>pt2</ExpandedItem>
</Expand>
</Synthetic>
</Expand>
</Type>
<Type Name="QPolygon">
<DisplayString>{{ size = {d-&gt;size} }}</DisplayString>
<Expand>
<Item Name="[referenced]">d-&gt;ref.atomic._q_value</Item>
<ArrayItems>
<Size>d-&gt;size</Size>
<ValuePointer>(QPoint*)((reinterpret_cast&lt;char*&gt;(d)) + d-&gt;offset)</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="QPolygonF">
<DisplayString>{{ size = {d-&gt;size} }}</DisplayString>
<Expand>
<Item Name="[closed]">
d-&gt;size &gt; 0
&amp;&amp; ((((QPointF*)((reinterpret_cast&lt;char*&gt;(d)) + d-&gt;offset)[0]).xp
== (((QPointF*)((reinterpret_cast&lt;char*&gt;(d)) + d-&gt;offset)[d-&gt;size - 1]).xp)
&amp;&amp; ((((QPointF*)((reinterpret_cast&lt;char*&gt;(d)) + d-&gt;offset)[0]).yp
== (((QPointF*)((reinterpret_cast&lt;char*&gt;(d)) + d-&gt;offset)[d-&gt;size - 1]).yp)
</Item>
<Item Name="[referenced]">d-&gt;ref.atomic._q_value</Item>
<ArrayItems>
<Size>d-&gt;size</Size>
<ValuePointer>(QPointF*)((reinterpret_cast&lt;char*&gt;(d)) + d-&gt;offset)</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name ="QVector2D">
<DisplayString>{{ x = {xp}, y = {yp} }}</DisplayString>
<Expand>
<Item Name="[x]">xp</Item>
<Item Name="[y]">yp</Item>
</Expand>
</Type>
<Type Name ="QVector3D">
<DisplayString>{{ x = {xp}, y = {yp}, z = {zp} }}</DisplayString>
<Expand>
<Item Name="[x]">xp</Item>
<Item Name="[y]">yp</Item>
<Item Name="[z]">zp</Item>
</Expand>
</Type>
<Type Name ="QVector4D">
<DisplayString>{{ x = {xp}, y = {yp}, z = {zp}, w = {wp} }}</DisplayString>
<Expand>
<Item Name="[x]">xp</Item>
<Item Name="[y]">yp</Item>
<Item Name="[z]">zp</Item>
<Item Name="[w]">wp</Item>
</Expand>
</Type>
<Type Name ="QMatrix">
<DisplayString>
{{ m11 = {_m11}, m12 = {_m12}, m21 = {_m21}, m22 = {_m22}, ... }}
</DisplayString>
<Expand>
<Item Name="[m11]">_m11</Item>
<Item Name="[m12]">_m12</Item>
<Item Name="[m21]">_m21</Item>
<Item Name="[m22]">_m22</Item>
<Item Name="[dx]">_dx</Item>
<Item Name="[dy]">_dy</Item>
</Expand>
</Type>
<Type Name ="QMatrix4x4">
<DisplayString>
{{ m11 = {m[0][0]}, m12 = {m[1][0]}, m13 = {m[2][0]}, m14 = {m[3][0]}, ... }}
</DisplayString>
<Expand>
<Item Name="[m11]">m[0][0]</Item>
<Item Name="[m12]">m[1][0]</Item>
<Item Name="[m13]">m[2][0]</Item>
<Item Name="[m14]">m[3][0]</Item>
<Item Name="[m21]">m[0][1]</Item>
<Item Name="[m22]">m[1][1]</Item>
<Item Name="[m23]">m[2][1]</Item>
<Item Name="[m24]">m[3][1]</Item>
<Item Name="[m31]">m[0][2]</Item>
<Item Name="[m32]">m[1][2]</Item>
<Item Name="[m33]">m[2][2]</Item>
<Item Name="[m34]">m[3][2]</Item>
<Item Name="[m41]">m[0][3]</Item>
<Item Name="[m42]">m[1][3]</Item>
<Item Name="[m43]">m[2][3]</Item>
<Item Name="[m44]">m[3][3]</Item>
</Expand>
</Type>
<Type Name="QSizePolicy">
<DisplayString>
{{ horizontal = {static_cast&lt;Policy&gt;(bits.horPolicy)}, vertical = {static_cast&lt;Policy&gt;(bits.verPolicy)}, type = {ControlType(1 &lt;&lt; bits.ctype)} }}
</DisplayString>
<Expand>
<Synthetic Name="[vertical policy]">
<DisplayString>QSizePolicy::Policy::{static_cast&lt;Policy&gt;(bits.verPolicy)}</DisplayString>
</Synthetic>
<Synthetic Name="[horizontal policy]">
<DisplayString>QSizePolicy::Policy::{static_cast&lt;Policy&gt;(bits.horPolicy)}</DisplayString>
</Synthetic>
<Synthetic Name="[control type]">
<DisplayString>QSizePolicy::ControlType::{ControlType(1 &lt;&lt; bits.ctype)}</DisplayString>
</Synthetic>
<Synthetic Name="[expanding directions]">
<DisplayString
Condition="(static_cast&lt;Policy&gt;(bits.verPolicy) &amp; ExpandFlag)">
Qt::Vertical (2)
</DisplayString>
<DisplayString
Condition="(static_cast&lt;Policy&gt;(bits.horPolicy) &amp; ExpandFlag)">
Qt::Horizontal (1)
</DisplayString>
</Synthetic>
<Item Name="[vertical stretch]">static_cast&lt;int&gt;(bits.verStretch)</Item>
<Item Name="[horizontal stretch]">static_cast&lt;int&gt;(bits.horStretch)</Item>
<Item Name="[has height for width]">bits.hfw == 1</Item>
<Item Name="[has width for height]">bits.wfh == 1</Item>
</Expand>
</Type>
<Type Name="QChar">
<DisplayString>{ucs,c}</DisplayString>
<StringView>ucs,c</StringView>
<Expand>
<Item Name="[latin 1]">ucs > 0xff ? '\0' : char(ucs),c</Item>
<Item Name="[unicode]">ucs,c</Item>
</Expand>
</Type>
<Type Name="QString">
<DisplayString>{((reinterpret_cast&lt;unsigned short*&gt;(d)) + d-&gt;offset / 2),sub}</DisplayString>
<StringView>((reinterpret_cast&lt;unsigned short*&gt;(d)) + d-&gt;offset / 2),sub</StringView>
<Expand>
<Item Name="[size]">d-&gt;size</Item>
<Item Name="[referenced]">d-&gt;ref.atomic._q_value</Item>
<ArrayItems>
<Size>d-&gt;size</Size>
<ValuePointer>((reinterpret_cast&lt;unsigned short*&gt;(d)) + d-&gt;offset / 2),c</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="QStringRef">
<Intrinsic Name="offset" Expression="(reinterpret_cast&lt;char16_t*&gt;(m_string-&gt;d))
+ m_string-&gt;d->offset / 2" />
<DisplayString Condition="m_string == nullptr">{m_string,[m_size]} u""</DisplayString>
<DisplayString Condition="m_string != nullptr">{offset() + m_position,[m_size]}</DisplayString>
<Expand>
<Item Name="[position]" ExcludeView="simple">m_position</Item>
<Item Name="[size]" ExcludeView="simple">m_size</Item>
<ArrayItems Condition="m_string != nullptr">
<Size>m_size</Size>
<ValuePointer>offset()+m_position</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="QStringView">
<DisplayString>{m_data,[m_size]}</DisplayString>
<StringView>m_data,[m_size]</StringView>
<Expand>
<Item Name="[size]" ExcludeView="simple">m_size</Item>
<ArrayItems>
<Size>m_size</Size>
<ValuePointer>m_data</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="QByteArray">
<DisplayString>{((reinterpret_cast&lt;char*&gt;(d)) + d-&gt;offset),sb}</DisplayString>
<StringView>((reinterpret_cast&lt;char*&gt;(d)) + d-&gt;offset),sb</StringView>
<Expand>
<Item Name="[size]">d-&gt;size</Item>
<Item Name="[referenced]">d-&gt;ref.atomic._q_value</Item>
<ArrayItems>
<Size>d-&gt;size</Size>
<ValuePointer>((reinterpret_cast&lt;char*&gt;(d)) + d-&gt;offset),c</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="QUrl">
<Intrinsic Name="isEmpty" Expression="size==0">
<Parameter Name="size" Type="int"/>
</Intrinsic>
<Intrinsic Name="memberOffset" Expression="sizeof(QAtomicInt) + sizeof(int) + (sizeof(QString) * count)">
<Parameter Name="count" Type="int"/>
</Intrinsic>
<Intrinsic Name="scheme" Expression="*((QString*)(((char*)(d) + memberOffset(0))))" />
<Intrinsic Name="username" Expression="*((QString*)(((char*)(d) + memberOffset(1))))" />
<Intrinsic Name="password" Expression="*((QString*)(((char*)(d) + memberOffset(2))))" />
<Intrinsic Name="host" Expression="*((QString*)(((char*)(d) + memberOffset(3))))" />
<Intrinsic Name="path" Expression="*((QString*)(((char*)(d) + memberOffset(4))))" />
<Intrinsic Name="query" Expression="*((QString*)(((char*)(d) + memberOffset(5))))" />
<Intrinsic Name="fragment" Expression="*((QString*)(((char*)(d) + memberOffset(6))))" />
<DisplayString Condition="!isEmpty(scheme().d-&gt;size)">{scheme()}://{host()}{path()}</DisplayString>
<DisplayString Condition="isEmpty(scheme().d-&gt;size)">{path()}</DisplayString>
<Expand>
<Item Name="[scheme]">scheme()</Item>
<Item Name="[username]">username()</Item>
<Item Name="[password]">password()</Item>
<Item Name="[host]">host()</Item>
<Item Name="[path]">path()</Item>
<Item Name="[query]">query()</Item>
<Item Name="[fragment]">fragment()</Item>
</Expand>
</Type>
<Type Name="QBitArray">
<DisplayString>{{ size = {(d.d-&gt;size &lt;&lt; 3) - *((reinterpret_cast&lt;char*&gt;(d.d)) + d.d-&gt;offset)} }}</DisplayString>
<Expand>
<Item Name="[referenced]">d.d-&gt;ref.atomic._q_value</Item>
<IndexListItems>
<Size>(d.d-&gt;size &lt;&lt; 3) - *((reinterpret_cast&lt;char*&gt;(d.d)) + d.d-&gt;offset)</Size>
<ValueNode>
(*(reinterpret_cast&lt;const unsigned char*&gt;((reinterpret_cast&lt;char*&gt;(d.d)) + d.d-&gt;offset) + 1
+ ($i &gt;&gt; 3)) &amp; (1 &lt;&lt; ($i &amp; 7))) != 0
</ValueNode>
</IndexListItems>
</Expand>
</Type>
<Type Name="QVarLengthArray&lt;*&gt;">
<AlternativeType Name="QVarLengthArray&lt;*, int&gt;"/>
<DisplayString>{{ size = {s} }}</DisplayString>
<Expand>
<Item Name="[capacity]">a</Item>
<ArrayItems>
<Size>s</Size>
<ValuePointer>ptr</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="QDate">
<DisplayString>{{ julian day = {jd} }}</DisplayString>
<Expand></Expand>
</Type>
<Type Name="QTime">
<DisplayString
Condition="mds == 1">{{ millisecond = {mds} }}</DisplayString>
<DisplayString
Condition="mds != 1">{{ milliseconds = {mds} }}</DisplayString>
<Expand>
<Item Name="[hour]"
Condition="(mds / 3600000) == 1">mds / 3600000, d</Item>
<Item Name="[hours]"
Condition="(mds / 3600000) != 1">mds / 3600000, d</Item>
<Item Name="[minute]"
Condition="((mds % 3600000) / 60000) == 1">(mds % 3600000) / 60000, d</Item>
<Item Name="[minutes]"
Condition="((mds % 3600000) / 60000) != 1">(mds % 3600000) / 60000, d</Item>
<Item Name="[second]"
Condition="((mds / 1000) % 60) == 1">(mds / 1000) % 60, d</Item>
<Item Name="[seconds]"
Condition="((mds / 1000) % 60) != 1">(mds / 1000) % 60, d</Item>
<Item Name="[millisecond]"
Condition="(mds % 1000) == 1">mds % 1000, d</Item>
<Item Name="[milliseconds]"
Condition="(mds % 1000) != 1">mds % 1000, d</Item>
</Expand>
</Type>
<Type Name="QRegularExpression">
<DisplayString>{d.pattern}</DisplayString>
</Type>
<Type Name="QSharedData">
<Expand>
<Item Name="[referenced]">ref._q_value</Item>
</Expand>
</Type>
<Type Name="QSharedPointer&lt;*&gt;">
<DisplayString>strong reference to shared pointer of type {"$T1"}</DisplayString>
<Expand>
<Item Name="[is null]">value == 0</Item>
<Item Name="[weak referenced]">d-&gt;weakref._q_value</Item>
<Item Name="[strong referenced]">d-&gt;strongref._q_value</Item>
</Expand>
</Type>
<Type Name="QSharedDataPointer&lt;*&gt;">
<DisplayString>pointer to implicit shared object of type {"$T1"}</DisplayString>
<Expand>
<ExpandedItem>d</ExpandedItem>
</Expand>
</Type>
<Type Name="QExplicitlySharedDataPointer&lt;*&gt;">
<DisplayString>pointer to explicit shared object of type {"$T1"}</DisplayString>
<Expand>
<ExpandedItem>d</ExpandedItem>
</Expand>
</Type>
<Type Name="QPointer&lt;*&gt;">
<DisplayString>guarded pointer to subclass of QObject of type {"$T1"}</DisplayString>
<Expand>
<Item Name="[is null]">wp.d == 0 || wp.d-&gt;strongref._q_value == 0 || wp.value == 0</Item>
</Expand>
</Type>
<Type Name="QWeakPointer&lt;*&gt;">
<DisplayString>weak reference to shared pointer of type {"$T1"}</DisplayString>
<Expand>
<Item Name="[is null]">d == 0 || d-&gt;strongref._q_value == 0 || value == 0</Item>
<Item Name="[weak referenced]">d-&gt;weakref._q_value</Item>
<Item Name="[strong referenced]">d-&gt;strongref._q_value</Item>
</Expand>
</Type>
<Type Name="QScopedPointer&lt;*&gt;">
<DisplayString>scoped pointer to a dynamically allocated object of type {"$T1"}</DisplayString>
<Expand>
<Item Name="[is null]">!d</Item>
</Expand>
</Type>
<Type Name="QScopedArrayPointer&lt;*&gt;">
<DisplayString>scoped pointer to dynamically allocated array of objects of type {"$T1"}</DisplayString>
<Expand>
<Item Name="[is null]">!d</Item>
</Expand>
</Type>
<Type Name="QPair&lt;*,*&gt;">
<DisplayString>({first}, {second})</DisplayString>
<Expand>
<Item Name="[first]">first</Item>
<Item Name="[second]">second</Item>
</Expand>
</Type>
<Type Name="QVector&lt;*&gt;">
<AlternativeType Name="QStack&lt;*&gt;"></AlternativeType>
<DisplayString>{{ size = {d-&gt;size} }}</DisplayString>
<Expand>
<Item Name="[referenced]">d-&gt;ref.atomic._q_value</Item>
<ArrayItems>
<Size>d-&gt;size</Size>
<ValuePointer>($T1*)((reinterpret_cast&lt;char*&gt;(d)) + d-&gt;offset)</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="QList&lt;*&gt;">
<AlternativeType Name="QQueue&lt;*&gt;"></AlternativeType>
<DisplayString>{{ size = {d-&gt;end - d-&gt;begin} }}</DisplayString>
<Expand>
<Item Name="[referenced]">d-&gt;ref.atomic._q_value</Item>
<IndexListItems>
<Size>d-&gt;end - d-&gt;begin</Size>
<ValueNode>*reinterpret_cast&lt;$T1*&gt;((sizeof($T1) &gt; sizeof(void*))
? reinterpret_cast&lt;Node*&gt;(d-&gt;array + d-&gt;begin + $i)-&gt;v
: reinterpret_cast&lt;$T1*&gt;(d-&gt;array + d-&gt;begin + $i))
</ValueNode>
</IndexListItems>
</Expand>
</Type>
<Type Name="QStringList">
<DisplayString>{{ size = {d-&gt;end - d-&gt;begin} }}</DisplayString>
<Expand>
<Item Name="[referenced]">d-&gt;ref.atomic._q_value</Item>
<IndexListItems>
<Size>d-&gt;end - d-&gt;begin</Size>
<ValueNode>
*reinterpret_cast&lt;QString*&gt;((sizeof(QString) &gt; sizeof(void*))
? reinterpret_cast&lt;Node*&gt;(d-&gt;array + d-&gt;begin + $i)-&gt;v
: reinterpret_cast&lt;QString*&gt;(d-&gt;array + d-&gt;begin + $i))
</ValueNode>
</IndexListItems>
</Expand>
</Type>
<Type Name="QList&lt;QVariant&gt;">
<DisplayString>{{ size = {d-&gt;end - d-&gt;begin} }}</DisplayString>
<Expand>
<Item Name="[referenced]">d-&gt;ref.atomic._q_value</Item>
<IndexListItems>
<Size>d-&gt;end - d-&gt;begin</Size>
<ValueNode>
*reinterpret_cast&lt;QVariant*&gt;((sizeof(QVariant) &gt; sizeof(void*))
? reinterpret_cast&lt;Node*&gt;(d-&gt;array + d-&gt;begin + $i)-&gt;v
: reinterpret_cast&lt;QVariant*&gt;(d-&gt;array + d-&gt;begin + $i))
</ValueNode>
</IndexListItems>
</Expand>
</Type>
<Type Name="QLinkedList&lt;*&gt;">
<DisplayString>{{ size = {d-&gt;size} }}</DisplayString>
<Expand>
<Item Name="[referenced]">d-&gt;ref.atomic._q_value</Item>
<LinkedListItems>
<Size>d-&gt;size</Size>
<HeadPointer>d-&gt;n</HeadPointer>
<NextPointer>n</NextPointer>
<ValueNode>(*(QLinkedListNode&lt;$T1&gt;*)this).t</ValueNode>
</LinkedListItems>
</Expand>
</Type>
<Type Name="QMapNode&lt;*,*&gt;">
<DisplayString>({key}, {value})</DisplayString>
<Expand>
<Item Name="[key]">key</Item>
<Item Name="[value]">value</Item>
</Expand>
</Type>
<Type Name="QMap&lt;*,*&gt;">
<AlternativeType Name="QMultiMap&lt;*,*&gt;"/>
<DisplayString>{{ size = {d-&gt;size} }}</DisplayString>
<Expand>
<Item Name="[referenced]">d-&gt;ref.atomic._q_value</Item>
<TreeItems>
<Size>d-&gt;size</Size>
<HeadPointer>d-&gt;header.left</HeadPointer>
<LeftPointer>left</LeftPointer>
<RightPointer>right</RightPointer>
<ValueNode>*((QMapNode&lt;$T1,$T2&gt;*)this)</ValueNode>
</TreeItems>
</Expand>
</Type>
<Type Name="QHashNode&lt;*,*&gt;">
<DisplayString Condition="next == 0">(empty)</DisplayString>
<DisplayString Condition="next != 0">({key}, {value})</DisplayString>
<Expand>
<Item Name="[key]" Condition="next != 0">key</Item>
<Item Name="[value]" Condition="next != 0">value</Item>
<Item Name="[next]" Condition="next != 0">next</Item>
</Expand>
</Type>
<Type Name="QHash&lt;*,*&gt;">
<AlternativeType Name="QMultiHash&lt;*,*&gt;"/>
<DisplayString>{{ size = {d-&gt;size} }}</DisplayString>
<Expand>
<ArrayItems IncludeView="buckets">
<Size>d-&gt;numBuckets</Size>
<ValuePointer>reinterpret_cast&lt;Node **&gt;(d-&gt;buckets)</ValuePointer>
</ArrayItems>
<CustomListItems ExcludeView="buckets">
<Variable Name="n" InitialValue="d-&gt;numBuckets"/>
<Variable Name="bucket" InitialValue="d-&gt;buckets"/>
<Variable Name="node" InitialValue="d-&gt;buckets[0]"/>
<Variable Name="keyValuePair" InitialValue="reinterpret_cast&lt;Node *&gt;(0)"/>
<Size>d-&gt;size</Size>
<Loop>
<Break Condition="n == 0"/>
<Exec>node = *(bucket++)</Exec>
<Exec>--n</Exec>
<Loop>
<Break Condition="!node || !node-&gt;next"/>
<Exec>keyValuePair = reinterpret_cast&lt;Node *&gt;(node)</Exec>
<Item Name="[{keyValuePair-&gt;key}]">keyValuePair-&gt;value</Item>
<Exec>node = node-&gt;next</Exec>
</Loop>
</Loop>
</CustomListItems>
</Expand>
</Type>
<Type Name="QHashNode&lt;*,QHashDummyValue&gt;">
<DisplayString Condition="next == 0">(empty)</DisplayString>
<DisplayString Condition="next != 0">({key})</DisplayString>
<Expand>
<Item Name="[key]" Condition="next != 0">key</Item>
</Expand>
</Type>
<Type Name="QSet&lt;*&gt;">
<DisplayString>{{ size = {q_hash.d-&gt;size} }}</DisplayString>
<Expand>
<ExpandedItem>q_hash</ExpandedItem>
</Expand>
</Type>
<Type Name="QCache&lt;*,*&gt;::Node">
<DisplayString>({*keyPtr}, {*t})</DisplayString>
<Expand>
<Item Name="[key]">*keyPtr</Item>
<Item Name="[value]">*t</Item>
</Expand>
</Type>
<Type Name="QCache&lt;*,*&gt;">
<DisplayString>{{ size = {hash.d-&gt;size} }}</DisplayString>
<Expand>
<Item Name="[max coast]">mx</Item>
<Item Name="[total coast]">total</Item>
<Item Name="[referenced]">hash.d-&gt;ref.atomic._q_value</Item>
<LinkedListItems>
<Size>hash.d-&gt;size</Size>
<HeadPointer>f</HeadPointer>
<NextPointer>n</NextPointer>
<ValueNode>*((Node*)this)</ValueNode>
</LinkedListItems>
</Expand>
</Type>
<Type Name="QStandardItemPrivate">
<Intrinsic Name="memberOffset" Expression="sizeof(QStandardItemModel *)
+ sizeof(QStandardItem *)
+ sizeof(int *)
+ sizeof(int *)
+ (sizeof(int) * count)">
<Parameter Name="count" Type="int"/>
</Intrinsic>
<Intrinsic Name="rows" Expression="*((int*)(((char*)(this)) + memberOffset(0)))" />
<Intrinsic Name="columns" Expression="*((int*)(((char*)(this)) + memberOffset(1)))" />
</Type>
<Type Name="QStandardItem">
<DisplayString>{{ row count = {(*d_ptr.d).rows()}, column count = {(*d_ptr.d).columns()} }}</DisplayString>
<Expand>
<Item Name="[d]">d_ptr.d,!</Item>
<Item Name="[row count]">(*d_ptr.d).rows()</Item>
<Item Name="[column count]">(*d_ptr.d).columns()</Item>
</Expand>
</Type>
<Type Name="QVariant">
<!--Region DisplayString QVariant-->
<DisplayString Condition="d.type == QMetaType::UnknownType">Invalid</DisplayString>
<DisplayString Condition="d.type == QMetaType::Bool">{d.data.b}</DisplayString>
<DisplayString Condition="d.type == QMetaType::Int">{d.data.i}</DisplayString>
<DisplayString Condition="d.type == QMetaType::UInt">{d.data.u}</DisplayString>
<DisplayString Condition="d.type == QMetaType::LongLong">{d.data.ll}</DisplayString>
<DisplayString Condition="d.type == QMetaType::ULongLong">{d.data.ull}</DisplayString>
<DisplayString Condition="d.type == QMetaType::Double">{d.data.d}</DisplayString>
<DisplayString Condition="d.type == QMetaType::QChar">{d.data.c}</DisplayString>
<DisplayString Condition="d.type == QMetaType::QVariantMap">
{*((QMap&lt;QString,QVariant&gt;*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))}
</DisplayString>
<DisplayString Condition="d.type == QMetaType::QVariantList">
{*((QList&lt;QVariant&gt;*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))}
</DisplayString>
<DisplayString Condition="d.type == QMetaType::QString">
{*((QString*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))}
</DisplayString>
<DisplayString Condition="d.type == QMetaType::QStringList">
{*((QStringList*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))}
</DisplayString>
<DisplayString Condition="d.type == QMetaType::QByteArray">
{*((QByteArray*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))}
</DisplayString>
<DisplayString Condition="d.type == QMetaType::QBitArray">
{*((QBitArray*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))}
</DisplayString>
<DisplayString Condition="d.type == QMetaType::QDate">
{*((QDate*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))}
</DisplayString>
<DisplayString Condition="d.type == QMetaType::QTime">
{*((QTime*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))}
</DisplayString>
<DisplayString Condition="d.type == QMetaType::QDateTime">DateTime</DisplayString>
<DisplayString Condition="d.type == QMetaType::QUrl">Url</DisplayString>
<DisplayString Condition="d.type == QMetaType::QLocale">Locale</DisplayString>
<DisplayString Condition="d.type == QMetaType::QRect">
{*((QRect*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))}
</DisplayString>
<DisplayString Condition="d.type == QMetaType::QRectF">
{*((QRectF*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))}
</DisplayString>
<DisplayString Condition="d.type == QMetaType::QSize">
{*((QSize*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))}
</DisplayString>
<DisplayString Condition="d.type == QMetaType::QSizeF">
{*((QSizeF*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))}
</DisplayString>
<DisplayString Condition="d.type == QMetaType::QLine">
{*((QLine*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))}
</DisplayString>
<DisplayString Condition="d.type == QMetaType::QLineF">
{*((QLineF*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))}
</DisplayString>
<DisplayString Condition="d.type == QMetaType::QPoint">
{*((QPoint*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))}
</DisplayString>
<DisplayString Condition="d.type == QMetaType::QPointF">
{*((QPointF*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))}
</DisplayString>
<DisplayString Condition="d.type == QMetaType::QRegExp">RegExp</DisplayString>
<DisplayString Condition="d.type == QMetaType::QRegularExpression">RegularExpression</DisplayString>
<DisplayString Condition="d.type == QMetaType::QVariantHash">
{*((QHash&lt;QString,QVariant&gt;*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))}
</DisplayString>
<DisplayString Condition="d.type == QMetaType::QEasingCurve">EasingCurve</DisplayString>
<DisplayString Condition="d.type == QMetaType::QUuid">Uuid</DisplayString>
<DisplayString Condition="d.type == QMetaType::QModelIndex">ModelIndex</DisplayString>
<DisplayString Condition="d.type == QMetaType::LastCoreType">LastCoreType</DisplayString>
<DisplayString Condition="d.type == QMetaType::QFont">Font</DisplayString>
<DisplayString Condition="d.type == QMetaType::QPixmap">Pixmap</DisplayString>
<DisplayString Condition="d.type == QMetaType::QBrush">Brush</DisplayString>
<DisplayString Condition="d.type == QMetaType::QColor">Color</DisplayString>
<DisplayString Condition="d.type == QMetaType::QPalette">Palette</DisplayString>
<DisplayString Condition="d.type == QMetaType::QImage">Image</DisplayString>
<DisplayString Condition="d.type == QMetaType::QPolygon">Polygon</DisplayString>
<DisplayString Condition="d.type == QMetaType::QRegion">Region</DisplayString>
<DisplayString Condition="d.type == QMetaType::QBitmap">Bitmap</DisplayString>
<DisplayString Condition="d.type == QMetaType::QCursor">Cursor</DisplayString>
<DisplayString Condition="d.type == QMetaType::QKeySequence">KeySequence</DisplayString>
<DisplayString Condition="d.type == QMetaType::QPen">Pen</DisplayString>
<DisplayString Condition="d.type == QMetaType::QTextLength">TextLength</DisplayString>
<DisplayString Condition="d.type == QMetaType::QTextFormat">TextFormat</DisplayString>
<DisplayString Condition="d.type == QMetaType::QMatrix">Matrix</DisplayString>
<DisplayString Condition="d.type == QMetaType::QTransform">Transform</DisplayString>
<DisplayString Condition="d.type == QMetaType::QMatrix4x4">Matrix4x4</DisplayString>
<DisplayString Condition="d.type == QMetaType::QVector2D">Vector2D</DisplayString>
<DisplayString Condition="d.type == QMetaType::QVector3D">Vector3D</DisplayString>
<DisplayString Condition="d.type == QMetaType::QVector4D">Vector4D</DisplayString>
<DisplayString Condition="d.type == QMetaType::QQuaternion">Quaternion</DisplayString>
<DisplayString Condition="d.type == QMetaType::QPolygonF">PolygonF</DisplayString>
<DisplayString Condition="d.type == QMetaType::QIcon">Icon</DisplayString>
<DisplayString Condition="d.type == QMetaType::LastGuiType">LastGuiType</DisplayString>
<DisplayString Condition="d.type == QMetaType::QSizePolicy">SizePolicy</DisplayString>
<DisplayString Condition="d.type == QMetaType::User">UserType</DisplayString>
<DisplayString Condition="d.type == 0xffffffff">LastType</DisplayString>
<!--End region DisplayString QVariant-->
<!--Region DisplayView QVariant-->
<StringView Condition="d.type == QMetaType::QChar">d.data.c</StringView>
<StringView Condition="d.type == QMetaType::QString">
*((QString*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</StringView>
<StringView Condition="d.type == QMetaType::QByteArray">
*((QByteArray*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</StringView>
<!--End region DisplayView QVariant-->
<!--Region Expand QVariant-->
<Expand>
<ExpandedItem Condition="d.type == QMetaType::QVariantMap">
*((QMap&lt;QString,QVariant&gt;*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</ExpandedItem>
<ExpandedItem Condition="d.type == QMetaType::QVariantList">
*((QList&lt;QVariant&gt;*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</ExpandedItem>
<ExpandedItem Condition="d.type == QMetaType::QString">
*((QString*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</ExpandedItem>
<ExpandedItem Condition="d.type == QMetaType::QStringList">
*((QStringList*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</ExpandedItem>
<ExpandedItem Condition="d.type == QMetaType::QByteArray">
*((QByteArray*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</ExpandedItem>
<ExpandedItem Condition="d.type == QMetaType::QBitArray">
*((QBitArray*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</ExpandedItem>
<ExpandedItem Condition="d.type == QMetaType::QDate">
*((QDate*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</ExpandedItem>
<ExpandedItem Condition="d.type == QMetaType::QTime">
*((QTime*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</ExpandedItem>
<ExpandedItem Condition="d.type == QMetaType::QRect">
*((QRect*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</ExpandedItem>
<ExpandedItem Condition="d.type == QMetaType::QRectF">
*((QRectF*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</ExpandedItem>
<ExpandedItem Condition="d.type == QMetaType::QSize">
*((QSize*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</ExpandedItem>
<ExpandedItem Condition="d.type == QMetaType::QSizeF">
*((QSizeF*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</ExpandedItem>
<ExpandedItem Condition="d.type == QMetaType::QLine">
*((QLine*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</ExpandedItem>
<ExpandedItem Condition="d.type == QMetaType::QLineF">
*((QLineF*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</ExpandedItem>
<ExpandedItem Condition="d.type == QMetaType::QPoint">
*((QPoint*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</ExpandedItem>
<ExpandedItem Condition="d.type == QMetaType::QPointF">
*((QPointF*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</ExpandedItem>
<ExpandedItem Condition="d.type == QMetaType::QVariantHash">
*((QHash&lt;QString,QVariant&gt;*)(d.is_shared ? d.data.shared-&gt;ptr
: reinterpret_cast&lt;const void *&gt;(&amp;d.data.ptr)))
</ExpandedItem>
</Expand>
<!--End region Expand QVariant-->
</Type>
</AutoVisualizer>

735
.vscode/qt6.natvis vendored
View File

@ -1,735 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--************************************************************************************************
Copyright (C) 2023 The Qt Company Ltd.
SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
*************************************************************************************************-->
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="QPropertyData&lt;*&gt;">
<DisplayString>{val}</DisplayString>
<Expand>
<Item Name="[value]">val</Item>
</Expand>
</Type>
<Type Name="QQuickItemPrivate">
<Intrinsic Name="_hasExtraData" Expression="extra.d.d != 0" />
<Intrinsic Name="_extraData" Expression="(*(ExtraData*)extra.d.d)" />
<Intrinsic Name="_objectName" Expression="(extraData-&gt;objectName).val.d.ptr" />
<DisplayString Condition="_hasExtraData()">{{ x = {x,g}, y = {y,g}, z = {_extraData().z,g}, width = {width,g}, height = {height,g} }}</DisplayString>
<DisplayString>{{ x = {x,g}, y = {y,g}, width = {width,g}, height = {height,g} }}</DisplayString>
<Expand>
<Item Name="x">x</Item>
<Item Name="y">y</Item>
<Item Name="z" Condition="_hasExtraData()">_extraData().z</Item>
<Item Name="scale" Condition="_hasExtraData()">_extraData().scale</Item>
<Item Name="rotation" Condition="_hasExtraData()">_extraData().rotation</Item>
<Item Name="opacity" Condition="_hasExtraData()">_extraData().opacity</Item>
<Item Name="width">width</Item>
<Item Name="height">height</Item>
<Item Name="implicitWidth">implicitWidth</Item>
<Item Name="implicitHeight">implicitHeight</Item>
<Item Name="visible">effectiveVisible</Item>
<Item Name="enabled">explicitEnable</Item>
<Item Name="objectName" Condition="_objectName() != 0">_objectName(),na</Item>
<Item Name="parentItem">parentItem</Item>
<Item Name="childItems">childItems, nr</Item>
</Expand>
</Type>
<Type Name="QQuickItem">
<DisplayString>{d_ptr.d,na}</DisplayString>
<Expand>
<ExpandedItem>d_ptr.d</ExpandedItem>
</Expand>
</Type>
<Type Name="QUuid">
<DisplayString>{{{data1,Xb}-{data2,Xb}-{data3,Xb}-{(data4[0]),nvoXb}{(data4[1]),nvoXb}-{(data4[2]),nvoXb}{(data4[3]),nvoXb}{(data4[4]),nvoXb}{(data4[5]),nvoXb}{(data4[6]),nvoXb}{(data4[7]),nvoXb}}}</DisplayString>
</Type>
<Type Name="QSpecialInteger&lt;*&gt;">
<DisplayString>{val}</DisplayString>
<Expand>
<Item Name="[value]">val</Item>
</Expand>
</Type>
<Type Name="QBasicAtomicInteger&lt;*&gt;">
<DisplayString>{_q_value}</DisplayString>
<Expand>
<Item Name="[value]">_q_value</Item>
</Expand>
</Type>
<Type Name="QBasicAtomicPointer&lt;*&gt;">
<Intrinsic Name="isNull" Expression="value()==0" />
<Intrinsic Name="value" Expression="_q_value.value()" />
<DisplayString Condition="isNull()">empty</DisplayString>
<DisplayString Condition="!isNull()">{_q_value}</DisplayString>
<Expand>
<Item Name=" " Condition="!isNull()">*value()</Item>
</Expand>
</Type>
<Type Name="QPoint">
<AlternativeType Name="QPointF"/>
<DisplayString>{{ x = {xp}, y = {yp} }}</DisplayString>
<Expand>
<Item Name="[x]">xp</Item>
<Item Name="[y]">yp</Item>
</Expand>
</Type>
<Type Name="QRect">
<DisplayString>{{ x = {x1}, y = {y1}, width = {x2 - x1 + 1}, height = {y2 - y1 + 1} }}</DisplayString>
<Expand>
<Item Name="[x]">x1</Item>
<Item Name="[y]">y1</Item>
<Item Name="[width]">x2 - x1 + 1</Item>
<Item Name="[height]">y2 - y1 + 1</Item>
</Expand>
</Type>
<Type Name="QRectF">
<DisplayString>{{ x = {xp}, y = {yp}, width = {w}, height = {h} }}</DisplayString>
<Expand>
<Item Name="[x]">xp</Item>
<Item Name="[y]">yp</Item>
<Item Name="[width]">w</Item>
<Item Name="[height]">h</Item>
</Expand>
</Type>
<Type Name="QSize">
<AlternativeType Name="QSizeF"/>
<DisplayString>{{ width = {wd}, height = {ht} }}</DisplayString>
<Expand>
<Item Name="[width]">wd</Item>
<Item Name="[height]">ht</Item>
</Expand>
</Type>
<Type Name="QLine">
<AlternativeType Name="QLineF"/>
<DisplayString>{{ start point = {pt1}, end point = {pt2} }}</DisplayString>
<Expand>
<Synthetic Name="[start point]">
<DisplayString>{pt1}</DisplayString>
<Expand>
<ExpandedItem>pt1</ExpandedItem>
</Expand>
</Synthetic>
<Synthetic Name="[end point]">
<DisplayString>{pt2}</DisplayString>
<Expand>
<ExpandedItem>pt2</ExpandedItem>
</Expand>
</Synthetic>
</Expand>
</Type>
<Type Name="QPolygon">
<DisplayString>{{ size={d-&gt;size} }}</DisplayString>
<Expand>
<Item Name="[referenced]">d-&gt;ref.atomic._q_value</Item>
<ArrayItems>
<Size>d-&gt;size</Size>
<ValuePointer>(QPoint*)((reinterpret_cast&lt;char*&gt;(d)) + d-&gt;offset)</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="QPolygonF">
<DisplayString>{{ size={d-&gt;size} }}</DisplayString>
<Expand>
<Item Name="[closed]">
d-&gt;size &gt; 0
&amp;&amp; ((((QPointF*)((reinterpret_cast&lt;char*&gt;(d)) + d-&gt;offset)[0]).xp
== (((QPointF*)((reinterpret_cast&lt;char*&gt;(d)) + d-&gt;offset)[d-&gt;size - 1]).xp)
&amp;&amp; ((((QPointF*)((reinterpret_cast&lt;char*&gt;(d)) + d-&gt;offset)[0]).yp
== (((QPointF*)((reinterpret_cast&lt;char*&gt;(d)) + d-&gt;offset)[d-&gt;size - 1]).yp)
</Item>
<Item Name="[referenced]">d-&gt;ref.atomic._q_value</Item>
<ArrayItems>
<Size>d-&gt;size</Size>
<ValuePointer>(QPointF*)((reinterpret_cast&lt;char*&gt;(d)) + d-&gt;offset)</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="QVector2D">
<DisplayString>{{ x = {xp}, y = {yp} }}</DisplayString>
<Expand>
<Item Name="[x]">xp</Item>
<Item Name="[y]">yp</Item>
</Expand>
</Type>
<Type Name="QVector3D">
<DisplayString>{{ x = {xp}, y = {yp}, z = {zp} }}</DisplayString>
<Expand>
<Item Name="[x]">xp</Item>
<Item Name="[y]">yp</Item>
<Item Name="[z]">zp</Item>
</Expand>
</Type>
<Type Name="QVector4D">
<DisplayString>{{ x = {xp}, y = {yp}, z = {zp}, w = {wp} }}</DisplayString>
<Expand>
<Item Name="[x]">xp</Item>
<Item Name="[y]">yp</Item>
<Item Name="[z]">zp</Item>
<Item Name="[w]">wp</Item>
</Expand>
</Type>
<Type Name="QMatrix">
<DisplayString>
{{ m11 = {_m11}, m12 = {_m12}, m21 = {_m21}, m22 = {_m22}, ... }}
</DisplayString>
<Expand>
<Item Name="[m11]">_m11</Item>
<Item Name="[m12]">_m12</Item>
<Item Name="[m21]">_m21</Item>
<Item Name="[m22]">_m22</Item>
<Item Name="[dx]">_dx</Item>
<Item Name="[dy]">_dy</Item>
</Expand>
</Type>
<Type Name="QMatrix4x4">
<DisplayString>
{{ m11 = {m[0][0]}, m12 = {m[1][0]}, m13 = {m[2][0]}, m14 = {m[3][0]}, ... }}
</DisplayString>
<Expand>
<Item Name="[m11]">m[0][0]</Item>
<Item Name="[m12]">m[1][0]</Item>
<Item Name="[m13]">m[2][0]</Item>
<Item Name="[m14]">m[3][0]</Item>
<Item Name="[m21]">m[0][1]</Item>
<Item Name="[m22]">m[1][1]</Item>
<Item Name="[m23]">m[2][1]</Item>
<Item Name="[m24]">m[3][1]</Item>
<Item Name="[m31]">m[0][2]</Item>
<Item Name="[m32]">m[1][2]</Item>
<Item Name="[m33]">m[2][2]</Item>
<Item Name="[m34]">m[3][2]</Item>
<Item Name="[m41]">m[0][3]</Item>
<Item Name="[m42]">m[1][3]</Item>
<Item Name="[m43]">m[2][3]</Item>
<Item Name="[m44]">m[3][3]</Item>
</Expand>
</Type>
<Type Name="QSizePolicy">
<DisplayString>
{{ horizontal = {static_cast&lt;Policy&gt;(bits.horPolicy)}, vertical = {static_cast&lt;Policy&gt;(bits.verPolicy)}, type = {ControlType(1 &lt;&lt; bits.ctype)} }}
</DisplayString>
<Expand>
<Synthetic Name="[vertical policy]">
<DisplayString>QSizePolicy::Policy::{static_cast&lt;Policy&gt;(bits.verPolicy)}</DisplayString>
</Synthetic>
<Synthetic Name="[horizontal policy]">
<DisplayString>QSizePolicy::Policy::{static_cast&lt;Policy&gt;(bits.horPolicy)}</DisplayString>
</Synthetic>
<Synthetic Name="[control type]">
<DisplayString>QSizePolicy::ControlType::{ControlType(1 &lt;&lt; bits.ctype)}</DisplayString>
</Synthetic>
<Synthetic Name="[expanding directions]">
<DisplayString
Condition="(static_cast&lt;Policy&gt;(bits.verPolicy) &amp; ExpandFlag)">
Qt::Vertical (2)
</DisplayString>
<DisplayString
Condition="(static_cast&lt;Policy&gt;(bits.horPolicy) &amp; ExpandFlag)">
Qt::Horizontal (1)
</DisplayString>
</Synthetic>
<Item Name="[vertical stretch]">static_cast&lt;int&gt;(bits.verStretch)</Item>
<Item Name="[horizontal stretch]">static_cast&lt;int&gt;(bits.horStretch)</Item>
<Item Name="[has height for width]">bits.hfw == 1</Item>
<Item Name="[has width for height]">bits.wfh == 1</Item>
</Expand>
</Type>
<Type Name="QChar">
<DisplayString>{ucs,c}</DisplayString>
<StringView>ucs,c</StringView>
<Expand>
<Item Name="[latin 1]">ucs > 0xff ? '\0' : char(ucs),c</Item>
<Item Name="[unicode]">ucs,c</Item>
</Expand>
</Type>
<Type Name="QString">
<DisplayString>&quot;{(reinterpret_cast&lt;unsigned short*&gt;(d.ptr)),sub}&quot;</DisplayString>
<StringView>(reinterpret_cast&lt;unsigned short*&gt;(d.ptr)),sub</StringView>
<Expand>
<Item Name="[size]">d.size</Item>
<ArrayItems>
<Size>d.size</Size>
<ValuePointer>d.ptr</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="QStringRef">
<DisplayString Condition="m_string == nullptr">{m_string,[m_size]} u""</DisplayString>
<DisplayString Condition="m_string != nullptr">{m_string-&gt;d.ptr+m_position,[m_size]}</DisplayString>
<StringView Condition="m_string == nullptr">""</StringView>
<StringView Condition="m_string != nullptr">m_string,[m_position+m_size]</StringView>
<Expand>
<Item Name="[position]" ExcludeView="simple">m_position</Item>
<Item Name="[size]" ExcludeView="simple">m_size</Item>
<ArrayItems Condition="m_string != nullptr">
<Size>m_size</Size>
<ValuePointer>m_string-&gt;d.ptr+m_position</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="QStringView">
<DisplayString>{m_data,[m_size]}</DisplayString>
<StringView>m_data,[m_size]</StringView>
<Expand>
<Item Name="[size]" ExcludeView="simple">m_size</Item>
<ArrayItems>
<Size>m_size</Size>
<ValuePointer>m_data</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="QByteArray">
<DisplayString>&quot;{((reinterpret_cast&lt;char*&gt;(d.ptr))),sb}&quot;</DisplayString>
<StringView>((reinterpret_cast&lt;char*&gt;(d.ptr))),sb</StringView>
<Expand>
<Item Name="[size]">d.size</Item>
<ArrayItems>
<Size>d.size</Size>
<ValuePointer>d.ptr</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="QUrl">
<Intrinsic Name="isEmpty" Expression="size==0">
<Parameter Name="size" Type="int"/>
</Intrinsic>
<Intrinsic Name="memberOffset" Expression="sizeof(QAtomicInt) + sizeof(int) + (sizeof(QString) * count)">
<Parameter Name="count" Type="int"/>
</Intrinsic>
<Intrinsic Name="scheme" Expression="*((QString*)(((char*)(d) + memberOffset(0))))" />
<Intrinsic Name="username" Expression="*((QString*)(((char*)(d) + memberOffset(1))))" />
<Intrinsic Name="password" Expression="*((QString*)(((char*)(d) + memberOffset(2))))" />
<Intrinsic Name="host" Expression="*((QString*)(((char*)(d) + memberOffset(3))))" />
<Intrinsic Name="path" Expression="*((QString*)(((char*)(d) + memberOffset(4))))" />
<Intrinsic Name="query" Expression="*((QString*)(((char*)(d) + memberOffset(5))))" />
<Intrinsic Name="fragment" Expression="*((QString*)(((char*)(d) + memberOffset(6))))" />
<DisplayString Condition="!isEmpty(scheme().d-&gt;size)">{scheme()}://{host()}{path()}</DisplayString>
<DisplayString Condition="isEmpty(scheme().d-&gt;size)">{path()}</DisplayString>
<Expand>
<Item Name="[scheme]">scheme()</Item>
<Item Name="[username]">username()</Item>
<Item Name="[password]">password()</Item>
<Item Name="[host]">host()</Item>
<Item Name="[path]">path()</Item>
<Item Name="[query]">query()</Item>
<Item Name="[fragment]">fragment()</Item>
</Expand>
</Type>
<Type Name="QDate">
<DisplayString>{{ julian day = {jd} }}</DisplayString>
</Type>
<Type Name="QTime">
<Intrinsic Name="hour" Expression="mds / 3600000" />
<Intrinsic Name="minute" Expression="(mds % 3600000) / 60000" />
<Intrinsic Name="second" Expression="(mds / 1000) % 60" />
<Intrinsic Name="millisecond" Expression="mds % 1000" />
<DisplayString Condition="mds == 1">{{ millisecond = {mds} }}</DisplayString>
<DisplayString Condition="mds != 1">{{ milliseconds = {mds} }}</DisplayString>
<Expand>
<Item Name="[hour]"
Condition="(mds / 3600000) == 1">hour(), d</Item>
<Item Name="[hours]"
Condition="(mds / 3600000) != 1">hour(), d</Item>
<Item Name="[minute]"
Condition="((mds % 3600000) / 60000) == 1">minute(), d</Item>
<Item Name="[minutes]"
Condition="((mds % 3600000) / 60000) != 1">minute(), d</Item>
<Item Name="[second]"
Condition="((mds / 1000) % 60) == 1">second(), d</Item>
<Item Name="[seconds]"
Condition="((mds / 1000) % 60) != 1">second(), d</Item>
<Item Name="[millisecond]"
Condition="(mds % 1000) == 1">millisecond(), d</Item>
<Item Name="[milliseconds]"
Condition="(mds % 1000) != 1">millisecond(), d</Item>
</Expand>
</Type>
<Type Name="QPair&lt;*,*&gt;">
<DisplayString>({first}, {second})</DisplayString>
<Expand>
<Item Name="[first]">first</Item>
<Item Name="[second]">second</Item>
</Expand>
</Type>
<Type Name="QList&lt;*&gt;">
<AlternativeType Name="QVector&lt;*&gt;"/>
<DisplayString>{{ size={d.size} }}</DisplayString>
<Expand>
<ArrayItems>
<Size>d.size</Size>
<ValuePointer>reinterpret_cast&lt;$T1*&gt;(d.ptr)</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="QVarLengthArray&lt;*&gt;">
<DisplayString>{{ size={s} }}</DisplayString>
<Expand>
<Item Name="[capacity]">a</Item>
<ArrayItems>
<Size>s</Size>
<ValuePointer>ptr</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="QMap&lt;*,*&gt;">
<AlternativeType Name="QMultiMap&lt;*,*&gt;"/>
<DisplayString>{{ size={d.d-&gt;m._Mypair._Myval2._Myval2._Mysize} }}</DisplayString>
<Expand>
<TreeItems>
<Size>d.d-&gt;m._Mypair._Myval2._Myval2._Mysize</Size>
<HeadPointer>d.d-&gt;m._Mypair._Myval2._Myval2._Myhead-&gt;_Parent</HeadPointer>
<LeftPointer>_Left</LeftPointer>
<RightPointer>_Right</RightPointer>
<ValueNode Condition="_Isnil == 0" Name="[{_Myval.first}]">_Myval,view(MapHelper)</ValueNode>
</TreeItems>
</Expand>
</Type>
<Type Name="std::pair&lt;*, *&gt;" IncludeView="MapHelper">
<DisplayString>{second}</DisplayString>
</Type>
<Type Name="QHashPrivate::Node&lt;*,*&gt;">
<DisplayString>{value}</DisplayString>
<Expand>
<Item Name="key">key</Item>
<Item Name="value">value</Item>
</Expand>
</Type>
<Type Name="QHashPrivate::MultiNode&lt;*,*&gt;">
<DisplayString Condition="value-&gt;next == 0">{value-&gt;value}</DisplayString>
<DisplayString Condition="value-&gt;next != 0 &amp;&amp; value-&gt;next-&gt;next == 0">({value-&gt;value}, {value-&gt;next-&gt;value})</DisplayString>
<DisplayString Condition="value-&gt;next != 0 &amp;&amp; value-&gt;next-&gt;next != 0">({value-&gt;value}, {value-&gt;next-&gt;value}, ...)</DisplayString>
<Expand>
<LinkedListItems>
<HeadPointer>value</HeadPointer>
<NextPointer>next</NextPointer>
<ValueNode>value</ValueNode>
</LinkedListItems>
</Expand>
</Type>
<Type Name="QHash&lt;*,*&gt;">
<AlternativeType Name="QMultiHash&lt;*,*&gt;"/>
<Intrinsic Name="getOffset" Category="Method" Expression="d-&gt;spans[span].offsets[offset]">
<Parameter Name="span" Type="int" />
<Parameter Name="offset" Type="int" />
</Intrinsic>
<Intrinsic Name="getKey" Category="Method" Expression="((Node*)(char *)&amp;(d-&gt;spans[span].entries[d-&gt;spans[span].offsets[offset]].storage))->key">
<Parameter Name="span" Type="int" />
<Parameter Name="offset" Type="int" />
</Intrinsic>
<Intrinsic Name="getNode" Category="Method" Expression="*((Node*)(char *)&amp;(d-&gt;spans[span].entries[d-&gt;spans[span].offsets[offset]].storage))">
<Parameter Name="span" Type="int" />
<Parameter Name="offset" Type="int" />
</Intrinsic>
<DisplayString>{{ size={d-&gt;size} }}</DisplayString>
<Expand>
<CustomListItems MaxItemsPerView="5000">
<Variable Name="iSpan" InitialValue="0" />
<Variable Name="spanCount" InitialValue="d-&gt;numBuckets" />
<Size>d-&gt;size</Size>
<Loop>
<If Condition="iSpan != spanCount">
<Item Name="[{getKey(iSpan, 0)}]" Condition="getOffset(iSpan, 0) != 255">getNode(iSpan, 0)</Item>
<Item Name="[{getKey(iSpan, 1)}]" Condition="getOffset(iSpan, 1) != 255">getNode(iSpan, 1)</Item>
<Item Name="[{getKey(iSpan, 2)}]" Condition="getOffset(iSpan, 2) != 255">getNode(iSpan, 2)</Item>
<Item Name="[{getKey(iSpan, 3)}]" Condition="getOffset(iSpan, 3) != 255">getNode(iSpan, 3)</Item>
<Item Name="[{getKey(iSpan, 4)}]" Condition="getOffset(iSpan, 4) != 255">getNode(iSpan, 4)</Item>
<Item Name="[{getKey(iSpan, 5)}]" Condition="getOffset(iSpan, 5) != 255">getNode(iSpan, 5)</Item>
<Item Name="[{getKey(iSpan, 6)}]" Condition="getOffset(iSpan, 6) != 255">getNode(iSpan, 6)</Item>
<Item Name="[{getKey(iSpan, 7)}]" Condition="getOffset(iSpan, 7) != 255">getNode(iSpan, 7)</Item>
<Item Name="[{getKey(iSpan, 8)}]" Condition="getOffset(iSpan, 8) != 255">getNode(iSpan, 8)</Item>
<Item Name="[{getKey(iSpan, 9)}]" Condition="getOffset(iSpan, 9) != 255">getNode(iSpan, 9)</Item>
<Item Name="[{getKey(iSpan, 10)}]" Condition="getOffset(iSpan, 10) != 255">getNode(iSpan, 10)</Item>
<Item Name="[{getKey(iSpan, 11)}]" Condition="getOffset(iSpan, 11) != 255">getNode(iSpan, 11)</Item>
<Item Name="[{getKey(iSpan, 12)}]" Condition="getOffset(iSpan, 12) != 255">getNode(iSpan, 12)</Item>
<Item Name="[{getKey(iSpan, 13)}]" Condition="getOffset(iSpan, 13) != 255">getNode(iSpan, 13)</Item>
<Item Name="[{getKey(iSpan, 14)}]" Condition="getOffset(iSpan, 14) != 255">getNode(iSpan, 14)</Item>
<Item Name="[{getKey(iSpan, 15)}]" Condition="getOffset(iSpan, 15) != 255">getNode(iSpan, 15)</Item>
<Item Name="[{getKey(iSpan, 16)}]" Condition="getOffset(iSpan, 16) != 255">getNode(iSpan, 16)</Item>
<Item Name="[{getKey(iSpan, 17)}]" Condition="getOffset(iSpan, 17) != 255">getNode(iSpan, 17)</Item>
<Item Name="[{getKey(iSpan, 18)}]" Condition="getOffset(iSpan, 18) != 255">getNode(iSpan, 18)</Item>
<Item Name="[{getKey(iSpan, 19)}]" Condition="getOffset(iSpan, 19) != 255">getNode(iSpan, 19)</Item>
<Item Name="[{getKey(iSpan, 20)}]" Condition="getOffset(iSpan, 20) != 255">getNode(iSpan, 20)</Item>
<Item Name="[{getKey(iSpan, 21)}]" Condition="getOffset(iSpan, 21) != 255">getNode(iSpan, 21)</Item>
<Item Name="[{getKey(iSpan, 22)}]" Condition="getOffset(iSpan, 22) != 255">getNode(iSpan, 22)</Item>
<Item Name="[{getKey(iSpan, 23)}]" Condition="getOffset(iSpan, 23) != 255">getNode(iSpan, 23)</Item>
<Item Name="[{getKey(iSpan, 24)}]" Condition="getOffset(iSpan, 24) != 255">getNode(iSpan, 24)</Item>
<Item Name="[{getKey(iSpan, 25)}]" Condition="getOffset(iSpan, 25) != 255">getNode(iSpan, 25)</Item>
<Item Name="[{getKey(iSpan, 26)}]" Condition="getOffset(iSpan, 26) != 255">getNode(iSpan, 26)</Item>
<Item Name="[{getKey(iSpan, 27)}]" Condition="getOffset(iSpan, 27) != 255">getNode(iSpan, 27)</Item>
<Item Name="[{getKey(iSpan, 28)}]" Condition="getOffset(iSpan, 28) != 255">getNode(iSpan, 28)</Item>
<Item Name="[{getKey(iSpan, 29)}]" Condition="getOffset(iSpan, 29) != 255">getNode(iSpan, 29)</Item>
<Item Name="[{getKey(iSpan, 30)}]" Condition="getOffset(iSpan, 30) != 255">getNode(iSpan, 30)</Item>
<Item Name="[{getKey(iSpan, 31)}]" Condition="getOffset(iSpan, 31) != 255">getNode(iSpan, 31)</Item>
<Item Name="[{getKey(iSpan, 32)}]" Condition="getOffset(iSpan, 32) != 255">getNode(iSpan, 32)</Item>
<Item Name="[{getKey(iSpan, 33)}]" Condition="getOffset(iSpan, 33) != 255">getNode(iSpan, 33)</Item>
<Item Name="[{getKey(iSpan, 34)}]" Condition="getOffset(iSpan, 34) != 255">getNode(iSpan, 34)</Item>
<Item Name="[{getKey(iSpan, 35)}]" Condition="getOffset(iSpan, 35) != 255">getNode(iSpan, 35)</Item>
<Item Name="[{getKey(iSpan, 36)}]" Condition="getOffset(iSpan, 36) != 255">getNode(iSpan, 36)</Item>
<Item Name="[{getKey(iSpan, 37)}]" Condition="getOffset(iSpan, 37) != 255">getNode(iSpan, 37)</Item>
<Item Name="[{getKey(iSpan, 38)}]" Condition="getOffset(iSpan, 38) != 255">getNode(iSpan, 38)</Item>
<Item Name="[{getKey(iSpan, 39)}]" Condition="getOffset(iSpan, 39) != 255">getNode(iSpan, 39)</Item>
<Item Name="[{getKey(iSpan, 40)}]" Condition="getOffset(iSpan, 40) != 255">getNode(iSpan, 40)</Item>
<Item Name="[{getKey(iSpan, 41)}]" Condition="getOffset(iSpan, 41) != 255">getNode(iSpan, 41)</Item>
<Item Name="[{getKey(iSpan, 42)}]" Condition="getOffset(iSpan, 42) != 255">getNode(iSpan, 42)</Item>
<Item Name="[{getKey(iSpan, 43)}]" Condition="getOffset(iSpan, 43) != 255">getNode(iSpan, 43)</Item>
<Item Name="[{getKey(iSpan, 44)}]" Condition="getOffset(iSpan, 44) != 255">getNode(iSpan, 44)</Item>
<Item Name="[{getKey(iSpan, 45)}]" Condition="getOffset(iSpan, 45) != 255">getNode(iSpan, 45)</Item>
<Item Name="[{getKey(iSpan, 46)}]" Condition="getOffset(iSpan, 46) != 255">getNode(iSpan, 46)</Item>
<Item Name="[{getKey(iSpan, 47)}]" Condition="getOffset(iSpan, 47) != 255">getNode(iSpan, 47)</Item>
<Item Name="[{getKey(iSpan, 48)}]" Condition="getOffset(iSpan, 48) != 255">getNode(iSpan, 48)</Item>
<Item Name="[{getKey(iSpan, 49)}]" Condition="getOffset(iSpan, 49) != 255">getNode(iSpan, 49)</Item>
<Item Name="[{getKey(iSpan, 50)}]" Condition="getOffset(iSpan, 50) != 255">getNode(iSpan, 50)</Item>
<Item Name="[{getKey(iSpan, 51)}]" Condition="getOffset(iSpan, 51) != 255">getNode(iSpan, 51)</Item>
<Item Name="[{getKey(iSpan, 52)}]" Condition="getOffset(iSpan, 52) != 255">getNode(iSpan, 52)</Item>
<Item Name="[{getKey(iSpan, 53)}]" Condition="getOffset(iSpan, 53) != 255">getNode(iSpan, 53)</Item>
<Item Name="[{getKey(iSpan, 54)}]" Condition="getOffset(iSpan, 54) != 255">getNode(iSpan, 54)</Item>
<Item Name="[{getKey(iSpan, 55)}]" Condition="getOffset(iSpan, 55) != 255">getNode(iSpan, 55)</Item>
<Item Name="[{getKey(iSpan, 56)}]" Condition="getOffset(iSpan, 56) != 255">getNode(iSpan, 56)</Item>
<Item Name="[{getKey(iSpan, 57)}]" Condition="getOffset(iSpan, 57) != 255">getNode(iSpan, 57)</Item>
<Item Name="[{getKey(iSpan, 58)}]" Condition="getOffset(iSpan, 58) != 255">getNode(iSpan, 58)</Item>
<Item Name="[{getKey(iSpan, 59)}]" Condition="getOffset(iSpan, 59) != 255">getNode(iSpan, 59)</Item>
<Item Name="[{getKey(iSpan, 60)}]" Condition="getOffset(iSpan, 60) != 255">getNode(iSpan, 60)</Item>
<Item Name="[{getKey(iSpan, 61)}]" Condition="getOffset(iSpan, 61) != 255">getNode(iSpan, 61)</Item>
<Item Name="[{getKey(iSpan, 62)}]" Condition="getOffset(iSpan, 62) != 255">getNode(iSpan, 62)</Item>
<Item Name="[{getKey(iSpan, 63)}]" Condition="getOffset(iSpan, 63) != 255">getNode(iSpan, 63)</Item>
<Item Name="[{getKey(iSpan, 64)}]" Condition="getOffset(iSpan, 64) != 255">getNode(iSpan, 64)</Item>
<Item Name="[{getKey(iSpan, 65)}]" Condition="getOffset(iSpan, 65) != 255">getNode(iSpan, 65)</Item>
<Item Name="[{getKey(iSpan, 66)}]" Condition="getOffset(iSpan, 66) != 255">getNode(iSpan, 66)</Item>
<Item Name="[{getKey(iSpan, 67)}]" Condition="getOffset(iSpan, 67) != 255">getNode(iSpan, 67)</Item>
<Item Name="[{getKey(iSpan, 68)}]" Condition="getOffset(iSpan, 68) != 255">getNode(iSpan, 68)</Item>
<Item Name="[{getKey(iSpan, 69)}]" Condition="getOffset(iSpan, 69) != 255">getNode(iSpan, 69)</Item>
<Item Name="[{getKey(iSpan, 70)}]" Condition="getOffset(iSpan, 70) != 255">getNode(iSpan, 70)</Item>
<Item Name="[{getKey(iSpan, 71)}]" Condition="getOffset(iSpan, 71) != 255">getNode(iSpan, 71)</Item>
<Item Name="[{getKey(iSpan, 72)}]" Condition="getOffset(iSpan, 72) != 255">getNode(iSpan, 72)</Item>
<Item Name="[{getKey(iSpan, 73)}]" Condition="getOffset(iSpan, 73) != 255">getNode(iSpan, 73)</Item>
<Item Name="[{getKey(iSpan, 74)}]" Condition="getOffset(iSpan, 74) != 255">getNode(iSpan, 74)</Item>
<Item Name="[{getKey(iSpan, 75)}]" Condition="getOffset(iSpan, 75) != 255">getNode(iSpan, 75)</Item>
<Item Name="[{getKey(iSpan, 76)}]" Condition="getOffset(iSpan, 76) != 255">getNode(iSpan, 76)</Item>
<Item Name="[{getKey(iSpan, 77)}]" Condition="getOffset(iSpan, 77) != 255">getNode(iSpan, 77)</Item>
<Item Name="[{getKey(iSpan, 78)}]" Condition="getOffset(iSpan, 78) != 255">getNode(iSpan, 78)</Item>
<Item Name="[{getKey(iSpan, 79)}]" Condition="getOffset(iSpan, 79) != 255">getNode(iSpan, 79)</Item>
<Item Name="[{getKey(iSpan, 80)}]" Condition="getOffset(iSpan, 80) != 255">getNode(iSpan, 80)</Item>
<Item Name="[{getKey(iSpan, 81)}]" Condition="getOffset(iSpan, 81) != 255">getNode(iSpan, 81)</Item>
<Item Name="[{getKey(iSpan, 82)}]" Condition="getOffset(iSpan, 82) != 255">getNode(iSpan, 82)</Item>
<Item Name="[{getKey(iSpan, 83)}]" Condition="getOffset(iSpan, 83) != 255">getNode(iSpan, 83)</Item>
<Item Name="[{getKey(iSpan, 84)}]" Condition="getOffset(iSpan, 84) != 255">getNode(iSpan, 84)</Item>
<Item Name="[{getKey(iSpan, 85)}]" Condition="getOffset(iSpan, 85) != 255">getNode(iSpan, 85)</Item>
<Item Name="[{getKey(iSpan, 86)}]" Condition="getOffset(iSpan, 86) != 255">getNode(iSpan, 86)</Item>
<Item Name="[{getKey(iSpan, 87)}]" Condition="getOffset(iSpan, 87) != 255">getNode(iSpan, 87)</Item>
<Item Name="[{getKey(iSpan, 88)}]" Condition="getOffset(iSpan, 88) != 255">getNode(iSpan, 88)</Item>
<Item Name="[{getKey(iSpan, 89)}]" Condition="getOffset(iSpan, 89) != 255">getNode(iSpan, 89)</Item>
<Item Name="[{getKey(iSpan, 90)}]" Condition="getOffset(iSpan, 90) != 255">getNode(iSpan, 90)</Item>
<Item Name="[{getKey(iSpan, 91)}]" Condition="getOffset(iSpan, 91) != 255">getNode(iSpan, 91)</Item>
<Item Name="[{getKey(iSpan, 92)}]" Condition="getOffset(iSpan, 92) != 255">getNode(iSpan, 92)</Item>
<Item Name="[{getKey(iSpan, 93)}]" Condition="getOffset(iSpan, 93) != 255">getNode(iSpan, 93)</Item>
<Item Name="[{getKey(iSpan, 94)}]" Condition="getOffset(iSpan, 94) != 255">getNode(iSpan, 94)</Item>
<Item Name="[{getKey(iSpan, 95)}]" Condition="getOffset(iSpan, 95) != 255">getNode(iSpan, 95)</Item>
<Item Name="[{getKey(iSpan, 96)}]" Condition="getOffset(iSpan, 96) != 255">getNode(iSpan, 96)</Item>
<Item Name="[{getKey(iSpan, 97)}]" Condition="getOffset(iSpan, 97) != 255">getNode(iSpan, 97)</Item>
<Item Name="[{getKey(iSpan, 98)}]" Condition="getOffset(iSpan, 98) != 255">getNode(iSpan, 98)</Item>
<Item Name="[{getKey(iSpan, 99)}]" Condition="getOffset(iSpan, 99) != 255">getNode(iSpan, 99)</Item>
<Item Name="[{getKey(iSpan, 100)}]" Condition="getOffset(iSpan, 100) != 255">getNode(iSpan, 100)</Item>
<Item Name="[{getKey(iSpan, 101)}]" Condition="getOffset(iSpan, 101) != 255">getNode(iSpan, 101)</Item>
<Item Name="[{getKey(iSpan, 102)}]" Condition="getOffset(iSpan, 102) != 255">getNode(iSpan, 102)</Item>
<Item Name="[{getKey(iSpan, 103)}]" Condition="getOffset(iSpan, 103) != 255">getNode(iSpan, 103)</Item>
<Item Name="[{getKey(iSpan, 104)}]" Condition="getOffset(iSpan, 104) != 255">getNode(iSpan, 104)</Item>
<Item Name="[{getKey(iSpan, 105)}]" Condition="getOffset(iSpan, 105) != 255">getNode(iSpan, 105)</Item>
<Item Name="[{getKey(iSpan, 106)}]" Condition="getOffset(iSpan, 106) != 255">getNode(iSpan, 106)</Item>
<Item Name="[{getKey(iSpan, 107)}]" Condition="getOffset(iSpan, 107) != 255">getNode(iSpan, 107)</Item>
<Item Name="[{getKey(iSpan, 108)}]" Condition="getOffset(iSpan, 108) != 255">getNode(iSpan, 108)</Item>
<Item Name="[{getKey(iSpan, 109)}]" Condition="getOffset(iSpan, 109) != 255">getNode(iSpan, 109)</Item>
<Item Name="[{getKey(iSpan, 110)}]" Condition="getOffset(iSpan, 110) != 255">getNode(iSpan, 110)</Item>
<Item Name="[{getKey(iSpan, 111)}]" Condition="getOffset(iSpan, 111) != 255">getNode(iSpan, 111)</Item>
<Item Name="[{getKey(iSpan, 112)}]" Condition="getOffset(iSpan, 112) != 255">getNode(iSpan, 112)</Item>
<Item Name="[{getKey(iSpan, 113)}]" Condition="getOffset(iSpan, 113) != 255">getNode(iSpan, 113)</Item>
<Item Name="[{getKey(iSpan, 114)}]" Condition="getOffset(iSpan, 114) != 255">getNode(iSpan, 114)</Item>
<Item Name="[{getKey(iSpan, 115)}]" Condition="getOffset(iSpan, 115) != 255">getNode(iSpan, 115)</Item>
<Item Name="[{getKey(iSpan, 116)}]" Condition="getOffset(iSpan, 116) != 255">getNode(iSpan, 116)</Item>
<Item Name="[{getKey(iSpan, 117)}]" Condition="getOffset(iSpan, 117) != 255">getNode(iSpan, 117)</Item>
<Item Name="[{getKey(iSpan, 118)}]" Condition="getOffset(iSpan, 118) != 255">getNode(iSpan, 118)</Item>
<Item Name="[{getKey(iSpan, 119)}]" Condition="getOffset(iSpan, 119) != 255">getNode(iSpan, 119)</Item>
<Item Name="[{getKey(iSpan, 120)}]" Condition="getOffset(iSpan, 120) != 255">getNode(iSpan, 120)</Item>
<Item Name="[{getKey(iSpan, 121)}]" Condition="getOffset(iSpan, 121) != 255">getNode(iSpan, 121)</Item>
<Item Name="[{getKey(iSpan, 122)}]" Condition="getOffset(iSpan, 122) != 255">getNode(iSpan, 122)</Item>
<Item Name="[{getKey(iSpan, 123)}]" Condition="getOffset(iSpan, 123) != 255">getNode(iSpan, 123)</Item>
<Item Name="[{getKey(iSpan, 124)}]" Condition="getOffset(iSpan, 124) != 255">getNode(iSpan, 124)</Item>
<Item Name="[{getKey(iSpan, 125)}]" Condition="getOffset(iSpan, 125) != 255">getNode(iSpan, 125)</Item>
<Item Name="[{getKey(iSpan, 126)}]" Condition="getOffset(iSpan, 126) != 255">getNode(iSpan, 126)</Item>
<Item Name="[{getKey(iSpan, 127)}]" Condition="getOffset(iSpan, 127) != 255">getNode(iSpan, 127)</Item>
<Exec>iSpan++</Exec>
</If>
</Loop>
</CustomListItems>
</Expand>
</Type>
<Type Name="QSet&lt;*&gt;">
<DisplayString>{{ size={q_hash.d-&gt;size} }}</DisplayString>
<Expand>
<ExpandedItem>q_hash</ExpandedItem>
</Expand>
</Type>
<Type Name="QVariant">
<Intrinsic Name="typeId" Expression="*(int*)(&amp;((const QtPrivate::QMetaTypeInterface *)(d.packedType &lt;&lt; 2))->typeId)">
</Intrinsic>
<Intrinsic Name="dataStar" Expression="(&amp;(d.data.data))">
</Intrinsic>
<Intrinsic Name="sharedDataStar" Expression="(d.is_shared ? reinterpret_cast&lt;const void *&gt;((size_t)(d.data.shared) + d.data.shared-&gt;offset) : (&amp;(d.data.data)))">
</Intrinsic>
<DisplayString Condition="d.is_null">(null)</DisplayString>
<!-- Static core pointers -->
<DisplayString Condition="typeId() == QMetaType::QObjectStar">QObject*</DisplayString>
<!-- Static core template classes -->
<DisplayString Condition="typeId() == QMetaType::QVariantMap">{*(QMap&lt;QString,QVariant&gt;*) sharedDataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QVariantList">{*(QList&lt;QVariant&gt;*) sharedDataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QVariantHash">{*(QHash&lt;QString,QVariant&gt;*) sharedDataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QVariantPair">QVariantPair</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QByteArrayList">{*(QList&lt;QByteArray&gt;*) sharedDataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QStringList">{*(QList&lt;QString&gt;*) sharedDataStar()}</DisplayString>
<!-- Static primitives-->
<DisplayString Condition="typeId() == QMetaType::Bool">{*(bool*) dataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::Int">{*(int*) dataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::UInt">{*(unsigned int*) dataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::LongLong">{*(long long*) dataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::ULongLong">{*(unsigned long long*) dataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::Double">{*(double*) dataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::VoidStar">{*(void**) dataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::Long">{*(long*) dataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::Short">{*(short*) dataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::Char">{*(char*) dataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::Char16">{*(char16_t*) dataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::Char32">{*(char32_t*) dataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::ULong">{*(unsigned long*) dataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::UShort">{*(unsigned short*) dataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::UChar">{*(unsigned char*) dataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::Float">{*(float*) dataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::SChar">{*(signed char*) dataStar()}</DisplayString>
<!-- Static core classes -->
<DisplayString Condition="typeId() == QMetaType::QChar">{*(QChar*) sharedDataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QString">{*(QString*) sharedDataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QByteArray">{*(QByteArray*) sharedDataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QDate">{*(QDate*) sharedDataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QTime">{*(QTime*) sharedDataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QDateTime">QDateTime</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QUrl">QUrl</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QLocale">QLocale</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QRect">{*(QRect*) sharedDataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QRectF">{*(QRectF*) sharedDataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QSize">{*(QSize*) sharedDataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QSizeF">{*(QSizeF*) sharedDataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QLine">{*(QLine*) sharedDataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QLineF">{*(QLineF*) sharedDataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QPoint">{*(QPoint*) sharedDataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QPointF">{*(QPointF*) sharedDataStar()}</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QEasingCurve">EasingCurve</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QUuid">Uuid</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QRegularExpression">RegularExpression</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QJsonValue">QJsonValue</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QJsonObject">QJsonObject</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QJsonArray">QJsonArray</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QJsonDocument">QJsonDocument</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QCborValue">QCborValue</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QCborArray">QCborArray</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QCborMap">QCborMap</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QModelIndex">ModelIndex</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QPersistentModelIndex">QPersistentModelIndex</DisplayString>
<!-- Static gui classes -->
<DisplayString Condition="typeId() == QMetaType::QFont">QFont</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QPixmap">QPixmap</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QBrush">QBrush</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QColor">QColor</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QPalette">QPalette</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QIcon">QIcon</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QImage">QImage</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QPolygon">QPolygon</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QRegion">QRegion</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QBitmap">QBitmap</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QCursor">QCursor</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QKeySequence">QKeySequence</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QPen">QPen</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QTextLength">QTextLength</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QTextFormat">QTextFormat</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QTransform">QTransform</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QMatrix4x4">QMatrix4x4</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QVector2D">QVector2D</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QVector3D">QVector3D</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QVector4D">QVector4D</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QQuaternion">QQuaternion</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QPolygonF">QPolygonF</DisplayString>
<DisplayString Condition="typeId() == QMetaType::QColorSpace">QColorSpace</DisplayString>
<!-- Static widget classes -->
<DisplayString Condition="typeId() == QMetaType::QSizePolicy">QSizePolicy</DisplayString>
<!-- Unhandled : display the typeId-->
<DisplayString>QMetaType::Type ({typeId()})</DisplayString>
<Expand>
<ExpandedItem Condition="typeId() == QMetaType::QString">*(QString*) sharedDataStar()</ExpandedItem>
<ExpandedItem Condition="typeId() == QMetaType::QByteArray">*(QByteArray*) sharedDataStar()</ExpandedItem>
<ExpandedItem Condition="typeId() == QMetaType::QDate">*(QDate*) sharedDataStar()</ExpandedItem>
<ExpandedItem Condition="typeId() == QMetaType::QTime">*(QTime*) sharedDataStar()</ExpandedItem>
<ExpandedItem Condition="typeId() == QMetaType::QRect">*(QRect*) sharedDataStar()</ExpandedItem>
<ExpandedItem Condition="typeId() == QMetaType::QRectF">*(QRectF*) sharedDataStar()</ExpandedItem>
<ExpandedItem Condition="typeId() == QMetaType::QSize">*(QSize*) sharedDataStar()</ExpandedItem>
<ExpandedItem Condition="typeId() == QMetaType::QSizeF">*(QSizeF*) sharedDataStar()</ExpandedItem>
<ExpandedItem Condition="typeId() == QMetaType::QLine">*(QLine*) sharedDataStar()</ExpandedItem>
<ExpandedItem Condition="typeId() == QMetaType::QLineF">*(QLineF*) sharedDataStar()</ExpandedItem>
<ExpandedItem Condition="typeId() == QMetaType::QPoint">*(QPoint*) sharedDataStar()</ExpandedItem>
<ExpandedItem Condition="typeId() == QMetaType::QPointF">*(QPointF*) sharedDataStar()</ExpandedItem>
<ExpandedItem Condition="typeId() == QMetaType::QVariantMap">*(QMap&lt;QString,QVariant&gt;*) sharedDataStar()</ExpandedItem>
<ExpandedItem Condition="typeId() == QMetaType::QVariantList">*(QList&lt;QVariant&gt;*) sharedDataStar()</ExpandedItem>
<ExpandedItem Condition="typeId() == QMetaType::QVariantHash">*(QHash&lt;QString,QVariant&gt;*) sharedDataStar()</ExpandedItem>
<ExpandedItem Condition="typeId() == QMetaType::QByteArrayList">*(QList&lt;QByteArray&gt;*) sharedDataStar()</ExpandedItem>
<ExpandedItem Condition="typeId() == QMetaType::QStringList">*(QList&lt;QString&gt;*) sharedDataStar()</ExpandedItem>
</Expand>
</Type>
</AutoVisualizer>

127
.vscode/settings.json vendored
View File

@ -1,127 +0,0 @@
{
"files.autoSave": "onFocusChange",
"editor.fontSize": 13,
"editor.fontFamily": "'FiraCode Nerd Font Mono', 'FiraCode Nerd Font Mono', 'FiraCode Nerd Font Mono'",
"cmake.configureOnOpen": true,
"cmake.debugConfig": {
"console": "integratedTerminal",
"setupCommands": [
{
"description": "-gdb-set charset utf-8",
"text": "-gdb-set charset UTF-8"
},
{
"description": "Enable gdb pretty-printing",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"visualizerFile": "${workspaceRoot}/.vscode/qt6.natvis"
},
"cmake.environment": {
"PATH": "${env:PATH};C:/Qt/6.7.2/bin;C:/Qt/Qt5.14.2/5.14.2/msvc2017_64/bin;D:/Qt/Qt5.14.2/5.14.2/msvc2017_64/bin"
},
"cmake.options.statusBarVisibility": "visible",
"cmake.generator": "Ninja",
"C_Cpp.default.compileCommands": "${workspaceRoot}/build/compile_commands.json",
"C_Cpp.default.cppStandard": "c++14",
"editor.inlayHints.enabled": "off",
"editor.unicodeHighlight.allowedLocales": {
"ja": true,
"zh-hant": true,
"zh-hans": true
},
"files.associations": {
"algorithm": "cpp",
"atomic": "cpp",
"cctype": "cpp",
"chrono": "cpp",
"cmath": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"exception": "cpp",
"filesystem": "cpp",
"functional": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"iterator": "cpp",
"limits": "cpp",
"list": "cpp",
"locale": "cpp",
"map": "cpp",
"memory": "cpp",
"mutex": "cpp",
"new": "cpp",
"numeric": "cpp",
"ostream": "cpp",
"ratio": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"thread": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"typeinfo": "cpp",
"unordered_map": "cpp",
"utility": "cpp",
"variant": "cpp",
"vector": "cpp",
"xfacet": "cpp",
"xhash": "cpp",
"xiosbase": "cpp",
"xlocale": "cpp",
"xlocbuf": "cpp",
"xlocinfo": "cpp",
"xlocmes": "cpp",
"xlocmon": "cpp",
"xlocnum": "cpp",
"xloctime": "cpp",
"xmemory": "cpp",
"xmemory0": "cpp",
"xstddef": "cpp",
"xstring": "cpp",
"xtr1common": "cpp",
"xtree": "cpp",
"xutility": "cpp",
"qtablewidget": "cpp",
"qmenu": "cpp",
"qmessagebox": "cpp",
"qaction": "cpp",
"codecvt": "cpp",
"qregexp": "cpp",
"qregularexpression": "cpp",
"array": "cpp",
"bit": "cpp",
"charconv": "cpp",
"clocale": "cpp",
"compare": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"format": "cpp",
"forward_list": "cpp",
"future": "cpp",
"optional": "cpp",
"sstream": "cpp",
"stop_token": "cpp",
"regex": "cpp",
"*.tcc": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"memory_resource": "cpp",
"random": "cpp",
"fstream": "cpp",
"cinttypes": "cpp"
}
}

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.16)
project(OneLevelXmlOpr VERSION 0.1 LANGUAGES CXX) project(OneLevelXmlOpr VERSION 0.1 LANGUAGES CXX)
@ -52,7 +52,7 @@ if (MSVC)
# if(${QT_VERSION_MAJOR} LESS 6) # if(${QT_VERSION_MAJOR} LESS 6)
# add_compile_options(/source-charset:utf-8) # add_compile_options(/source-charset:utf-8)
# endif() # endif()
#add_compile_options(/source-charset:utf-8) add_compile_options(/utf-8)
add_compile_options(/EHsc) add_compile_options(/EHsc)
add_compile_options(/wd4267) add_compile_options(/wd4267)
add_compile_options(-D_CRT_SECURE_NO_WARNINGS) add_compile_options(-D_CRT_SECURE_NO_WARNINGS)

View File

@ -16,12 +16,11 @@
constexpr std::size_t g_OnePage = 100; constexpr std::size_t g_OnePage = 100;
namespace fs = std::filesystem; namespace fs = std::filesystem;
MainWidget::MainWidget(QWidget* parent) MainWidget::MainWidget(QWidget* parent) : QWidget(parent), ui(new Ui::MainWidget)
: QWidget(parent), ui(new Ui::MainWidget)
{ {
ui->setupUi(this); ui->setupUi(this);
setWindowTitle(u8"OneLevelXmlOpr v1.3.8"); setWindowTitle(u8"OneLevelXmlOpr v1.3.10");
setWindowIcon(QIcon("://resource/xml.ico")); setWindowIcon(QIcon("://resource/xml.ico"));
QScreen* primaryScreen = QGuiApplication::primaryScreen(); QScreen* primaryScreen = QGuiApplication::primaryScreen();
@ -54,33 +53,23 @@ MainWidget::MainWidget(QWidget* parent)
ui->btnResort->setEnabled(false); ui->btnResort->setEnabled(false);
connect(ui->btnSelectFile, &QPushButton::clicked, this, [&]() { connect(ui->btnSelectFile, &QPushButton::clicked, this, [&]() {
QString file = CUtil::select_file(this, u8"请选择xml文件", QString file = CUtil::select_file(this, u8"请选择xml文件", u8"XML(*.xml);;所有文件 (*)");
u8"XML(*.xml);;所有文件 (*)");
if (file.isEmpty()) { if (file.isEmpty()) {
return; return;
} }
ui->edStatus->setText(file); ui->edStatus->setText(file);
}); });
connect(ui->btnSearch, &QPushButton::clicked, this, connect(ui->btnSearch, &QPushButton::clicked, this, [&]() { search(ui->edSearchKey->text()); });
[&]() { search(ui->edSearchKey->text()); }); connect(ui->btnBackup, &QPushButton::clicked, this, [&]() { backup_file(); });
connect(ui->btnBackup, &QPushButton::clicked, this, connect(ui->btnFormat, &QPushButton::clicked, this, [&]() { format_xml(); });
[&]() { backup_file(); }); connect(ui->btnRead, &QPushButton::clicked, this, [&]() { read(ui->edStatus->text().trimmed()); });
connect(ui->btnFormat, &QPushButton::clicked, this,
[&]() { format_xml(); });
connect(ui->btnRead, &QPushButton::clicked, this,
[&]() { read(ui->edStatus->text().trimmed()); });
connect(ui->btnSave, &QPushButton::clicked, this, [&]() { save(); }); connect(ui->btnSave, &QPushButton::clicked, this, [&]() { save(); });
connect(ui->btnExit, &QPushButton::clicked, this, connect(ui->btnExit, &QPushButton::clicked, this, [&]() { QApplication::exit(0); });
[&]() { QApplication::exit(0); });
connect(ui->btnReset, &QPushButton::clicked, this, &MainWidget::reset); connect(ui->btnReset, &QPushButton::clicked, this, &MainWidget::reset);
connect(ui->btnReplace, &QPushButton::clicked, this, connect(ui->btnReplace, &QPushButton::clicked, this, [&]() { replace_content(true); });
[&]() { replace_content(true); }); connect(ui->btnRxReplace, &QPushButton::clicked, this, [&]() { replace_content(false); });
connect(ui->btnRxReplace, &QPushButton::clicked, this, connect(ui->cbUnit, &QComboBox::currentTextChanged, this, [&](const QString& content) { unit_change(); });
[&]() { replace_content(false); }); connect(ui->btnExport, &QPushButton::clicked, this, &MainWidget::copy_multi_data);
connect(ui->cbUnit, &QComboBox::currentTextChanged, this,
[&](const QString& content) { unit_change(); });
connect(ui->btnExport, &QPushButton::clicked, this,
&MainWidget::copy_multi_data);
connect(ui->btnPagePre, &QPushButton::clicked, this, [&]() { connect(ui->btnPagePre, &QPushButton::clicked, this, [&]() {
unsigned int cur = ui->edCurPage->text().toUInt(); unsigned int cur = ui->edCurPage->text().toUInt();
push_content(current_, cur - 1); push_content(current_, cur - 1);
@ -96,8 +85,7 @@ MainWidget::MainWidget(QWidget* parent)
} }
if (cur_config_.is_same) { if (cur_config_.is_same) {
xml_.get_all_elements(vec_, xml_.get_all_elements(vec_, ui->cbUnit->currentText().toStdString());
ui->cbUnit->currentText().toStdString());
} else { } else {
xml_.get_all_elements(vec_); xml_.get_all_elements(vec_);
} }
@ -108,8 +96,9 @@ MainWidget::MainWidget(QWidget* parent)
}); });
connect(ui->btnSet, &QPushButton::clicked, this, [&]() { connect(ui->btnSet, &QPushButton::clicked, this, [&]() {
QString cur = ui->cbConfig->currentText();
group_set_->exec(); group_set_->exec();
base_init(); base_init(cur);
}); });
connect(ui->btnHis, &QPushButton::clicked, this, [&]() { connect(ui->btnHis, &QPushButton::clicked, this, [&]() {
CUIHistory his(this, his_); CUIHistory his(this, his_);
@ -151,7 +140,7 @@ MainWidget::MainWidget(QWidget* parent)
restoreGeometry(settings.value("geometry").toByteArray()); restoreGeometry(settings.value("geometry").toByteArray());
settings.endGroup(); settings.endGroup();
// QFile qss_file("://qss/lightblue.css"); //QFile qss_file("://qss/lightblue.css");
// QFile qss_file("://qss/flatgray.css"); // QFile qss_file("://qss/flatgray.css");
// if (qss_file.open(QFile::ReadOnly)) { // if (qss_file.open(QFile::ReadOnly)) {
// qApp->setStyleSheet(qss_file.readAll()); // qApp->setStyleSheet(qss_file.readAll());
@ -159,7 +148,7 @@ MainWidget::MainWidget(QWidget* parent)
init_menu(); init_menu();
// 基本处理 // 基本处理
base_init(); base_init("");
} }
void MainWidget::copy_key() void MainWidget::copy_key()
@ -224,14 +213,15 @@ void MainWidget::show_custom_menu()
void MainWidget::generate_table_widget() void MainWidget::generate_table_widget()
{ {
tab_widget_ = new QTableWidget(); clear_tab_widget();
if (tab_widget_ == nullptr) {
tab_widget_ = new QTableWidget();
}
metrics_ = std::make_shared<QFontMetrics>(tab_widget_->font()); metrics_ = std::make_shared<QFontMetrics>(tab_widget_->font());
tab_widget_->setContextMenuPolicy(Qt::CustomContextMenu); tab_widget_->setContextMenuPolicy(Qt::CustomContextMenu);
connect(tab_widget_, &QTableWidget::itemChanged, this, connect(tab_widget_, &QTableWidget::itemChanged, this, [&](QTableWidgetItem* item) { item_changed_handle(item); });
[&](QTableWidgetItem* item) { item_changed_handle(item); }); connect(tab_widget_, &QTableWidget::customContextMenuRequested, this, &MainWidget::show_custom_menu);
connect(tab_widget_, &QTableWidget::customContextMenuRequested, this,
&MainWidget::show_custom_menu);
auto keys = CUtil::splitString(cur_config_.propertis, ","); auto keys = CUtil::splitString(cur_config_.propertis, ",");
keys_.clear(); keys_.clear();
@ -258,13 +248,14 @@ void MainWidget::generate_table_widget()
tab_widget_->setColumnWidth(i, col_with_[i]); tab_widget_->setColumnWidth(i, col_with_[i]);
} }
QHBoxLayout* lay = new QHBoxLayout(); if (lay_ == nullptr) {
lay->addWidget(tab_widget_); lay_ = new QHBoxLayout();
ui->widget->setLayout(lay); }
lay_->addWidget(tab_widget_);
ui->widget->setLayout(lay_);
} }
void MainWidget::push_content(const std::vector<tinyxml2::XMLElement*>& eles, void MainWidget::push_content(const std::vector<tinyxml2::XMLElement*>& eles, std::size_t page, bool auto_jump_pre)
std::size_t page, bool auto_jump_pre)
{ {
if (tab_widget_ == nullptr || page == 0) { if (tab_widget_ == nullptr || page == 0) {
return; return;
@ -331,22 +322,44 @@ void MainWidget::judge_btn_page()
} }
} }
void MainWidget::clear_data()
{
}
bool MainWidget::read(const QString& file_path) bool MainWidget::read(const QString& file_path)
{ {
unit_change_auto_ = true;
ui->cbUnit->clear();
unit_change_auto_ = false;
if (alreay_open_) {
if (!CUtil::affirm(this, u8"确认", u8"当前已有打开文件在使用,请确认已保存相关内容再继续。")) {
return false;
} else {
xml_.clear_data();
current_.clear();
vec_.clear();
}
}
// 获取配置 // 获取配置
cur_config_.name = ui->cbConfig->currentText().toStdString(); cur_config_.name = ui->cbConfig->currentText().toStdString();
if (!ini_oper_->get_item(cur_config_)) { if (!ini_oper_->get_item(cur_config_)) {
CUtil::msg(this, u8"获取配置失败。"); CUtil::msg(this, u8"获取配置失败。");
clear_tab_widget();
alreay_open_ = false;
return false; return false;
} }
if (!xml_.open(file_path.toStdString())) { if (!xml_.open(file_path.toStdString())) {
CUtil::msg(this, u8"打开xml失败。"); CUtil::msg(this, u8"打开xml失败。");
clear_tab_widget();
alreay_open_ = false;
return false; return false;
} }
xml_.set_baseinfo(cur_config_); xml_.set_baseinfo(cur_config_);
if (!xml_.parse_xml(vec_)) { if (!xml_.parse_xml(vec_)) {
CUtil::msg(this, u8"解析xml失败。"); CUtil::msg(this, u8"解析xml失败。");
clear_tab_widget();
alreay_open_ = false;
return false; return false;
} }
@ -369,6 +382,7 @@ bool MainWidget::read(const QString& file_path)
} }
u_ = false; u_ = false;
ui->btnResort->setEnabled(false); ui->btnResort->setEnabled(false);
ui->cbUnit->setEnabled(true);
} else { } else {
ui->cbUnit->setEnabled(false); ui->cbUnit->setEnabled(false);
} }
@ -384,21 +398,20 @@ bool MainWidget::read(const QString& file_path)
current_ = vec_; current_ = vec_;
ui->edStatus->setText(file_path); ui->edStatus->setText(file_path);
ui->btnRead->setEnabled(false); // ui->btnRead->setEnabled(false);
ui->btnSave->setEnabled(true); ui->btnSave->setEnabled(true);
ui->btnSelectFile->setEnabled(false); // ui->btnSelectFile->setEnabled(false);
ui->btnImport->setEnabled(true); ui->btnImport->setEnabled(true);
ui->btnExport->setEnabled(true); ui->btnExport->setEnabled(true);
ui->btnBackup->setEnabled(true); ui->btnBackup->setEnabled(true);
ui->btnBackup->setEnabled(true);
ui->btnResort->setEnabled(true); ui->btnResort->setEnabled(true);
ui->cbConfig->setEnabled(false); // ui->cbConfig->setEnabled(false);
ui->btnSet->setEnabled(false); // ui->btnSet->setEnabled(false);
ui->btnHis->setEnabled(false); // ui->btnHis->setEnabled(false);
his_->push(ui->edStatus->text().toStdString()); his_->push(ui->edStatus->text().toStdString());
alreay_open_ = true;
return true; return true;
} }
@ -452,8 +465,7 @@ void MainWidget::item_changed_handle(QTableWidgetItem* item)
if (result == nullptr) { if (result == nullptr) {
return; return;
} }
result->SetAttribute(keys_[col].c_str(), result->SetAttribute(keys_[col].c_str(), item->text().toStdString().c_str());
item->text().toStdString().c_str());
} }
void MainWidget::save() void MainWidget::save()
@ -550,8 +562,7 @@ void MainWidget::ele_update_gui(Element_t* target, const QString& pre_value)
QString search_key; QString search_key;
if (pre_value.isEmpty()) { if (pre_value.isEmpty()) {
search_key = search_key = QString::fromLocal8Bit(target->Attribute(keys_[0].c_str()));
QString::fromLocal8Bit(target->Attribute(keys_[0].c_str()));
} else { } else {
search_key = pre_value; search_key = pre_value;
} }
@ -605,10 +616,8 @@ void MainWidget::init_menu()
} }
edit_property(target, cur_item->row(), false); edit_property(target, cur_item->row(), false);
}); });
connect(ac_copy_curline_, &QAction::triggered, this, connect(ac_copy_curline_, &QAction::triggered, this, [&]() { copy_select_line(); });
[&]() { copy_select_line(); }); connect(ac_del_curline_, &QAction::triggered, this, [&]() { del_select_line(); });
connect(ac_del_curline_, &QAction::triggered, this,
[&]() { del_select_line(); });
connect(ac_copy_key_, &QAction::triggered, this, [&]() { copy_key(); }); connect(ac_copy_key_, &QAction::triggered, this, [&]() { copy_key(); });
} }
@ -628,10 +637,8 @@ void MainWidget::insert_one_line(Element_t* ele, int row)
} }
QString sda(data); QString sda(data);
int dwidth = metrics_->horizontalAdvance(sda) + blank_with_; int dwidth = metrics_->horizontalAdvance(sda) + blank_with_;
int need_set_width = int need_set_width = dwidth > allow_max_with_ ? allow_max_with_ : dwidth;
dwidth > allow_max_with_ ? allow_max_with_ : dwidth; col_with_[i] = col_with_[i] < need_set_width ? need_set_width : col_with_[i];
col_with_[i] =
col_with_[i] < need_set_width ? need_set_width : col_with_[i];
wgItem->setText(sda); wgItem->setText(sda);
tab_widget_->setItem(row, i, wgItem); tab_widget_->setItem(row, i, wgItem);
} }
@ -737,9 +744,7 @@ void MainWidget::sort_by_repeat(std::vector<Element_t*>& vec)
turn_vec.emplace_back(item, d); turn_vec.emplace_back(item, d);
} }
std::sort(turn_vec.begin(), turn_vec.end(), std::sort(turn_vec.begin(), turn_vec.end(),
[&](const SElement_t& se1, const SElement_t& se2) { [&](const SElement_t& se1, const SElement_t& se2) { return compare_by_prefix(se1, se2); });
return compare_by_prefix(se1, se2);
});
vec.clear(); vec.clear();
for (const auto& item : turn_vec) { for (const auto& item : turn_vec) {
vec.push_back(item.ele); vec.push_back(item.ele);
@ -811,8 +816,7 @@ void MainWidget::replace_content(bool is_common)
std::vector<OperElement*> vec; std::vector<OperElement*> vec;
if (ui->rbReplaceSelect->isChecked()) { if (ui->rbReplaceSelect->isChecked()) {
QModelIndexList indexList = QModelIndexList indexList = tab_widget_->selectionModel()->selectedRows();
tab_widget_->selectionModel()->selectedRows();
if (indexList.size() < 1) { if (indexList.size() < 1) {
CUtil::msg(this, u8"无选择数据"); CUtil::msg(this, u8"无选择数据");
return; return;
@ -842,8 +846,7 @@ void MainWidget::replace_content(bool is_common)
} }
} }
void MainWidget::replace_str(const QString& pre, const QString& after, void MainWidget::replace_str(const QString& pre, const QString& after, Element_t* ele)
Element_t* ele)
{ {
if (ele == nullptr) { if (ele == nullptr) {
return; return;
@ -858,8 +861,7 @@ void MainWidget::replace_str(const QString& pre, const QString& after,
} }
} }
void MainWidget::replace_str(Element_t* ele, const QString& rg, void MainWidget::replace_str(Element_t* ele, const QString& rg, const QString& after)
const QString& after)
{ {
QRegularExpression rx(rg); QRegularExpression rx(rg);
if (ele == nullptr) { if (ele == nullptr) {
@ -876,17 +878,14 @@ void MainWidget::replace_str(Element_t* ele, const QString& rg,
} }
} }
void MainWidget::get_related_elements(std::vector<OperElement*>& out, void MainWidget::get_related_elements(std::vector<OperElement*>& out, ReplaceArea area)
ReplaceArea area)
{ {
assert(tab_widget_); assert(tab_widget_);
out.clear(); out.clear();
switch (area) { switch (area) {
case AREA_ALL_PAGE: { case AREA_ALL_PAGE: {
out.resize(current_.size()); out.resize(current_.size());
std::transform( std::transform(current_.begin(), current_.end(), out.begin(), [](Element_t* ele) { return new OperElement(ele, 0); });
current_.begin(), current_.end(), out.begin(),
[](Element_t* ele) { return new OperElement(ele, 0); });
break; break;
} }
case AREA_CUR_PAGE: { case AREA_CUR_PAGE: {
@ -898,18 +897,13 @@ void MainWidget::get_related_elements(std::vector<OperElement*>& out,
} }
case AREA_ALL: { case AREA_ALL: {
out.resize(vec_.size()); out.resize(vec_.size());
std::transform( std::transform(vec_.begin(), vec_.end(), out.begin(), [](Element_t* ele) { return new OperElement(ele, 0); });
vec_.begin(), vec_.end(), out.begin(),
[](Element_t* ele) { return new OperElement(ele, 0); });
break; break;
} }
default: { default: {
QModelIndexList indexList = QModelIndexList indexList = tab_widget_->selectionModel()->selectedRows();
tab_widget_->selectionModel()->selectedRows();
for (int i = 0; i < indexList.size(); ++i) { for (int i = 0; i < indexList.size(); ++i) {
out.emplace_back( out.emplace_back(new OperElement(get_element_by_row(indexList[i].row()), indexList[i].row()));
new OperElement(get_element_by_row(indexList[i].row()),
indexList[i].row()));
} }
break; break;
} }
@ -923,23 +917,25 @@ void MainWidget::backup_file()
} }
QString time = QDateTime::currentDateTime().toString("yyyy-MMdd-hhmmss"); QString time = QDateTime::currentDateTime().toString("yyyy-MMdd-hhmmss");
if (!xml_.backup_file( if (!xml_.backup_file(fs::path(exe_path_).parent_path().append("backup").string(), time.toStdString())) {
fs::path(exe_path_).parent_path().append("backup").string(),
time.toStdString())) {
CUtil::msg(this, u8"备份失败。"); CUtil::msg(this, u8"备份失败。");
} else { } else {
CUtil::msg(this, u8"备份完成。"); CUtil::msg(this, u8"备份完成。");
} }
} }
void MainWidget::base_init() void MainWidget::base_init(const QString& cur_config)
{ {
StrVec_t vec; StrVec_t vec;
ini_oper_->get_all_node(vec); ini_oper_->get_all_node(vec);
QStringList list; QStringList list;
bool have = false;
for (const auto& data : vec) { for (const auto& data : vec) {
list.append(QString::fromStdString(data)); list.append(QString::fromStdString(data));
if (QString::fromStdString(data) == cur_config) {
have = true;
}
} }
ui->cbConfig->clear(); ui->cbConfig->clear();
@ -948,7 +944,11 @@ void MainWidget::base_init()
} }
ui->cbConfig->addItems(list); ui->cbConfig->addItems(list);
ui->cbConfig->setCurrentIndex(0); if (have) {
ui->cbConfig->setCurrentIndex(list.indexOf(cur_config));
} else {
ui->cbConfig->setCurrentIndex(0);
}
} }
void MainWidget::unit_change() void MainWidget::unit_change()
@ -956,6 +956,9 @@ void MainWidget::unit_change()
if (u_) { if (u_) {
return; return;
} }
if (unit_change_auto_) {
return;
}
std::string unit = ui->cbUnit->currentText().toStdString(); std::string unit = ui->cbUnit->currentText().toStdString();
if (!xml_.get_all_elements(vec_, unit)) { if (!xml_.get_all_elements(vec_, unit)) {
CUtil::msg(this, u8"获取单元信息失败:" + QString::fromStdString(unit)); CUtil::msg(this, u8"获取单元信息失败:" + QString::fromStdString(unit));
@ -979,9 +982,7 @@ bool MainWidget::format_xml()
return false; return false;
} }
if (!CUtil::affirm( if (!CUtil::affirm(this, u8"确认", u8"重排版内容将会覆盖源文件,请确认是否需要备份,继续?")) {
this, u8"确认",
u8"重排版内容将会覆盖源文件,请确认是否需要备份,继续?")) {
return false; return false;
} }
@ -993,6 +994,18 @@ bool MainWidget::format_xml()
return true; return true;
} }
void MainWidget::clear_tab_widget()
{
if (tab_widget_) {
tab_widget_->setRowCount(0);
if (lay_) {
lay_->removeWidget(tab_widget_);
}
delete tab_widget_;
tab_widget_ = new QTableWidget();
}
}
std::string MainWidget::extract_prefix(const std::string& name) std::string MainWidget::extract_prefix(const std::string& name)
{ {
auto pos = name.find('.'); auto pos = name.find('.');

View File

@ -7,6 +7,7 @@
#include <QTableWidget> #include <QTableWidget>
#include <QWidget> #include <QWidget>
#include <unordered_map> #include <unordered_map>
#include <QHBoxLayout>
#include "conf_setting.h" #include "conf_setting.h"
#include "src/attribute_edit.h" #include "src/attribute_edit.h"
@ -57,6 +58,7 @@ public:
private: private:
bool read(const QString& file_path); bool read(const QString& file_path);
void clear_data();
void search(const QString& key); void search(const QString& key);
void item_changed_handle(QTableWidgetItem* item); void item_changed_handle(QTableWidgetItem* item);
void save(); void save();
@ -74,9 +76,10 @@ private:
void copy_multi_data(); void copy_multi_data();
void replace_content(bool is_common = true); void replace_content(bool is_common = true);
void backup_file(); void backup_file();
void base_init(); void base_init(const QString& cur_config);
void unit_change(); void unit_change();
bool format_xml(); bool format_xml();
void clear_tab_widget();
private: private:
std::string extract_prefix(const std::string& name); std::string extract_prefix(const std::string& name);
@ -126,5 +129,8 @@ private:
CHistory* his_{}; CHistory* his_{};
OneGroupIni cur_config_{}; OneGroupIni cur_config_{};
bool u_{false}; bool u_{false};
bool alreay_open_{false};
QHBoxLayout* lay_{};
bool unit_change_auto_{true};
}; };
#endif // MAINWIDGET_H #endif // MAINWIDGET_H

2
build.sh Executable file
View File

@ -0,0 +1,2 @@
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release

View File

@ -3,21 +3,17 @@
#include "public_def.h" #include "public_def.h"
#include "ui_conf_setting.h" #include "ui_conf_setting.h"
CGroupSetting::CGroupSetting(QWidget* parent, CGroupIni* oper) CGroupSetting::CGroupSetting(QWidget* parent, CGroupIni* oper) : QDialog(parent), ui(new Ui::CGroupSetting)
: QDialog(parent), ui(new Ui::CGroupSetting)
{ {
ini_opr_ = oper; ini_opr_ = oper;
ui->setupUi(this); ui->setupUi(this);
setWindowTitle(u8"配置编辑"); setWindowTitle(u8"配置编辑");
connect(ui->btnAddConfig, &QPushButton::clicked, this, connect(ui->btnAddConfig, &QPushButton::clicked, this, [&]() { add_item(); });
[&]() { add_item(); }); connect(ui->btnDelConfig, &QPushButton::clicked, this, [&]() { del_item(); });
connect(ui->btnDelConfig, &QPushButton::clicked, this,
[&]() { del_item(); });
connect(ui->btnExit, &QPushButton::clicked, this, [&]() { close(); }); connect(ui->btnExit, &QPushButton::clicked, this, [&]() { close(); });
connect(ui->cbConfig, &QComboBox::currentTextChanged, this, connect(ui->cbConfig, &QComboBox::currentTextChanged, this, [&](const QString& content) { change_ini(); });
[&](const QString& content) { change_ini(); });
} }
CGroupSetting::~CGroupSetting() CGroupSetting::~CGroupSetting()
@ -27,19 +23,21 @@ CGroupSetting::~CGroupSetting()
void CGroupSetting::showEvent(QShowEvent* event) void CGroupSetting::showEvent(QShowEvent* event)
{ {
update_ini(); update_ini("");
QDialog::showEvent(event); QDialog::showEvent(event);
} }
void CGroupSetting::add_item() void CGroupSetting::add_item()
{ {
if (!CUtil::affirm(this, u8"确认", u8"确认添加/更新吗?")) {
return;
}
QString config_name = ui->edConfigName->text(); QString config_name = ui->edConfigName->text();
config_name = config_name.trimmed(); config_name = config_name.trimmed();
if (config_name.isEmpty()) { if (config_name.isEmpty()) {
CUtil::msg(this, u8"配置名为空"); CUtil::msg(this, u8"配置名为空");
return; return;
} }
// 验证重名 // 验证重名
// 添加 // 添加
@ -57,12 +55,15 @@ void CGroupSetting::add_item()
CUtil::msg(this, u8"失败"); CUtil::msg(this, u8"失败");
return; return;
} }
update_ini(); update_ini(QString::fromStdString(gp.name));
CUtil::msg(this, u8"成功"); CUtil::msg(this, u8"成功");
} }
void CGroupSetting::del_item() void CGroupSetting::del_item()
{ {
if (!CUtil::affirm(this, u8"确认", u8"确认删除吗?")) {
return;
}
std::string key = ui->cbConfig->currentText().toStdString(); std::string key = ui->cbConfig->currentText().toStdString();
if (!ini_opr_->del_item(key)) { if (!ini_opr_->del_item(key)) {
CUtil::msg(this, u8"失败"); CUtil::msg(this, u8"失败");
@ -70,7 +71,7 @@ void CGroupSetting::del_item()
} }
// 删除成功之后要更新 cb // 删除成功之后要更新 cb
update_ini(); update_ini("");
CUtil::msg(this, u8"成功"); CUtil::msg(this, u8"成功");
} }
@ -107,21 +108,29 @@ void CGroupSetting::change_ini()
} }
} }
void CGroupSetting::update_ini() void CGroupSetting::update_ini(const QString& cur_key)
{ {
StrVec_t vec; StrVec_t vec;
ini_opr_->get_all_node(vec); ini_opr_->get_all_node(vec);
QStringList list; QStringList list;
bool has_cur = false;
for (const auto& data : vec) { for (const auto& data : vec) {
list.append(QString::fromStdString(data)); list.append(QString::fromStdString(data));
if (data == cur_key.toStdString()) {
has_cur = true;
}
} }
auto_add_ = true; auto_add_ = true;
ui->cbConfig->clear(); ui->cbConfig->clear();
if (!list.empty()) { if (!list.empty()) {
ui->cbConfig->addItems(list); ui->cbConfig->addItems(list);
ui->cbConfig->setCurrentIndex(0); if (has_cur) {
ui->cbConfig->setCurrentIndex(list.indexOf(cur_key));
} else {
ui->cbConfig->setCurrentIndex(0);
}
OneGroupIni gp; OneGroupIni gp;
gp.name = ui->cbConfig->currentText().toStdString(); gp.name = ui->cbConfig->currentText().toStdString();
if (!ini_opr_->get_item(gp)) { if (!ini_opr_->get_item(gp)) {

View File

@ -25,7 +25,7 @@ private:
void del_item(); void del_item();
void set_ui(const OneGroupIni& gp); void set_ui(const OneGroupIni& gp);
void change_ini(); void change_ini();
void update_ini(); void update_ini(const QString& cur_key);
private: private:
bool auto_add_{false}; bool auto_add_{false};

View File

@ -52,8 +52,7 @@ void CGroupIni::get_all_node(StrVec_t& vec)
bool CGroupIni::add_item(const OneGroupIni& group) bool CGroupIni::add_item(const OneGroupIni& group)
{ {
ini_.SetValue(group.name.c_str(), "MainNodes", group.main_nodes.c_str()); ini_.SetValue(group.name.c_str(), "MainNodes", group.main_nodes.c_str());
ini_.SetValue(group.name.c_str(), "RelativeNodes", ini_.SetValue(group.name.c_str(), "RelativeNodes", group.relative_nodes.c_str());
group.relative_nodes.c_str());
ini_.SetValue(group.name.c_str(), "ItemKey", group.item_key.c_str()); ini_.SetValue(group.name.c_str(), "ItemKey", group.item_key.c_str());
ini_.SetValue(group.name.c_str(), "Properties", group.propertis.c_str()); ini_.SetValue(group.name.c_str(), "Properties", group.propertis.c_str());
ini_.SetLongValue(group.name.c_str(), "MaxColLen", group.max_col_len); ini_.SetLongValue(group.name.c_str(), "MaxColLen", group.max_col_len);
@ -97,12 +96,7 @@ bool CGroupIni::get_item(OneGroupIni& group)
bool CGroupIni::del_item(const std::string& key) bool CGroupIni::del_item(const std::string& key)
{ {
ini_.Delete(key.c_str(), "MainNodes", true); ini_.Delete(key.c_str(), nullptr);
ini_.Delete(key.c_str(), "RelativeNodes", true);
ini_.Delete(key.c_str(), "ItemKey", true);
ini_.Delete(key.c_str(), "Properties", true);
ini_.Delete(key.c_str(), "MaxColLen", true);
ini_.Delete(key.c_str(), "MaxBlankAdd", true);
if (ini_.SaveFile(work_file_.c_str()) != SI_OK) { if (ini_.SaveFile(work_file_.c_str()) != SI_OK) {
return false; return false;
} }

View File

@ -3,8 +3,7 @@
#include "src/ui_uhistory.h" #include "src/ui_uhistory.h"
#include "ui_uhistory.h" #include "ui_uhistory.h"
CUIHistory::CUIHistory(QWidget* parent, CHistory* his) CUIHistory::CUIHistory(QWidget* parent, CHistory* his) : QDialog(parent), ui(new Ui::CUIHistory)
: QDialog(parent), ui(new Ui::CUIHistory)
{ {
ui->setupUi(this); ui->setupUi(this);
his_ = his; his_ = his;
@ -12,6 +11,7 @@ CUIHistory::CUIHistory(QWidget* parent, CHistory* his)
connect(ui->btnExit, &QPushButton::clicked, this, [&]() { close(); }); connect(ui->btnExit, &QPushButton::clicked, this, [&]() { close(); });
connect(ui->btnOk, &QPushButton::clicked, this, [&]() { select_ok(); }); connect(ui->btnOk, &QPushButton::clicked, this, [&]() { select_ok(); });
connect(ui->btnDel, &QPushButton::clicked, this, [&]() { del_item(); }); connect(ui->btnDel, &QPushButton::clicked, this, [&]() { del_item(); });
connect(ui->listWidget, &QListWidget::doubleClicked, this, [&](const QModelIndex& index) { double_click(index); });
} }
CUIHistory::~CUIHistory() CUIHistory::~CUIHistory()
@ -63,3 +63,9 @@ void CUIHistory::del_item()
} }
his_->write_file(vec); his_->write_file(vec);
} }
void CUIHistory::double_click(const QModelIndex& index)
{
cur_ = index.data().toString();
close();
}

View File

@ -21,6 +21,7 @@ private:
void showEvent(QShowEvent* event); void showEvent(QShowEvent* event);
void select_ok(); void select_ok();
void del_item(); void del_item();
void double_click(const QModelIndex& index);
public: public:
QString cur_{}; QString cur_{};

View File

@ -14,23 +14,25 @@ CXmlOpr::~CXmlOpr() = default;
bool CXmlOpr::open(const std::string& xml_path) bool CXmlOpr::open(const std::string& xml_path)
{ {
#ifdef _WIN32 // #ifdef _WIN32
if (doc_.LoadFile(CUtil::utf8_to_gbk(xml_path).c_str()) != // if (doc_.LoadFile(CUtil::utf8_to_gbk(xml_path).c_str()) != tinyxml2::XML_SUCCESS) {
tinyxml2::XML_SUCCESS) { // return false;
return false; // }
} // xml_path_ = CUtil::utf8_to_gbk(xml_path);
xml_path_ = CUtil::utf8_to_gbk(xml_path); // #else
#else // if (doc_.LoadFile(xml_path.c_str()) != tinyxml2::XML_SUCCESS) {
// return false;
// }
// xml_path_ = xml_path;
// #endif
if (doc_.LoadFile(xml_path.c_str()) != tinyxml2::XML_SUCCESS) { if (doc_.LoadFile(xml_path.c_str()) != tinyxml2::XML_SUCCESS) {
return false; return false;
} }
xml_path_ = xml_path; xml_path_ = xml_path;
#endif
return true; return true;
} }
bool CXmlOpr::backup_file(const std::string& desti_folder, bool CXmlOpr::backup_file(const std::string& desti_folder, const std::string& time)
const std::string& time)
{ {
if (!fs::exists(xml_path_)) { if (!fs::exists(xml_path_)) {
return false; return false;
@ -39,8 +41,7 @@ bool CXmlOpr::backup_file(const std::string& desti_folder,
fs::create_directories(desti_folder); fs::create_directories(desti_folder);
} }
fs::path file_path = fs::path(xml_path_); fs::path file_path = fs::path(xml_path_);
fs::path des = fs::path(desti_folder) fs::path des = fs::path(desti_folder).append(file_path.stem().string() + "_" + time + ".xml");
.append(file_path.stem().string() + "_" + time + ".xml");
return fs::copy_file(xml_path_, des); return fs::copy_file(xml_path_, des);
} }
@ -49,8 +50,7 @@ void CXmlOpr::set_baseinfo(const OneGroupIni& base)
opr_base_ = base; opr_base_ = base;
} }
bool CXmlOpr::get_all_elements(std::vector<Element_t*>& vec, bool CXmlOpr::get_all_elements(std::vector<Element_t*>& vec, const std::string& unit)
const std::string& unit)
{ {
vec.clear(); vec.clear();
@ -68,8 +68,7 @@ bool CXmlOpr::get_all_elements(std::vector<Element_t*>& vec,
} }
} }
auto purpose_node = auto purpose_node = parent_node2_->FirstChildElement(opr_base_.item_key.c_str());
parent_node2_->FirstChildElement(opr_base_.item_key.c_str());
while (purpose_node) { while (purpose_node) {
vec.push_back(purpose_node); vec.push_back(purpose_node);
purpose_node = purpose_node->NextSiblingElement(); purpose_node = purpose_node->NextSiblingElement();
@ -131,13 +130,11 @@ bool CXmlOpr::get_all_unit(std::vector<std::string>& units)
} }
// 排序后(仅指针排序)的节点进行复制(让实际内容有序),删除原始节点 // 排序后(仅指针排序)的节点进行复制(让实际内容有序),删除原始节点
void CXmlOpr::copy_and_del(std::vector<Element_t*>& vec, void CXmlOpr::copy_and_del(std::vector<Element_t*>& vec, std::vector<Element_t*>& out)
std::vector<Element_t*>& out)
{ {
out.clear(); out.clear();
// 先找到最后一个节点 // 先找到最后一个节点
Element_t* last_node = Element_t* last_node = parent_node2_->LastChildElement(opr_base_.item_key.c_str());
parent_node2_->LastChildElement(opr_base_.item_key.c_str());
Element_t* last_node_bk = last_node; Element_t* last_node_bk = last_node;
if (last_node == nullptr) { if (last_node == nullptr) {
return; return;
@ -149,8 +146,7 @@ void CXmlOpr::copy_and_del(std::vector<Element_t*>& vec,
last_node = n; last_node = n;
} }
// 删除原有的节点 // 删除原有的节点
Element_t* fnode = Element_t* fnode = parent_node2_->FirstChildElement(opr_base_.item_key.c_str());
parent_node2_->FirstChildElement(opr_base_.item_key.c_str());
Element_t* fnext = fnode->NextSiblingElement(); Element_t* fnext = fnode->NextSiblingElement();
while (fnode != last_node_bk) { while (fnode != last_node_bk) {
parent_node2_->DeleteChild(fnode); parent_node2_->DeleteChild(fnode);
@ -194,8 +190,7 @@ bool CXmlOpr::check_valid_xml_data(const std::string& data)
bool CXmlOpr::check_same_struct(const std::string& data) bool CXmlOpr::check_same_struct(const std::string& data)
{ {
auto* own_ele = auto* own_ele = parent_node2_->FirstChildElement(opr_base_.item_key.c_str());
parent_node2_->FirstChildElement(opr_base_.item_key.c_str());
if (own_ele == nullptr) { if (own_ele == nullptr) {
return true; return true;
} }
@ -234,12 +229,10 @@ bool CXmlOpr::check_same_struct(const std::string& data)
// Warning: 不检查 xml 格式合法性,请自行调用 check_valid_xml_data // Warning: 不检查 xml 格式合法性,请自行调用 check_valid_xml_data
// 且导入前每条数据请自行使用 check_same_struct 检测。 // 且导入前每条数据请自行使用 check_same_struct 检测。
bool CXmlOpr::import_newer_data(const std::vector<std::string>& vec, bool CXmlOpr::import_newer_data(const std::vector<std::string>& vec, std::size_t& success_count)
std::size_t& success_count)
{ {
success_count = 0; success_count = 0;
auto* last_item = auto* last_item = parent_node2_->LastChildElement(opr_base_.item_key.c_str());
parent_node2_->LastChildElement(opr_base_.item_key.c_str());
if (last_item == nullptr) { if (last_item == nullptr) {
return false; return false;
} }
@ -262,8 +255,7 @@ bool CXmlOpr::import_newer_data(const std::vector<std::string>& vec,
} }
return true; return true;
} }
std::string CXmlOpr::handle_space(const std::string& content, std::string CXmlOpr::handle_space(const std::string& content, const std::vector<std::string>& keychars)
const std::vector<std::string>& keychars)
{ {
std::string result; std::string result;
size_t pos = 0; size_t pos = 0;
@ -276,10 +268,9 @@ std::string CXmlOpr::handle_space(const std::string& content,
} }
std::string op(keychars[i]); std::string op(keychars[i]);
for (const char& c : op) { for (const char& c : op) {
if (c == '|' || c == '\\' || c == '(' || c == ')' || c == '[' || if (c == '|' || c == '\\' || c == '(' || c == ')' || c == '[' || c == ']' || c == '{' ||
c == ']' || c == '{' || c == '}' || c == '^' || c == '$' || c == '}' || c == '^' || c == '$' || c == '.' || c == '*' || c == '+' || c == '?' ||
c == '.' || c == '*' || c == '+' || c == '?' || c == '|' || c == '|' || c == '\\') {
c == '\\') {
oss << '\\'; // 添加转义字符 oss << '\\'; // 添加转义字符
} }
oss << c; oss << c;
@ -308,10 +299,8 @@ std::string CXmlOpr::handle_space(const std::string& content,
} }
// Extract the quoted content // Extract the quoted content
std::string quoted_content = std::string quoted_content = content.substr(start_quote + 1, end_quote - start_quote - 1);
content.substr(start_quote + 1, end_quote - start_quote - 1); std::string processed_content = std::regex_replace(quoted_content, operators_regex, " $& ");
std::string processed_content =
std::regex_replace(quoted_content, operators_regex, " $& ");
// Process quoted content to replace multiple spaces with a single space // Process quoted content to replace multiple spaces with a single space
std::istringstream iss(processed_content); std::istringstream iss(processed_content);
@ -335,8 +324,7 @@ std::string CXmlOpr::handle_space(const std::string& content,
return result; return result;
} }
bool CXmlOpr::handle_transfer(const std::string& path, bool CXmlOpr::handle_transfer(const std::string& path, const std::vector<std::string>& keychars)
const std::vector<std::string>& keychars)
{ {
std::ifstream file(path); std::ifstream file(path);
if (!file.is_open()) { if (!file.is_open()) {
@ -414,8 +402,7 @@ bool CXmlOpr::check_key_exists(const std::string& key)
if (keys_.size() < 1 || key.empty()) { if (keys_.size() < 1 || key.empty()) {
return false; return false;
} }
Element_t* purpose_node = Element_t* purpose_node = parent_node2_->FirstChildElement(opr_base_.item_key.c_str());
parent_node2_->FirstChildElement(opr_base_.item_key.c_str());
while (purpose_node) { while (purpose_node) {
const char* value = purpose_node->Attribute(keys_[0].c_str()); const char* value = purpose_node->Attribute(keys_[0].c_str());
if (key == std::string(value)) { if (key == std::string(value)) {
@ -435,8 +422,17 @@ bool CXmlOpr::save()
return true; return true;
} }
bool CXmlOpr::handle_save(const std::string& path, void CXmlOpr::clear_data()
const std::vector<std::string>& keychars) {
xml_path_.clear();
parent_node_ = nullptr;
parent_node2_ = nullptr;
keys_.clear();
units_.clear();
doc_.Clear();
}
bool CXmlOpr::handle_save(const std::string& path, const std::vector<std::string>& keychars)
{ {
if (!open(path)) { if (!open(path)) {
return false; return false;

View File

@ -28,15 +28,14 @@ public:
void set_baseinfo(const OneGroupIni& base); void set_baseinfo(const OneGroupIni& base);
bool parse_xml(std::vector<Element_t*>& vec); bool parse_xml(std::vector<Element_t*>& vec);
bool get_all_unit(std::vector<std::string>& units); bool get_all_unit(std::vector<std::string>& units);
bool get_all_elements(std::vector<Element_t*>& vec, bool get_all_elements(std::vector<Element_t*>& vec, const std::string& unit = "");
const std::string& unit = ""); void copy_and_del(std::vector<Element_t*>& vec, std::vector<Element_t*>& out);
void copy_and_del(std::vector<Element_t*>& vec,
std::vector<Element_t*>& out);
void insert_brother_node(Element_t* brother, Element_t* newer); void insert_brother_node(Element_t* brother, Element_t* newer);
void del_element(Element_t* ele); void del_element(Element_t* ele);
bool check_key_exists(const Property_t& property); bool check_key_exists(const Property_t& property);
bool check_key_exists(const std::string& key); bool check_key_exists(const std::string& key);
bool save(); bool save();
void clear_data();
bool handle_save(const std::string& path, const std::vector<std::string>& keychars); bool handle_save(const std::string& path, const std::vector<std::string>& keychars);
std::string handle_space(const std::string& content, const std::vector<std::string>& keychars); std::string handle_space(const std::string& content, const std::vector<std::string>& keychars);
@ -47,8 +46,7 @@ public:
// 不检查 xml 格式合法性,请自行调用 check_valid_xml_data // 不检查 xml 格式合法性,请自行调用 check_valid_xml_data
bool check_same_struct(const std::string& data); bool check_same_struct(const std::string& data);
// 不检查 xml 格式合法性,请自行调用 check_valid_xml_data // 不检查 xml 格式合法性,请自行调用 check_valid_xml_data
bool import_newer_data(const std::vector<std::string>& vec, bool import_newer_data(const std::vector<std::string>& vec, std::size_t& success_count);
std::size_t& success_count);
// 处理转义 // 处理转义
bool handle_transfer(const std::string& path, const std::vector<std::string>& keychars); bool handle_transfer(const std::string& path, const std::vector<std::string>& keychars);