modify model propety

This commit is contained in:
jiegeaiai 2025-01-06 00:41:08 +08:00
parent 99cfba6437
commit f821d99b45
8 changed files with 564 additions and 131 deletions

View File

@ -853,12 +853,12 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser.cpp" line="205"/>
<location filename="../ui/PropertyBrowser.cpp" line="206"/>
<source>ModelBase</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser.cpp" line="210"/>
<location filename="../ui/PropertyBrowser.cpp" line="211"/>
<source>color base</source>
<translation type="unfinished"></translation>
</message>
@ -866,12 +866,25 @@
<context>
<name>QFilePathEdit</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="738"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="739"/>
<source>Open File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="738"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="739"/>
<source>All Files (*)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QModelFilePathEdit</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="815"/>
<source>Open File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="815"/>
<source>All Files (*)</source>
<translation type="unfinished"></translation>
</message>
@ -917,15 +930,15 @@
<context>
<name>QtBoolEdit</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="271"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="281"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="306"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="272"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="282"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="307"/>
<source>True</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="281"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="306"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="282"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="307"/>
<source>False</source>
<translation type="unfinished"></translation>
</message>
@ -933,12 +946,12 @@
<context>
<name>QtBoolPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="1835"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="2005"/>
<source>True</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="1836"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="2006"/>
<source>False</source>
<translation type="unfinished"></translation>
</message>
@ -946,7 +959,7 @@
<context>
<name>QtCharEdit</name>
<message>
<location filename="../ui/PropertyBrowser/qteditorfactory.cpp" line="1718"/>
<location filename="../ui/PropertyBrowser/qteditorfactory.cpp" line="1827"/>
<source>Clear Char</source>
<translation type="unfinished"></translation>
</message>
@ -954,7 +967,7 @@
<context>
<name>QtColorEditWidget</name>
<message>
<location filename="../ui/PropertyBrowser/qteditorfactory.cpp" line="2332"/>
<location filename="../ui/PropertyBrowser/qteditorfactory.cpp" line="2441"/>
<source>...</source>
<translation type="unfinished">...</translation>
</message>
@ -962,22 +975,22 @@
<context>
<name>QtColorPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6832"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7002"/>
<source>Red</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6840"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7010"/>
<source>Green</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6848"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7018"/>
<source>Blue</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6856"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7026"/>
<source>Alpha</source>
<translation type="unfinished"></translation>
</message>
@ -985,43 +998,43 @@
<context>
<name>QtConeWaveComponentManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8562"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8571"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8732"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8741"/>
<source>ConeWaveComponent</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8658"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8828"/>
<source>Height</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8665"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8835"/>
<source>Radius</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8672"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8842"/>
<source>levelCount</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8679"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8849"/>
<source>levelHeight</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8686"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8856"/>
<source>Color1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8693"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8863"/>
<source>Color2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8700"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8870"/>
<source>Color3</source>
<translation type="unfinished"></translation>
</message>
@ -1029,97 +1042,97 @@
<context>
<name>QtCursorDatabase</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="60"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="61"/>
<source>Arrow</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="62"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="63"/>
<source>Up Arrow</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="64"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="65"/>
<source>Cross</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="66"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="67"/>
<source>Wait</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="68"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="69"/>
<source>IBeam</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="70"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="71"/>
<source>Size Vertical</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="72"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="73"/>
<source>Size Horizontal</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="74"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="75"/>
<source>Size Backslash</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="76"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="77"/>
<source>Size Slash</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="78"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="79"/>
<source>Size All</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="80"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="81"/>
<source>Blank</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="82"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="83"/>
<source>Split Vertical</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="84"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="85"/>
<source>Split Horizontal</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="86"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="87"/>
<source>Pointing Hand</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="88"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="89"/>
<source>Forbidden</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="90"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="91"/>
<source>Open Hand</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="92"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="93"/>
<source>Closed Hand</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="94"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="95"/>
<source>What&apos;s This</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="96"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="97"/>
<source>Busy</source>
<translation type="unfinished"></translation>
</message>
@ -1127,28 +1140,28 @@
<context>
<name>QtDashedLineComponentManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8885"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8894"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9055"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9064"/>
<source>DashedLineComponent</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8963"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9133"/>
<source>Start</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8970"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9140"/>
<source>End</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8977"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9147"/>
<source>Radius</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8984"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9154"/>
<source>Color</source>
<translation type="unfinished"></translation>
</message>
@ -1156,7 +1169,7 @@
<context>
<name>QtEntityEditWidget</name>
<message>
<location filename="../ui/PropertyBrowser/qteditorfactory.cpp" line="2943"/>
<location filename="../ui/PropertyBrowser/qteditorfactory.cpp" line="3052"/>
<source>...</source>
<translation type="unfinished">...</translation>
</message>
@ -1164,12 +1177,12 @@
<context>
<name>QtEntityPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8042"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8212"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8049"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8219"/>
<source>Transform</source>
<translation type="unfinished"></translation>
</message>
@ -1177,12 +1190,12 @@
<context>
<name>QtFontEditWidget</name>
<message>
<location filename="../ui/PropertyBrowser/qteditorfactory.cpp" line="2535"/>
<location filename="../ui/PropertyBrowser/qteditorfactory.cpp" line="2644"/>
<source>...</source>
<translation type="unfinished">...</translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qteditorfactory.cpp" line="2555"/>
<location filename="../ui/PropertyBrowser/qteditorfactory.cpp" line="2664"/>
<source>Select Font</source>
<translation type="unfinished"></translation>
</message>
@ -1190,37 +1203,37 @@
<context>
<name>QtFontPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6491"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6661"/>
<source>Family</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6509"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6679"/>
<source>Point Size</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6517"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6687"/>
<source>Bold</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6524"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6694"/>
<source>Italic</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6531"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6701"/>
<source>Underline</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6538"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6708"/>
<source>Strikeout</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6545"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6715"/>
<source>Kerning</source>
<translation type="unfinished"></translation>
</message>
@ -1228,22 +1241,22 @@
<context>
<name>QtLocalePropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="2924"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3094"/>
<source>&lt;Invalid&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="2932"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3102"/>
<source>%1, %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="2982"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3152"/>
<source>Language</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="2990"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3160"/>
<source>Country</source>
<translation type="unfinished"></translation>
</message>
@ -1251,13 +1264,13 @@
<context>
<name>QtMeshComponetManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8156"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8165"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8326"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8335"/>
<source>MeshComponent</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8238"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8408"/>
<source>Mesh</source>
<translation type="unfinished"></translation>
</message>
@ -1265,22 +1278,22 @@
<context>
<name>QtModelBasePropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7622"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7792"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7629"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7799"/>
<source>Description</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7636"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7806"/>
<source>Inflow</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7643"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7813"/>
<source>InnerBottomElevation</source>
<translation type="unfinished"></translation>
</message>
@ -1301,13 +1314,13 @@
<context>
<name>QtPathComponentManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8315"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8324"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8485"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8494"/>
<source>PathComponent</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8397"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8567"/>
<source>Path</source>
<translation type="unfinished"></translation>
</message>
@ -1315,17 +1328,17 @@
<context>
<name>QtPointFPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3410"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3580"/>
<source>(%1, %2)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3481"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3651"/>
<source>X</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3489"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3659"/>
<source>Y</source>
<translation type="unfinished"></translation>
</message>
@ -1333,17 +1346,17 @@
<context>
<name>QtPointPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3165"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3335"/>
<source>(%1, %2)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3202"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3372"/>
<source>X</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3209"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3379"/>
<source>Y</source>
<translation type="unfinished"></translation>
</message>
@ -1351,22 +1364,22 @@
<context>
<name>QtPropertyBrowserUtils</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="189"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="190"/>
<source>[%1, %2, %3] (%4)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="216"/>
<location filename="../ui/PropertyBrowser/qtpropertybrowserutils.cpp" line="217"/>
<source>[%1, %2]</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7181"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7351"/>
<source>[%1, %2, %3]</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7398"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7568"/>
<source>[%1, %2, %3] [%4, %5, %6] [%7, %8, %9]</source>
<translation type="unfinished"></translation>
</message>
@ -1374,27 +1387,27 @@
<context>
<name>QtRectFPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4943"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5113"/>
<source>[(%1, %2), %3 x %4]</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5099"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5269"/>
<source>X</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5107"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5277"/>
<source>Y</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5115"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5285"/>
<source>Width</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5124"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5294"/>
<source>Height</source>
<translation type="unfinished"></translation>
</message>
@ -1402,27 +1415,27 @@
<context>
<name>QtRectPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4504"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4674"/>
<source>[(%1, %2), %3 x %4]</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4624"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4794"/>
<source>X</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4631"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4801"/>
<source>Y</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4638"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4808"/>
<source>Width</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4646"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4816"/>
<source>Height</source>
<translation type="unfinished"></translation>
</message>
@ -1430,17 +1443,17 @@
<context>
<name>QtSizeFPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4103"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4273"/>
<source>%1 x %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4233"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4403"/>
<source>Width</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4242"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4412"/>
<source>Height</source>
<translation type="unfinished"></translation>
</message>
@ -1448,33 +1461,33 @@
<context>
<name>QtSizePolicyPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5982"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5983"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6152"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6153"/>
<source>&lt;Invalid&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5984"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6154"/>
<source>[%1, %2, %3, %4]</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6029"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6199"/>
<source>Horizontal Policy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6038"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6208"/>
<source>Vertical Policy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6047"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6217"/>
<source>Horizontal Stretch</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6055"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6225"/>
<source>Vertical Stretch</source>
<translation type="unfinished"></translation>
</message>
@ -1482,17 +1495,17 @@
<context>
<name>QtSizePropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3734"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3904"/>
<source>%1 x %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3830"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4000"/>
<source>Width</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3838"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4008"/>
<source>Height</source>
<translation type="unfinished"></translation>
</message>
@ -1500,7 +1513,7 @@
<context>
<name>QtTransfromEditWidget</name>
<message>
<location filename="../ui/PropertyBrowser/qteditorfactory.cpp" line="2753"/>
<location filename="../ui/PropertyBrowser/qteditorfactory.cpp" line="2862"/>
<source>...</source>
<translation type="unfinished">...</translation>
</message>
@ -1508,17 +1521,17 @@
<context>
<name>QtTransfromPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7409"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7579"/>
<source>Location</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7416"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7586"/>
<source>Rotation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7423"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7593"/>
<source>Scale</source>
<translation type="unfinished"></translation>
</message>
@ -1539,17 +1552,17 @@
<context>
<name>QtVec3PropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7190"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7360"/>
<source>X</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7197"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7367"/>
<source>Y</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7204"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7374"/>
<source>Z</source>
<translation type="unfinished"></translation>
</message>
@ -1557,17 +1570,17 @@
<context>
<name>QtWorkspacePropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7842"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8012"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7849"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8019"/>
<source>Description</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7856"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8026"/>
<source>Timestep</source>
<translation type="unfinished"></translation>
</message>

