update conewave

This commit is contained in:
brige 2025-06-26 08:12:25 +08:00
parent 8d957bbbb2
commit 1d7ba7c418
4 changed files with 130 additions and 95 deletions

View File

@ -129,6 +129,8 @@ void ConeWave::SetHeight(float height) {
height_ = height;
if (cone_.valid()) {
cone_->setHeight(height_);
// 更新锥形中心位置以保持顶点在原点
cone_->setCenter(osg::Vec3(0, 0, -height_/2));
// 强制更新ShapeDrawable
if (coneDrawable_.valid()) {
coneDrawable_->dirtyDisplayList();
@ -250,7 +252,8 @@ void ConeWave::SetConeAlpha(float alpha) {
void ConeWave::CreateRadarScanWave() {
// 使用OSG内置的Cone几何体来创建雷达扫描区域
cone_ = new osg::Cone(osg::Vec3(0, 0, 0), radius_, height_);
// 创建锥形锥形顶点在原点开口向下负Z方向
cone_ = new osg::Cone(osg::Vec3(0, 0, -height_/2), radius_, height_);
// 设置细分参数,创建开口锥形
osg::TessellationHints* tesselate = new osg::TessellationHints;

View File

@ -111,6 +111,11 @@ void ConeWaveComponent::AddToRender() {
void ConeWaveComponent::Initialize() {
mt_ = new osg::MatrixTransform;
// 创建旋转矩阵让锥形向下发射绕X轴旋转180度
// osg::Matrix rotationMatrix = osg::Matrix::rotate(osg::PI, osg::Vec3(1, 0, 0));
// mt_->setMatrix(rotationMatrix);
mt_->addChild(coneWave_);
}

View File

@ -892,12 +892,12 @@
<context>
<name>QtBoolPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="2005"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="2016"/>
<source>True</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="2006"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="2017"/>
<source>False</source>
<translation type="unfinished"></translation>
</message>
@ -921,22 +921,22 @@
<context>
<name>QtColorPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7002"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7013"/>
<source>Red</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7010"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7021"/>
<source>Green</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7018"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7029"/>
<source>Blue</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7026"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7037"/>
<source>Alpha</source>
<translation type="unfinished"></translation>
</message>
@ -944,48 +944,48 @@
<context>
<name>QtConeWaveComponentManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8854"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8863"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8878"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8887"/>
<source>ConeWaveComponent</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8951"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8975"/>
<source>Height</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8958"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8982"/>
<source>Radius</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8965"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8989"/>
<source>waveCount</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8972"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8999"/>
<source>waveSpeed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8979"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9006"/>
<source>baseColor</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8986"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9013"/>
<source>waveColor</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8993"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9020"/>
<source>ringBrightAlpha</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9000"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9027"/>
<source>ringDarkAlpha</source>
<translation type="unfinished"></translation>
</message>
@ -1091,28 +1091,28 @@
<context>
<name>QtDashedLineComponentManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9192"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9201"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9219"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9228"/>
<source>DashedLineComponent</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9270"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9297"/>
<source>Start</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9277"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9304"/>
<source>End</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9284"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9311"/>
<source>Radius</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9291"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="9318"/>
<source>Color</source>
<translation type="unfinished"></translation>
</message>
@ -1128,12 +1128,12 @@
<context>
<name>QtEntityPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8328"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8339"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8335"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8346"/>
<source>Transform</source>
<translation type="unfinished"></translation>
</message>
@ -1154,37 +1154,37 @@
<context>
<name>QtFontPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6661"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6672"/>
<source>Family</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6679"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6690"/>
<source>Point Size</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6687"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6698"/>
<source>Bold</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6694"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6705"/>
<source>Italic</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6701"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6712"/>
<source>Underline</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6708"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6719"/>
<source>Strikeout</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6715"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6726"/>
<source>Kerning</source>
<translation type="unfinished"></translation>
</message>
@ -1192,22 +1192,22 @@
<context>
<name>QtLocalePropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3094"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3105"/>
<source>&lt;Invalid&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3102"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3113"/>
<source>%1, %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3152"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3163"/>
<source>Language</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3160"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3171"/>
<source>Country</source>
<translation type="unfinished"></translation>
</message>
@ -1215,13 +1215,13 @@
<context>
<name>QtMeshComponetManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8442"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8451"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8453"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8462"/>
<source>MeshComponent</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8524"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8535"/>
<source>Mesh</source>
<translation type="unfinished"></translation>
</message>
@ -1229,22 +1229,22 @@
<context>
<name>QtModelBasePropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7792"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7803"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7799"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7810"/>
<source>Description</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7806"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7817"/>
<source>Inflow</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7813"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7824"/>
<source>InnerBottomElevation</source>
<translation type="unfinished"></translation>
</message>
@ -1265,13 +1265,13 @@
<context>
<name>QtPathComponentManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8601"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8610"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8612"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8621"/>
<source>PathComponent</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8683"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8694"/>
<source>Path</source>
<translation type="unfinished"></translation>
</message>
@ -1279,17 +1279,17 @@
<context>
<name>QtPointFPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3580"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3591"/>
<source>(%1, %2)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3651"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3662"/>
<source>X</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3659"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3670"/>
<source>Y</source>
<translation type="unfinished"></translation>
</message>
@ -1297,17 +1297,17 @@
<context>
<name>QtPointPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3335"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3346"/>
<source>(%1, %2)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3372"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3383"/>
<source>X</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3379"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3390"/>
<source>Y</source>
<translation type="unfinished"></translation>
</message>
@ -1325,12 +1325,12 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7351"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7362"/>
<source>[%1, %2, %3]</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7568"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7579"/>
<source>[%1, %2, %3] [%4, %5, %6] [%7, %8, %9]</source>
<translation type="unfinished"></translation>
</message>
@ -1338,27 +1338,27 @@
<context>
<name>QtRectFPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5113"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5124"/>
<source>[(%1, %2), %3 x %4]</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5269"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5280"/>
<source>X</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5277"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5288"/>
<source>Y</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5285"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5296"/>
<source>Width</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5294"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="5305"/>
<source>Height</source>
<translation type="unfinished"></translation>
</message>
@ -1366,27 +1366,27 @@
<context>
<name>QtRectPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4674"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4685"/>
<source>[(%1, %2), %3 x %4]</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4794"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4805"/>
<source>X</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4801"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4812"/>
<source>Y</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4808"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4819"/>
<source>Width</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4816"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4827"/>
<source>Height</source>
<translation type="unfinished"></translation>
</message>
@ -1394,17 +1394,17 @@
<context>
<name>QtSizeFPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4273"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4284"/>
<source>%1 x %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4403"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4414"/>
<source>Width</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4412"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4423"/>
<source>Height</source>
<translation type="unfinished"></translation>
</message>
@ -1412,33 +1412,33 @@
<context>
<name>QtSizePolicyPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6152"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6153"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6163"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6164"/>
<source>&lt;Invalid&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6154"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6165"/>
<source>[%1, %2, %3, %4]</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6199"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6210"/>
<source>Horizontal Policy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6208"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6219"/>
<source>Vertical Policy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6217"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6228"/>
<source>Horizontal Stretch</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6225"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="6236"/>
<source>Vertical Stretch</source>
<translation type="unfinished"></translation>
</message>
@ -1446,17 +1446,17 @@
<context>
<name>QtSizePropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3904"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="3915"/>
<source>%1 x %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4000"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4011"/>
<source>Width</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4008"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="4019"/>
<source>Height</source>
<translation type="unfinished"></translation>
</message>
@ -1472,17 +1472,17 @@
<context>
<name>QtTransfromPropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7579"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7590"/>
<source>Location</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7586"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7597"/>
<source>Rotation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7593"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7604"/>
<source>Scale</source>
<translation type="unfinished"></translation>
</message>
@ -1503,17 +1503,17 @@
<context>
<name>QtVec3PropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7360"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7371"/>
<source>X</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7367"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7378"/>
<source>Y</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7374"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="7385"/>
<source>Z</source>
<translation type="unfinished"></translation>
</message>
@ -1521,42 +1521,42 @@
<context>
<name>QtWorkspacePropertyManager</name>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8059"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8070"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8066"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8077"/>
<source>Description</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8073"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8084"/>
<source>Timestep</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8080"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8091"/>
<source>SimMatlab</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8087"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8098"/>
<source>MatlabParam</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8094"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8105"/>
<source>Wave</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8101"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8112"/>
<source>RD</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8108"/>
<location filename="../ui/PropertyBrowser/qtpropertymanager.cpp" line="8119"/>
<source>Report</source>
<translation type="unfinished"></translation>
</message>

View File

@ -52,6 +52,7 @@
#include <QtWidgets/QApplication>
#include <QtGui/QPainter>
#include <QtWidgets/QLabel>
#include <QDebug>
#include <limits>
#include <limits.h>
@ -281,19 +282,24 @@ static void setValueInRange(PropertyManager* manager, PropertyManagerPrivate* ma
auto& data = it.value();
if (data.val == val)
if (data.val == val) {
qDebug() << "setValueInRange: value unchanged, returning";
return;
}
const Value oldVal = data.val;
data.val = qBound(data.minVal, val, data.maxVal);
if (data.val == oldVal)
if (data.val == oldVal) {
qDebug() << "setValueInRange: value same after bound, returning";
return;
}
if (setSubPropertyValue)
(managerPrivate->*setSubPropertyValue)(property, data.val);
qDebug() << "setValueInRange: emitting signals for property change";
emit(manager->*propertyChangedSignal)(property);
emit(manager->*valueChangedSignal)(property, data.val);
}
@ -781,11 +787,16 @@ QString QtIntPropertyManager::valueText(const QtProperty* property) const
*/
void QtIntPropertyManager::setValue(QtProperty* property, int val)
{
qDebug() << "QtIntPropertyManager::setValue called with property:" << property << "value:" << val;
const QtIntPropertyManagerPrivate::PropertyValueMap::iterator it = d_ptr->m_values.find(property);
if (it == d_ptr->m_values.end())
if (it == d_ptr->m_values.end()) {
qDebug() << "Property not found in m_values!";
return;
}
QtIntPropertyManagerPrivate::Data& data = it.value();
qDebug() << "Current value:" << data.val << "New value:" << val;
if (!data.isInitialed)
{
@ -8768,11 +8779,19 @@ void QtConeWaveComponentManagerPrivate::slotDoubleChanged(QtProperty* property,
}
}
#include <QDebug>
void QtConeWaveComponentManagerPrivate::slotIntChanged(QtProperty* property, int value) {
qDebug() << "slotIntChanged called with value:" << value;
qDebug() << "Property address:" << property;
qDebug() << "m_waveCountToPropery size:" << m_waveCountToPropery.size();
if (QtProperty* prop = m_waveCountToPropery.value(property, 0)) {
qDebug() << "Found waveCount property mapping, updating value to:" << value;
QConeWaveComponentAttribute c = m_values[prop];
c.SetWaveCount(value);
q_ptr->setValue(prop, c);
} else {
qDebug() << "Property not found in m_waveCountToPropery mapping";
}
}
@ -8818,6 +8837,10 @@ void QtConeWaveComponentManagerPrivate::slotPropertyDestroyed(QtProperty* proper
m_ringBrightAlphaToPropery[subProp] = 0;
m_ringBrightAlphaToPropery.remove(property);
}
if (QtProperty* subProp = m_ringDarkAlphaToPropery.value(property, nullptr)) {
m_ringDarkAlphaToPropery[subProp] = 0;
m_ringDarkAlphaToPropery.remove(property);
}
}
QtConeWaveComponentManager::QtConeWaveComponentManager(QObject* parent)
@ -8831,8 +8854,9 @@ QtConeWaveComponentManager::QtConeWaveComponentManager(QObject* parent)
this, SLOT(slotPropertyDestroyed(QtProperty*)));
d_ptr->m_intProperyManager = new QtIntPropertyManager(this);
connect(d_ptr->m_intProperyManager, SIGNAL(valueChanged(QtProperty*, int)),
bool intConnected = connect(d_ptr->m_intProperyManager, SIGNAL(valueChanged(QtProperty*, int)),
this, SLOT(slotIntChanged(QtProperty*, int)));
qDebug() << "Int manager connection result:" << intConnected;
connect(d_ptr->m_intProperyManager, SIGNAL(propertyDestroyed(QtProperty*)),
this, SLOT(slotPropertyDestroyed(QtProperty*)));
@ -8964,9 +8988,12 @@ void QtConeWaveComponentManager::initializeProperty(QtProperty* property) {
prop = d_ptr->m_intProperyManager->addProperty();
prop->setPropertyName(tr("waveCount"));
d_ptr->m_intProperyManager->setValueOnly(prop, val.GetWaveCount());
d_ptr->m_intProperyManager->setRange(prop, 1, 100);
d_ptr->m_properyToWaveCount[property] = prop;
d_ptr->m_waveCountToPropery[prop] = property;
property->addSubProperty(prop);
qDebug() << "Created waveCount property. Prop address:" << prop << "Parent address:" << property;
qDebug() << "m_waveCountToPropery now has" << d_ptr->m_waveCountToPropery.size() << "entries";
prop = d_ptr->m_doubleProperyManager->addProperty();
prop->setPropertyName(tr("waveSpeed"));