mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 21:11:39 +00:00
Update: improved values gradient dialog and located bindable properties(texture , tail and mesh param) page.
This commit is contained in:
parent
1cdeb07b5d
commit
31507b3de4
17 changed files with 237 additions and 166 deletions
|
@ -127,13 +127,12 @@ void CEditRangeUIntWidget::setMinimum(int value)
|
||||||
|
|
||||||
void CEditRangeUIntWidget::changeSlider(int value)
|
void CEditRangeUIntWidget::changeSlider(int value)
|
||||||
{
|
{
|
||||||
|
// NeL wrapper
|
||||||
|
if ((_Wrapper != NULL) && (_Wrapper->get() != uint32(value)))
|
||||||
|
_Wrapper->setAndUpdateModifiedFlag(value);
|
||||||
|
|
||||||
if (_emit)
|
if (_emit)
|
||||||
Q_EMIT valueChanged(value);
|
Q_EMIT valueChanged(value);
|
||||||
|
|
||||||
// NeL wrapper
|
|
||||||
if (_Wrapper == NULL) return;
|
|
||||||
if (_Wrapper->get() == uint32(value)) return;
|
|
||||||
_Wrapper->setAndUpdateModifiedFlag(value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CEditRangeUIntWidget::updateUi()
|
void CEditRangeUIntWidget::updateUi()
|
||||||
|
@ -232,13 +231,12 @@ void CEditRangeIntWidget::setMinimum(int value)
|
||||||
|
|
||||||
void CEditRangeIntWidget::changeSlider(int value)
|
void CEditRangeIntWidget::changeSlider(int value)
|
||||||
{
|
{
|
||||||
|
// NeL wrapper
|
||||||
|
if ((_Wrapper != NULL) && (_Wrapper->get() != sint32(value)))
|
||||||
|
_Wrapper->setAndUpdateModifiedFlag(value);
|
||||||
|
|
||||||
if (_emit)
|
if (_emit)
|
||||||
Q_EMIT valueChanged(value);
|
Q_EMIT valueChanged(value);
|
||||||
|
|
||||||
// NeL wrapper
|
|
||||||
if (_Wrapper == NULL) return;
|
|
||||||
if (_Wrapper->get() == sint32(value)) return;
|
|
||||||
_Wrapper->setAndUpdateModifiedFlag(value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CEditRangeIntWidget::updateUi()
|
void CEditRangeIntWidget::updateUi()
|
||||||
|
@ -341,13 +339,13 @@ void CEditRangeFloatWidget::changeSlider(int value)
|
||||||
int deltaSlider = _ui.horizontalSlider->maximum() - _ui.horizontalSlider->minimum();
|
int deltaSlider = _ui.horizontalSlider->maximum() - _ui.horizontalSlider->minimum();
|
||||||
float newValue = _ui.startSpinBox->value() + ((delta / deltaSlider) * value);
|
float newValue = _ui.startSpinBox->value() + ((delta / deltaSlider) * value);
|
||||||
_ui.currentSpinBox->setValue(newValue);
|
_ui.currentSpinBox->setValue(newValue);
|
||||||
if (_emit)
|
|
||||||
Q_EMIT valueChanged(newValue);
|
|
||||||
|
|
||||||
// NeL wrapper
|
// NeL wrapper
|
||||||
if (_Wrapper == NULL) return;
|
if ((_Wrapper != NULL) && (fabs(newValue - _Wrapper->get()) > 0.0001))
|
||||||
if (fabs(newValue - _Wrapper->get()) < 0.0001) return;
|
|
||||||
_Wrapper->setAndUpdateModifiedFlag(newValue);
|
_Wrapper->setAndUpdateModifiedFlag(newValue);
|
||||||
|
|
||||||
|
if (_emit)
|
||||||
|
Q_EMIT valueChanged(newValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CEditRangeFloatWidget::updateUi()
|
void CEditRangeFloatWidget::updateUi()
|
||||||
|
|
|
@ -557,14 +557,7 @@
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_10">
|
<layout class="QGridLayout" name="gridLayout_10">
|
||||||
<item row="0" column="0" colspan="2">
|
<item row="0" column="0">
|
||||||
<widget class="QCheckBox" name="useHermitteCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use hermitte interpolation</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QCheckBox" name="constantLengthCheckBox">
|
<widget class="QCheckBox" name="constantLengthCheckBox">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Non parametric anim only</string>
|
<string>Non parametric anim only</string>
|
||||||
|
@ -574,14 +567,21 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="0" column="1">
|
||||||
|
<widget class="QCheckBox" name="useHermitteCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Use hermitte interpolation</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label_15">
|
<widget class="QLabel" name="label_15">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Trail coord. system:</string>
|
<string>Trail coord. system:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QComboBox" name="coordSystemComboBox">
|
<widget class="QComboBox" name="coordSystemComboBox">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -605,28 +605,28 @@
|
||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="ribbonLengthLabel">
|
<widget class="QLabel" name="ribbonLengthLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Length(m):</string>
|
<string>Length(m):</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" colspan="2">
|
<item row="3" column="0" colspan="2">
|
||||||
<widget class="NLQT::CEditRangeFloatWidget" name="ribbonLengthWidget" native="true">
|
<widget class="NLQT::CEditRangeFloatWidget" name="ribbonLengthWidget" native="true">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="lodDegradationLabel">
|
<widget class="QLabel" name="lodDegradationLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>LOD degradation:</string>
|
<string>LOD degradation:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0" colspan="2">
|
<item row="5" column="0" colspan="2">
|
||||||
<widget class="NLQT::CEditRangeFloatWidget" name="lodDegradationWidget" native="true"/>
|
<widget class="NLQT::CEditRangeFloatWidget" name="lodDegradationWidget" native="true"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -710,6 +710,12 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>NLQT::CParticleTextureWidget</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>particle_texture_widget.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>NLQT::CEditRangeUIntWidget</class>
|
<class>NLQT::CEditRangeUIntWidget</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
|
@ -728,12 +734,6 @@
|
||||||
<header>attrib_widget.h</header>
|
<header>attrib_widget.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>NLQT::CParticleTextureWidget</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
<header>particle_texture_widget.h</header>
|
|
||||||
<container>1</container>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>NLQT::CMeshWidget</class>
|
<class>NLQT::CMeshWidget</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
|
|
|
@ -137,7 +137,7 @@ CLocatedBindablePage::CLocatedBindablePage(QWidget *parent)
|
||||||
connect(_ui.independantSizeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setIndependantSize(bool)));
|
connect(_ui.independantSizeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setIndependantSize(bool)));
|
||||||
connect(_ui.alignCheckBox, SIGNAL(toggled(bool)), this, SLOT(setAlignOnMotion(bool)));
|
connect(_ui.alignCheckBox, SIGNAL(toggled(bool)), this, SLOT(setAlignOnMotion(bool)));
|
||||||
connect(_ui.ztestCheckBox, SIGNAL(toggled(bool)), this, SLOT(setZTest(bool)));
|
connect(_ui.ztestCheckBox, SIGNAL(toggled(bool)), this, SLOT(setZTest(bool)));
|
||||||
connect(_ui.alignCheckBox, SIGNAL(toggled(bool)), this, SLOT(setZAlign(bool)));
|
connect(_ui.zalignCheckBox, SIGNAL(toggled(bool)), this, SLOT(setZAlign(bool)));
|
||||||
connect(_ui.rotationPCCheckBox, SIGNAL(toggled(bool)), this, SLOT(setHint(bool)));
|
connect(_ui.rotationPCCheckBox, SIGNAL(toggled(bool)), this, SLOT(setHint(bool)));
|
||||||
connect(_ui.blendModeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setBlendMode(int)));
|
connect(_ui.blendModeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setBlendMode(int)));
|
||||||
connect(_ui.zbiasDoubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setZBias(double)));
|
connect(_ui.zbiasDoubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setZBias(double)));
|
||||||
|
|
|
@ -54,6 +54,7 @@ CLocatedPage::CLocatedPage(QWidget *parent)
|
||||||
_ui.massWidget->init();
|
_ui.massWidget->init();
|
||||||
|
|
||||||
_ui.maxNumParticleWidget->setRange(1, 501);
|
_ui.maxNumParticleWidget->setRange(1, 501);
|
||||||
|
_ui.maxNumParticleWidget->enableUpperBound(1 << 16, true);
|
||||||
_ui.maxNumParticleWidget->setWrapper(&_MaxNbParticlesWrapper);
|
_ui.maxNumParticleWidget->setWrapper(&_MaxNbParticlesWrapper);
|
||||||
|
|
||||||
connect(_ui.coordSystemComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setMatrixMode(int)));
|
connect(_ui.coordSystemComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setMatrixMode(int)));
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>195</width>
|
<width>195</width>
|
||||||
<height>114</height>
|
<height>118</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -83,5 +83,22 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>morphCheckBox</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>editPushButton</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>60</x>
|
||||||
|
<y>85</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>135</x>
|
||||||
|
<y>86</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
@ -69,6 +69,8 @@ void CMeshWidget::setCurrentShape(CWorkspaceNode *ownerNode, NL3D::CPSShapeParti
|
||||||
NL3D::CPSConstraintMesh *cm = NLMISC::safe_cast<NL3D::CPSConstraintMesh *>(_ShapeParticle);
|
NL3D::CPSConstraintMesh *cm = NLMISC::safe_cast<NL3D::CPSConstraintMesh *>(_ShapeParticle);
|
||||||
if (cm->getNumShapes() > 1)
|
if (cm->getNumShapes() > 1)
|
||||||
_ui.morphCheckBox->setChecked(true);
|
_ui.morphCheckBox->setChecked(true);
|
||||||
|
else
|
||||||
|
_ui.morphCheckBox->setChecked(false);
|
||||||
|
|
||||||
updateForMorph();
|
updateForMorph();
|
||||||
}
|
}
|
||||||
|
@ -142,7 +144,6 @@ void CMeshWidget::updateForMorph()
|
||||||
_ui.browsePushButton->setEnabled(!enable);
|
_ui.browsePushButton->setEnabled(!enable);
|
||||||
_ui.meshLineEdit->setEnabled(!enable);
|
_ui.meshLineEdit->setEnabled(!enable);
|
||||||
_ui.label->setEnabled(!enable);
|
_ui.label->setEnabled(!enable);
|
||||||
_ui.editPushButton->setEnabled(enable);
|
|
||||||
if (!enable)
|
if (!enable)
|
||||||
_ui.meshLineEdit->setText(cm->getShape().c_str());
|
_ui.meshLineEdit->setText(cm->getShape().c_str());
|
||||||
else
|
else
|
||||||
|
|
|
@ -167,7 +167,7 @@ void CParticleControlDialog::updateCount()
|
||||||
_ui.numWantedFacesLabel->setText(tr("Num wanted faces: %1").arg(numWantedFaces));
|
_ui.numWantedFacesLabel->setText(tr("Num wanted faces: %1").arg(numWantedFaces));
|
||||||
|
|
||||||
// display system date
|
// display system date
|
||||||
_ui.systemTimesLabel->setText(tr("System time: %1").arg(ps->getSystemDate()));
|
_ui.systemTimesLabel->setText(tr("System time: %1").arg(ps->getSystemDate(),0,'f',2));
|
||||||
|
|
||||||
Q_EMIT changeCount();
|
Q_EMIT changeCount();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,19 +30,6 @@
|
||||||
<string>Integration</string>
|
<string>Integration</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="globalLightCheckBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Force global lighting</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="loadBalancingCheckBox">
|
<widget class="QCheckBox" name="loadBalancingCheckBox">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -508,26 +495,66 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="sharableCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Sharable</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="autoLODCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Auto-LOD</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="settingsPushButton">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>53454</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Settings</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="label_11">
|
<widget class="QLabel" name="label_11">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Max view dist:</string>
|
<string>Max view dist:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="5" column="0">
|
||||||
<widget class="NLQT::CEditRangeFloatWidget" name="maxViewDistWidget" native="true"/>
|
<widget class="NLQT::CEditRangeFloatWidget" name="maxViewDistWidget" native="true"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QLabel" name="label_12">
|
<widget class="QLabel" name="label_12">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>LOD Ratio:</string>
|
<string>LOD Ratio:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0">
|
<item row="7" column="0">
|
||||||
<widget class="NLQT::CEditRangeFloatWidget" name="lodRatioWidget" native="true"/>
|
<widget class="NLQT::CEditRangeFloatWidget" name="lodRatioWidget" native="true"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="0">
|
<item row="8" column="0">
|
||||||
<spacer name="verticalSpacer_3">
|
<spacer name="verticalSpacer_3">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
|
@ -548,6 +575,19 @@
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout_7">
|
<layout class="QGridLayout" name="gridLayout_7">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
|
<widget class="QCheckBox" name="globalLightCheckBox">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Force global lighting</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
<widget class="QCheckBox" name="editGlobalColorCheckBox">
|
<widget class="QCheckBox" name="editGlobalColorCheckBox">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string/>
|
<string/>
|
||||||
|
@ -563,14 +603,14 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="NLQT::CAttribRGBAWidget" name="colorWidget">
|
<widget class="NLQT::CAttribRGBAWidget" name="colorWidget">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string/>
|
<string/>
|
||||||
|
@ -580,7 +620,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="4" column="0">
|
||||||
<spacer name="verticalSpacer_5">
|
<spacer name="verticalSpacer_5">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
|
@ -674,46 +714,6 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="2">
|
<item row="1" column="0" colspan="2">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="sharableCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>Sharable</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="autoLODCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>Auto-LOD</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="settingsPushButton">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>53454</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Settings</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" colspan="2">
|
|
||||||
<widget class="QGroupBox" name="userPresetsGroupBox">
|
<widget class="QGroupBox" name="userPresetsGroupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string/>
|
<string/>
|
||||||
|
@ -865,7 +865,7 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="2" column="0">
|
||||||
<spacer name="verticalSpacer_6">
|
<spacer name="verticalSpacer_6">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0" colspan="2">
|
||||||
<widget class="QGroupBox" name="multitexturingGroupBox">
|
<widget class="QGroupBox" name="multitexturingGroupBox">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
|
@ -53,10 +53,16 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="2" column="0" colspan="2">
|
||||||
|
<widget class="NLQT::CAttribIntWidget" name="texIndexWidget" native="true"/>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" colspan="2">
|
||||||
|
<widget class="NLQT::CParticleTextureWidget" name="texWidget" native="true"/>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
<widget class="QPushButton" name="textureGroupedPushButton">
|
<widget class="QPushButton" name="textureGroupedPushButton">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Texture grouped</string>
|
<string>Texture grouped</string>
|
||||||
|
@ -66,27 +72,21 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" colspan="2">
|
|
||||||
<widget class="NLQT::CAttribIntWidget" name="texIndexWidget" native="true"/>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0" colspan="2">
|
|
||||||
<widget class="NLQT::CParticleTextureWidget" name="texWidget" native="true"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
|
||||||
<class>NLQT::CAttribIntWidget</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
<header>attrib_widget.h</header>
|
|
||||||
<container>1</container>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>NLQT::CParticleTextureWidget</class>
|
<class>NLQT::CParticleTextureWidget</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
<header>particle_texture_widget.h</header>
|
<header>particle_texture_widget.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>NLQT::CAttribIntWidget</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>attrib_widget.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
|
@ -97,12 +97,44 @@
|
||||||
<slot>setEnabled(bool)</slot>
|
<slot>setEnabled(bool)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>81</x>
|
<x>100</x>
|
||||||
<y>46</y>
|
<y>67</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>129</x>
|
<x>285</x>
|
||||||
<y>56</y>
|
<y>70</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>texAnimCheckBox</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>multitexturingGroupBox</receiver>
|
||||||
|
<slot>setDisabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>77</x>
|
||||||
|
<y>24</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>86</x>
|
||||||
|
<y>72</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>texAnimCheckBox</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>textureGroupedPushButton</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>138</x>
|
||||||
|
<y>17</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>174</x>
|
||||||
|
<y>17</y>
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
|
|
|
@ -61,7 +61,7 @@ void CParticleTextureAnimWidget::setCurrentTextureAnim(NL3D::CPSTexturedParticle
|
||||||
_EditedParticle = tp;
|
_EditedParticle = tp;
|
||||||
_MTP = mtp;
|
_MTP = mtp;
|
||||||
|
|
||||||
_ui.texAnimCheckBox->blockSignals(true);
|
disconnect(_ui.texAnimCheckBox, SIGNAL(toggled(bool)), this, SLOT(setEnabledTexAnim(bool)));
|
||||||
|
|
||||||
bool isAnimTex = _EditedParticle->getTextureGroup() ? true : false;
|
bool isAnimTex = _EditedParticle->getTextureGroup() ? true : false;
|
||||||
_ui.texAnimCheckBox->setChecked(isAnimTex);
|
_ui.texAnimCheckBox->setChecked(isAnimTex);
|
||||||
|
@ -75,13 +75,16 @@ void CParticleTextureAnimWidget::setCurrentTextureAnim(NL3D::CPSTexturedParticle
|
||||||
else
|
else
|
||||||
_ui.multitexturingGroupBox->hide();
|
_ui.multitexturingGroupBox->hide();
|
||||||
|
|
||||||
_ui.texAnimCheckBox->blockSignals(false);
|
connect(_ui.texAnimCheckBox, SIGNAL(toggled(bool)), this, SLOT(setEnabledTexAnim(bool)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CParticleTextureAnimWidget::setEnabledTexAnim(bool state)
|
void CParticleTextureAnimWidget::setEnabledTexAnim(bool state)
|
||||||
{
|
{
|
||||||
if (state)
|
if (state)
|
||||||
{
|
{
|
||||||
|
if (_MTP)
|
||||||
|
_ui.multitexturingCheckBox->setChecked(false);
|
||||||
|
|
||||||
// When you try to load a dummy texture, remove alternative paths, an assertion is thrown otherwise
|
// When you try to load a dummy texture, remove alternative paths, an assertion is thrown otherwise
|
||||||
NLMISC::CPath::removeAllAlternativeSearchPath();
|
NLMISC::CPath::removeAllAlternativeSearchPath();
|
||||||
|
|
||||||
|
@ -144,7 +147,6 @@ void CParticleTextureAnimWidget::updateTexAnimState(bool state)
|
||||||
_ui.texWidget->updateUi();
|
_ui.texWidget->updateUi();
|
||||||
}
|
}
|
||||||
_ui.texWidget->setVisible(!state);
|
_ui.texWidget->setVisible(!state);
|
||||||
_ui.textureGroupedPushButton->setVisible(state);
|
|
||||||
_ui.texIndexWidget->setVisible(state);
|
_ui.texIndexWidget->setVisible(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>191</width>
|
<width>191</width>
|
||||||
<height>162</height>
|
<height>176</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -18,8 +18,8 @@
|
||||||
<widget class="QScrollArea" name="scrollArea">
|
<widget class="QScrollArea" name="scrollArea">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>105</width>
|
||||||
<height>100</height>
|
<height>105</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
|
@ -36,8 +36,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>94</width>
|
<width>103</width>
|
||||||
<height>94</height>
|
<height>103</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
|
|
@ -221,8 +221,8 @@ void CParticleWorkspaceDialog::clickedItem(const QModelIndex & index)
|
||||||
if (index.flags() != Qt::NoItemFlags)
|
if (index.flags() != Qt::NoItemFlags)
|
||||||
_PropertyDialog->setCurrentEditedElement(_currentItem);
|
_PropertyDialog->setCurrentEditedElement(_currentItem);
|
||||||
|
|
||||||
if (_currentItem && ((_currentItem->itemType() == ItemType::Workspace) ||
|
if ((_currentItem->itemType() == ItemType::Workspace) ||
|
||||||
(_currentItem->itemType() == ItemType::ParticleSystemNotLoaded)))
|
(_currentItem->itemType() == ItemType::ParticleSystemNotLoaded))
|
||||||
_currentItem = NULL;
|
_currentItem = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,6 +285,15 @@ void CParticleWorkspaceDialog::customContextMenu()
|
||||||
popurMenu->addAction(_deleteAction);
|
popurMenu->addAction(_deleteAction);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool stopped = Modules::psEdit().getState() == CParticleEditor::State::Stopped ? true : false;
|
||||||
|
_copyLocatedAction->setEnabled(stopped);
|
||||||
|
_copyBindableAction->setEnabled(stopped);
|
||||||
|
_pasteLocatedAction->setEnabled(stopped);
|
||||||
|
_instanciateAction->setEnabled(stopped);
|
||||||
|
_savePSAction->setEnabled(stopped);
|
||||||
|
_saveAsPSAction->setEnabled(stopped);
|
||||||
|
|
||||||
popurMenu->exec(QCursor::pos());
|
popurMenu->exec(QCursor::pos());
|
||||||
delete popurMenu;
|
delete popurMenu;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>243</width>
|
<width>206</width>
|
||||||
<height>107</height>
|
<height>90</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -15,23 +15,6 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QCheckBox" name="tailFadingCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>Tail fading</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" colspan="2">
|
|
||||||
<widget class="QCheckBox" name="tailPersistAfterDeathCheckBox">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Tail persist after death</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QComboBox" name="ribbonOrientationComboBox">
|
<widget class="QComboBox" name="ribbonOrientationComboBox">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Ribbon orientation</string>
|
<string>Ribbon orientation</string>
|
||||||
|
@ -53,7 +36,7 @@
|
||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2" rowspan="2">
|
<item row="0" column="1" rowspan="3">
|
||||||
<widget class="NLQT::CGraphicsInfoWidget" name="pathWidget" native="true">
|
<widget class="NLQT::CGraphicsInfoWidget" name="pathWidget" native="true">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -69,7 +52,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" colspan="2">
|
<item row="1" column="0">
|
||||||
<widget class="QComboBox" name="tailShapeComboBox">
|
<widget class="QComboBox" name="tailShapeComboBox">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Tail shape</string>
|
<string>Tail shape</string>
|
||||||
|
@ -116,6 +99,13 @@
|
||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="tailFadingCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Tail fading</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
|
|
@ -34,7 +34,6 @@ CTailParticleWidget::CTailParticleWidget(QWidget *parent)
|
||||||
|
|
||||||
_ui.pathWidget->setMode(Mode::RibbonShape);
|
_ui.pathWidget->setMode(Mode::RibbonShape);
|
||||||
connect(_ui.tailFadingCheckBox, SIGNAL(toggled(bool)), this, SLOT(setTailFading(bool)));
|
connect(_ui.tailFadingCheckBox, SIGNAL(toggled(bool)), this, SLOT(setTailFading(bool)));
|
||||||
connect(_ui.tailPersistAfterDeathCheckBox, SIGNAL(toggled(bool)), this, SLOT(setPersistAfterDeath(bool)));
|
|
||||||
connect(_ui.ribbonOrientationComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setRibbonOrientation(int)));
|
connect(_ui.ribbonOrientationComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setRibbonOrientation(int)));
|
||||||
connect(_ui.tailShapeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setTailShape(int)));
|
connect(_ui.tailShapeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setTailShape(int)));
|
||||||
}
|
}
|
||||||
|
@ -55,17 +54,14 @@ void CTailParticleWidget::setCurrentTailParticle(CWorkspaceNode *ownerNode, NL3D
|
||||||
{
|
{
|
||||||
_ui.pathWidget->hide();
|
_ui.pathWidget->hide();
|
||||||
_ui.ribbonOrientationComboBox->hide();
|
_ui.ribbonOrientationComboBox->hide();
|
||||||
_ui.tailPersistAfterDeathCheckBox->hide();
|
|
||||||
_ui.tailShapeComboBox->hide();
|
_ui.tailShapeComboBox->hide();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_ui.pathWidget->show();
|
_ui.pathWidget->show();
|
||||||
_ui.ribbonOrientationComboBox->show();
|
_ui.ribbonOrientationComboBox->show();
|
||||||
_ui.tailPersistAfterDeathCheckBox->show();
|
|
||||||
_ui.tailShapeComboBox->show();
|
_ui.tailShapeComboBox->show();
|
||||||
NL3D::CPSRibbon *r = dynamic_cast<NL3D::CPSRibbon *>(_TailParticle);
|
NL3D::CPSRibbon *r = dynamic_cast<NL3D::CPSRibbon *>(_TailParticle);
|
||||||
// _ui.tailPersistAfterDeathCheckBox = (r->getPersistAfterDeath();
|
|
||||||
_ui.ribbonOrientationComboBox->setCurrentIndex(r->getOrientation());
|
_ui.ribbonOrientationComboBox->setCurrentIndex(r->getOrientation());
|
||||||
|
|
||||||
// Update graphics widget
|
// Update graphics widget
|
||||||
|
@ -85,12 +81,6 @@ void CTailParticleWidget::setTailFading(bool state)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTailParticleWidget::setPersistAfterDeath(bool state)
|
|
||||||
{
|
|
||||||
nlassert(dynamic_cast<NL3D::CPSRibbon *>(_TailParticle));
|
|
||||||
// (dynamic_cast<NL3D::CPSRibbon *>(_TailParticle))->setPersistAfterDeath(state);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CTailParticleWidget::setTailShape(int index)
|
void CTailParticleWidget::setTailShape(int index)
|
||||||
{
|
{
|
||||||
NL3D::CPSRibbon *r = dynamic_cast<NL3D::CPSRibbon *>(_TailParticle);
|
NL3D::CPSRibbon *r = dynamic_cast<NL3D::CPSRibbon *>(_TailParticle);
|
||||||
|
|
|
@ -49,7 +49,6 @@ public:
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void setTailFading(bool state);
|
void setTailFading(bool state);
|
||||||
void setPersistAfterDeath(bool state);
|
|
||||||
void setTailShape(int index);
|
void setTailShape(int index);
|
||||||
void setRibbonOrientation(int index);
|
void setRibbonOrientation(int index);
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ CGradientDialog::CGradientDialog(CWorkspaceNode *ownerNode,
|
||||||
editWidget = _ClientInterface->createDialog(this);
|
editWidget = _ClientInterface->createDialog(this);
|
||||||
_gridLayout->addWidget(editWidget, 4, 1, 1, 2);
|
_gridLayout->addWidget(editWidget, 4, 1, 1, 2);
|
||||||
|
|
||||||
setWindowTitle(tr("Dialog"));
|
setWindowTitle(_ClientInterface->getTitleDialog());
|
||||||
_label->setText(tr("Num samples:"));
|
_label->setText(tr("Num samples:"));
|
||||||
|
|
||||||
if (canTuneNbStages)
|
if (canTuneNbStages)
|
||||||
|
|
|
@ -60,6 +60,9 @@ public:
|
||||||
|
|
||||||
virtual QWidget *createDialog(QWidget *parent) = 0;
|
virtual QWidget *createDialog(QWidget *parent) = 0;
|
||||||
|
|
||||||
|
/// Return the title of dialog in client
|
||||||
|
virtual QString getTitleDialog() const = 0;
|
||||||
|
|
||||||
/// This enumerate the action that we can apply on a gradient
|
/// This enumerate the action that we can apply on a gradient
|
||||||
enum TAction { Add, Insert, Delete, Up, Down };
|
enum TAction { Add, Insert, Delete, Up, Down };
|
||||||
|
|
||||||
|
@ -180,6 +183,8 @@ public:
|
||||||
return newDialog(this, parent);
|
return newDialog(this, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual QString getTitleDialog() const = 0;
|
||||||
|
|
||||||
/// create a new dialog with given id and wrapper
|
/// create a new dialog with given id and wrapper
|
||||||
virtual QWidget *newDialog(IPSWrapper<T> *wrapper, QWidget *parent) = 0;
|
virtual QWidget *newDialog(IPSWrapper<T> *wrapper, QWidget *parent) = 0;
|
||||||
|
|
||||||
|
@ -259,6 +264,11 @@ public:
|
||||||
return editWidget;
|
return editWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual QString getTitleDialog() const
|
||||||
|
{
|
||||||
|
return tr("Float values gradient dialog");
|
||||||
|
}
|
||||||
|
|
||||||
virtual void setCurrentIndex(uint index)
|
virtual void setCurrentIndex(uint index)
|
||||||
{
|
{
|
||||||
_CurrentEditedIndex = index;
|
_CurrentEditedIndex = index;
|
||||||
|
@ -267,7 +277,7 @@ public:
|
||||||
|
|
||||||
virtual void displayValue(uint index, QListWidgetItem *item)
|
virtual void displayValue(uint index, QListWidgetItem *item)
|
||||||
{
|
{
|
||||||
item->setText(QString("%1").arg(Scheme->getValue(index)));
|
item->setText(QString("%1").arg(Scheme->getValue(index),0,'f',2));
|
||||||
}
|
}
|
||||||
|
|
||||||
CEditRangeFloatWidget *editWidget;
|
CEditRangeFloatWidget *editWidget;
|
||||||
|
@ -290,6 +300,11 @@ public:
|
||||||
return editWidget;
|
return editWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual QString getTitleDialog() const
|
||||||
|
{
|
||||||
|
return tr("UInt values gradient dialog");
|
||||||
|
}
|
||||||
|
|
||||||
virtual void setCurrentIndex(uint index)
|
virtual void setCurrentIndex(uint index)
|
||||||
{
|
{
|
||||||
_CurrentEditedIndex = index;
|
_CurrentEditedIndex = index;
|
||||||
|
@ -321,6 +336,11 @@ public:
|
||||||
return editWidget;
|
return editWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual QString getTitleDialog() const
|
||||||
|
{
|
||||||
|
return tr("Int values gradient dialog");
|
||||||
|
}
|
||||||
|
|
||||||
virtual void setCurrentIndex(uint index)
|
virtual void setCurrentIndex(uint index)
|
||||||
{
|
{
|
||||||
_CurrentEditedIndex = index;
|
_CurrentEditedIndex = index;
|
||||||
|
@ -351,6 +371,11 @@ public:
|
||||||
return editWidget;
|
return editWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual QString getTitleDialog() const
|
||||||
|
{
|
||||||
|
return tr("Color gradient dialog");
|
||||||
|
}
|
||||||
|
|
||||||
virtual void setCurrentIndex(uint index)
|
virtual void setCurrentIndex(uint index)
|
||||||
{
|
{
|
||||||
_CurrentEditedIndex = index;
|
_CurrentEditedIndex = index;
|
||||||
|
@ -360,7 +385,7 @@ public:
|
||||||
virtual void displayValue(uint index, QListWidgetItem *item)
|
virtual void displayValue(uint index, QListWidgetItem *item)
|
||||||
{
|
{
|
||||||
NLMISC::CRGBA color = Scheme->getValue(index);
|
NLMISC::CRGBA color = Scheme->getValue(index);
|
||||||
item->setText(QString("RGBA(%1,%2,%3)").arg(color.R).arg(color.G).arg(color.B));
|
item->setText(QString("RGBA(%1,%2,%3,%4)").arg(color.R).arg(color.G).arg(color.B).arg(color.A));
|
||||||
QPixmap pixmap(QSize(16, 16));
|
QPixmap pixmap(QSize(16, 16));
|
||||||
QPainter painter(&pixmap);
|
QPainter painter(&pixmap);
|
||||||
painter.setRenderHint(QPainter::Antialiasing, true);
|
painter.setRenderHint(QPainter::Antialiasing, true);
|
||||||
|
@ -386,7 +411,10 @@ public:
|
||||||
editWidget->setWrapper(wrapper);
|
editWidget->setWrapper(wrapper);
|
||||||
return editWidget;
|
return editWidget;
|
||||||
}
|
}
|
||||||
|
virtual QString getTitleDialog() const
|
||||||
|
{
|
||||||
|
return tr("Plane basis gradient dialog");
|
||||||
|
}
|
||||||
virtual void setCurrentIndex(uint index)
|
virtual void setCurrentIndex(uint index)
|
||||||
{
|
{
|
||||||
_CurrentEditedIndex = index;
|
_CurrentEditedIndex = index;
|
||||||
|
@ -418,6 +446,10 @@ public:
|
||||||
|
|
||||||
// all method inherited from IValueGradientClient
|
// all method inherited from IValueGradientClient
|
||||||
virtual QWidget *createDialog(QWidget *parent);
|
virtual QWidget *createDialog(QWidget *parent);
|
||||||
|
virtual QString getTitleDialog() const
|
||||||
|
{
|
||||||
|
return tr("Texture grouped dialog");
|
||||||
|
}
|
||||||
virtual bool modifyGradient(TAction, uint index);
|
virtual bool modifyGradient(TAction, uint index);
|
||||||
virtual void displayValue(uint index, QListWidgetItem *item);
|
virtual void displayValue(uint index, QListWidgetItem *item);
|
||||||
virtual void setCurrentIndex(uint index);
|
virtual void setCurrentIndex(uint index);
|
||||||
|
|
Loading…
Reference in a new issue