View File

@ -161,10 +161,11 @@ void PropertyBrowser::InitComponentPropertyManager() {
QtLineEditFactory* lineEditFactory = new QtLineEditFactory(this);
QtColorEditorFactory* colorFactory = new QtColorEditorFactory(this);
QtFilePathFactory* filePathFactory = new QtFilePathFactory(this);
QtModelFilePathFactory* modelFileFactory = new QtModelFilePathFactory(this);
QtEntityUUIDEditorFactory* entityUUIDFactory = new QtEntityUUIDEditorFactory(this);
QtMeshComponetManager* meshComponentManager = new QtMeshComponetManager(this);
browser_->setFactoryForManager(meshComponentManager->subStringProperyManager(), lineEditFactory);
browser_->setFactoryForManager(meshComponentManager->subModelFileProperyManager(), modelFileFactory);
componetManager_[meshComponentManager->GetPropertyId()] = meshComponentManager;
QtPathComponentManager* pathComponentManager = new QtPathComponentManager(this);

View File

@ -1171,6 +1171,115 @@ void QtFilePathFactory::disconnectPropertyManager(QtFilesPropertyManager* manage
#pragma endregion
// QtModelFilePathFactory
#pragma region QtModelFilePathFactory
class QtModelFilePathFactoryPrivate : public EditorFactoryPrivate<QModelFilePathEdit> {
QtModelFilePathFactory* q_ptr;
Q_DECLARE_PUBLIC(QtModelFilePathFactory)
public:
void slotPropertyChanged(QtProperty* property, const QString& value);
void slotSetValue(const QString& value);
};
void QtModelFilePathFactoryPrivate::slotPropertyChanged(QtProperty* property,
const QString& value) {
const auto it = m_createdEditors.constFind(property);
if (it == m_createdEditors.constEnd())
return;
for (QModelFilePathEdit* editor : it.value()) {
if (editor->filePath() != value)
editor->setFilePath(value);
}
}
void QtModelFilePathFactoryPrivate::slotSetValue(const QString& value) {
QObject* object = q_ptr->sender();
const QMap<QModelFilePathEdit*, QtProperty*>::ConstIterator ecend = m_editorToProperty.constEnd();
for (QMap<QModelFilePathEdit*, QtProperty*>::ConstIterator itEditor = m_editorToProperty.constBegin(); itEditor != ecend; ++itEditor)
if (itEditor.key() == object) {
QtProperty* property = itEditor.value();
QtModelFilesPropertyManager* manager = q_ptr->propertyManager(property);
if (!manager)
return;
manager->setValue(property, value);
return;
}
}
/*!
\class QtLineEditFactory
\internal
\inmodule QtDesigner
\since 4.4
\brief The QtLineEditFactory class provides QLineEdit widgets for
properties created by QtStringPropertyManager objects.
\sa QtAbstractEditorFactory, QtStringPropertyManager
*/
/*!
Creates a factory with the given \a parent.
*/
QtModelFilePathFactory::QtModelFilePathFactory(QObject* parent)
: QtAbstractEditorFactory<QtModelFilesPropertyManager>(parent), d_ptr(new QtModelFilePathFactoryPrivate()) {
d_ptr->q_ptr = this;
}
/*!
Destroys this factory, and all the widgets it has created.
*/
QtModelFilePathFactory::~QtModelFilePathFactory() {
qDeleteAll(d_ptr->m_editorToProperty.keys());
}
/*!
\internal
Reimplemented from the QtAbstractEditorFactory class.
*/
void QtModelFilePathFactory::connectPropertyManager(QtModelFilesPropertyManager* manager) {
connect(manager, SIGNAL(valueChanged(QtProperty*, QString)),
this, SLOT(slotPropertyChanged(QtProperty*, QString)));
}
/*!
\internal
Reimplemented from the QtAbstractEditorFactory class.
*/
QWidget* QtModelFilePathFactory::createEditor(QtModelFilesPropertyManager* manager,
QtProperty* property, QWidget* parent) {
QModelFilePathEdit* editor = d_ptr->createEditor(property, parent);
editor->setFilePath(manager->value(property));
editor->setInitialText(manager->initialValue(property));
connect(editor, SIGNAL(textEdited(QString)),
this, SLOT(slotSetValue(QString)));
connect(editor, SIGNAL(textChanged(QString)),
this, SLOT(slotSetValue(QString)));
connect(editor, SIGNAL(destroyed(QObject*)),
this, SLOT(slotEditorDestroyed(QObject*)));
return editor;
}
/*!
\internal
Reimplemented from the QtAbstractEditorFactory class.
*/
void QtModelFilePathFactory::disconnectPropertyManager(QtModelFilesPropertyManager* manager) {
disconnect(manager, SIGNAL(valueChanged(QtProperty*, QString)),
this, SLOT(slotPropertyChanged(QtProperty*, QString)));
}
#pragma endregion
// QtDateEditFactory
#pragma region QtDateEditFactory

View File

@ -210,6 +210,28 @@ private:
Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
};
class QtModelFilePathFactoryPrivate;
class QtModelFilePathFactory : public QtAbstractEditorFactory<QtModelFilesPropertyManager>
{
Q_OBJECT
public:
QtModelFilePathFactory(QObject *parent = 0);
~QtModelFilePathFactory();
protected:
void connectPropertyManager(QtModelFilesPropertyManager*manager) override;
QWidget *createEditor(QtModelFilesPropertyManager*manager, QtProperty *property,
QWidget *parent) override;
void disconnectPropertyManager(QtModelFilesPropertyManager*manager) override;
private:
QScopedPointer<QtModelFilePathFactoryPrivate> d_ptr;
Q_DECLARE_PRIVATE(QtModelFilePathFactory)
Q_DISABLE_COPY_MOVE(QtModelFilePathFactory)
Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QString &))
Q_PRIVATE_SLOT(d_func(), void slotSetValue(const QString &))
Q_PRIVATE_SLOT(d_func(), void slotEditorDestroyed(QObject *))
};
class QtDateEditFactoryPrivate;
class QtDateEditFactory : public QtAbstractEditorFactory<QtDatePropertyManager>

View File

@ -52,6 +52,7 @@
#include "workspace/WorkSpace.h"
#include "workspace/WorkSpaceManager.h"
#include "utils/FileUtils.h"
#include "common/RecourceHelper.h"
QT_BEGIN_NAMESPACE
@ -763,4 +764,63 @@ void QFilePathEdit::onFileSelect() {
#pragma endregion
#pragma region QModelFilePathEdit
QModelFilePathEdit::QModelFilePathEdit(QWidget* parent) :
QWidget(parent),
m_stringEdit(new QLineEdit(this)),
m_button(new QPushButton(this)) {
m_button->setIcon(QIcon(QLatin1String(":/qt-project.org/qtpropertybrowser/images/button-reset.ico")));
m_button->setMaximumWidth(15);
m_stringEdit->setReadOnly(true);
QHBoxLayout* lt = new QHBoxLayout;
lt->setContentsMargins(0, 0, 0, 0);
lt->setSpacing(1);
lt->addWidget(m_stringEdit);
lt->addWidget(m_button);
lt->setStretch(0, 1);
lt->setStretch(1, 0);
setLayout(lt);
connect(m_stringEdit, &QLineEdit::textChanged, this, &QModelFilePathEdit::textChanged);
connect(m_stringEdit, &QLineEdit::textEdited, this, &QModelFilePathEdit::textEdited);
connect(m_stringEdit, &QLineEdit::textChanged, this, [&] { m_button->setEnabled(m_initialvalue != m_stringEdit->text()); });
connect(m_stringEdit, &QLineEdit::textEdited, this, [&] { m_button->setEnabled(m_initialvalue != m_stringEdit->text()); });
connect(m_button, &QPushButton::clicked, this, &QModelFilePathEdit::onFileSelect);
setFocusProxy(m_stringEdit);
}
QString QModelFilePathEdit::filePath() {
return m_stringEdit->text();
}
QString QModelFilePathEdit::fileName() {
return m_fileName;
}
void QModelFilePathEdit::setFilePath(const QString& val) {
m_stringEdit->setText(val);
}
void QModelFilePathEdit::setInitialText(const QString& val) {
m_initialvalue = val;
}
void QModelFilePathEdit::onFileSelect() {
const QString path = QString("%1/resources/model").arg(RecourceHelper::Get().GetBasePath());
QString filePath = QFileDialog::getOpenFileName(this, tr("Open File"), path, tr("All Files (*)"));
if (!filePath.isEmpty()) {
m_fileName = filePath.right(filePath.length() - path.length() - 1);
m_initialvalue = m_fileName;
m_stringEdit->setText(m_fileName);
}
}
#pragma endregion
QT_END_NAMESPACE

View File

@ -286,7 +286,7 @@ private:
#pragma endregion
#pragma region QFileSelectEdit
#pragma region QFilePathEdit
class QFilePathEdit : public QWidget {
Q_OBJECT
@ -314,6 +314,34 @@ private:
#pragma endregion
#pragma region QModelFilePathEdit
class QModelFilePathEdit : public QWidget {
Q_OBJECT
public:
QModelFilePathEdit(QWidget* parent = Q_NULLPTR);
QString filePath();
QString fileName();
void setFilePath(const QString&);
void setInitialText(const QString&);
Q_SIGNALS:
void textChanged(QString);
void textEdited(QString);
protected:
void onFileSelect();
private:
QLineEdit* m_stringEdit;
QPushButton* m_button;
QString m_initialvalue;
QString m_fileName;
};
#pragma endregion
QT_END_NAMESPACE

View File

@ -1703,6 +1703,176 @@ void QtFilesPropertyManager::uninitializeProperty(QtProperty* property) {
#pragma endregion
// QtModelFilesPropertyManager
#pragma region QtModelFilesPropertyManager
class QtModelFilesPropertyManagerPrivate {
QtModelFilesPropertyManager* q_ptr;
Q_DECLARE_PUBLIC(QtModelFilesPropertyManager)
public:
struct Data {
QString val;
QString initVal;
bool isInitialed;
};
typedef QMap<const QtProperty*, Data> PropertyValueMap;
QMap<const QtProperty*, Data> m_values;
};
/*!
\class QtStringPropertyManager
\internal
\inmodule QtDesigner
\since 4.4
\brief The QtStringPropertyManager provides and manages QString properties.
A string property's value can be retrieved using the value()
function, and set using the setValue() slot.
The current value can be checked against a regular expression. To
set the regular expression use the setRegExp() slot, use the
regExp() function to retrieve the currently set expression.
In addition, QtStringPropertyManager provides the valueChanged() signal
which is emitted whenever a property created by this manager
changes, and the regExpChanged() signal which is emitted whenever
such a property changes its currently set regular expression.
\sa QtAbstractPropertyManager, QtLineEditFactory
*/
/*!
\fn void QtStringPropertyManager::valueChanged(QtProperty *property, const QString &value)
This signal is emitted whenever a property created by this manager
changes its value, passing a pointer to the \a property and the
new \a value as parameters.
\sa setValue()
*/
/*!
\fn void QtStringPropertyManager::regExpChanged(QtProperty *property, const QRegularExpression &regExp)
This signal is emitted whenever a property created by this manager
changes its currenlty set regular expression, passing a pointer to
the \a property and the new \a regExp as parameters.
\sa setRegExp()
*/
/*!
Creates a manager with the given \a parent.
*/
QtModelFilesPropertyManager::QtModelFilesPropertyManager(QObject* parent)
: QtAbstractPropertyManager(parent), d_ptr(new QtModelFilesPropertyManagerPrivate) {
d_ptr->q_ptr = this;
}
/*!
Destroys this manager, and all the properties it has created.
*/
QtModelFilesPropertyManager::~QtModelFilesPropertyManager() {
clear();
}
/*!
Returns the given \a property's value.
If the given property is not managed by this manager, this
function returns an empty string.
\sa setValue()
*/
QString QtModelFilesPropertyManager::value(const QtProperty* property) const {
return getValue<QString>(d_ptr->m_values, property);
}
QString QtModelFilesPropertyManager::initialValue(const QtProperty* property) const {
return getData<QString>(d_ptr->m_values, &QtModelFilesPropertyManagerPrivate::Data::initVal, property, QString());
}
/*!
\reimp
*/
QString QtModelFilesPropertyManager::valueText(const QtProperty* property) const {
const QtModelFilesPropertyManagerPrivate::PropertyValueMap::const_iterator it = d_ptr->m_values.constFind(property);
if (it == d_ptr->m_values.constEnd())
return QString();
return it.value().val;
}
/*!
\fn void QtStringPropertyManager::setValue(QtProperty *property, const QString &value)
Sets the value of the given \a property to \a value.
If the specified \a value doesn't match the given \a property's
regular expression, this function does nothing.
\sa value(), setRegExp(), valueChanged()
*/
void QtModelFilesPropertyManager::setValue(QtProperty* property, const QString& val) {
const QtModelFilesPropertyManagerPrivate::PropertyValueMap::iterator it = d_ptr->m_values.find(property);
if (it == d_ptr->m_values.end())
return;
QtModelFilesPropertyManagerPrivate::Data data = it.value();
if (data.val == val)
return;
if (!data.isInitialed) {
data.initVal = val;
data.isInitialed = true;
}
data.val = val;
it.value() = data;
emit propertyChanged(property);
emit valueChanged(property, data.val);
}
void QtModelFilesPropertyManager::setValueOnly(QtProperty* property, const QString& val) {
const QtModelFilesPropertyManagerPrivate::PropertyValueMap::iterator it = d_ptr->m_values.find(property);
if (it == d_ptr->m_values.end())
return;
QtModelFilesPropertyManagerPrivate::Data data = it.value();
if (data.val == val)
return;
data.val = val;
data.initVal = val;
it.value() = data;
emit propertyChanged(property);
emit valueChanged(property, data.val);
}
/*!
\reimp
*/
void QtModelFilesPropertyManager::initializeProperty(QtProperty* property) {
d_ptr->m_values[property] = QtModelFilesPropertyManagerPrivate::Data();
}
/*!
\reimp
*/
void QtModelFilesPropertyManager::uninitializeProperty(QtProperty* property) {
d_ptr->m_values.remove(property);
}
#pragma endregion
// QtBoolPropertyManager
#pragma region QtBoolPropertyManager
@ -8112,7 +8282,7 @@ public:
PropertyValueMap m_values;
QtStringPropertyManager* m_stringProperyManager;
QtModelFilesPropertyManager* m_modelFileProperyManager;
QMap<const QtProperty*, QtProperty*> m_properyToMesh;
@ -8140,8 +8310,8 @@ QtMeshComponetManager::QtMeshComponetManager(QObject* parent)
: QtComponentPropertyManager(parent), d_ptr(new QtMeshComponetManagerPrivate) {
d_ptr->q_ptr = this;
d_ptr->m_stringProperyManager = new QtStringPropertyManager(this);
connect(d_ptr->m_stringProperyManager, SIGNAL(valueChanged(QtProperty*, QString)),
d_ptr->m_modelFileProperyManager = new QtModelFilesPropertyManager(this);
connect(d_ptr->m_modelFileProperyManager, SIGNAL(valueChanged(QtProperty*, QString)),
this, SLOT(slotStringChanged(QtProperty*, QString)));
}
@ -8177,8 +8347,8 @@ QMeshComponentAttribute QtMeshComponetManager::value(const QtProperty* property)
return d_ptr->m_values.value(property, QMeshComponentAttribute());
}
QtStringPropertyManager* QtMeshComponetManager::subStringProperyManager() const {
return d_ptr->m_stringProperyManager;
QtModelFilesPropertyManager* QtMeshComponetManager::subModelFileProperyManager() const {
return d_ptr->m_modelFileProperyManager;
}
/*!
@ -8221,7 +8391,7 @@ void QtMeshComponetManager::setValue(QtProperty* property, const QMeshComponentA
it.value() = value;
d_ptr->m_stringProperyManager->setValue(d_ptr->m_properyToMesh[property], value.GetMesh());
d_ptr->m_modelFileProperyManager->setValue(d_ptr->m_properyToMesh[property], value.GetMesh());
emit propertyChanged(property);
emit valueChanged(property, value);
@ -8234,9 +8404,9 @@ void QtMeshComponetManager::initializeProperty(QtProperty* property) {
QMeshComponentAttribute val;
d_ptr->m_values[property] = val;
QtProperty* prop = d_ptr->m_stringProperyManager->addProperty();
QtProperty* prop = d_ptr->m_modelFileProperyManager->addProperty();
prop->setPropertyName(tr("Mesh"));
d_ptr->m_stringProperyManager->setValueOnly(prop, val.GetMesh());
d_ptr->m_modelFileProperyManager->setValueOnly(prop, val.GetMesh());
d_ptr->m_properyToMesh[property] = prop;
d_ptr->m_meshToPropery[prop] = property;
property->addSubProperty(prop);

View File

@ -249,6 +249,36 @@ private:
#pragma endregion
#pragma region QtModelFilesPropertyManager
class QtModelFilesPropertyManagerPrivate;
class QtModelFilesPropertyManager : public QtAbstractPropertyManager {
Q_OBJECT
public:
QtModelFilesPropertyManager(QObject* parent = 0);
~QtModelFilesPropertyManager();
QString value(const QtProperty* property) const;
QString initialValue(const QtProperty* property) const;
public Q_SLOTS:
void setValue(QtProperty* property, const QString& val);
void setValueOnly(QtProperty* property, const QString& val);
Q_SIGNALS:
void valueChanged(QtProperty* property, const QString& val);
protected:
QString valueText(const QtProperty* property) const override;
void initializeProperty(QtProperty* property) override;
void uninitializeProperty(QtProperty* property) override;
private:
QScopedPointer<QtModelFilesPropertyManagerPrivate> d_ptr;
Q_DECLARE_PRIVATE(QtModelFilesPropertyManager)
Q_DISABLE_COPY_MOVE(QtModelFilesPropertyManager)
};
#pragma endregion
#pragma region QtDatePropertyManager
class QtDatePropertyManagerPrivate;
@ -1079,7 +1109,7 @@ public:
QMeshComponentAttribute value(const QtProperty* property) const;
QtStringPropertyManager* subStringProperyManager() const;
QtModelFilesPropertyManager* subModelFileProperyManager() const;
public Q_SLOTS:
void setValue(QtProperty* property, const QMeshComponentAttribute& val);