Update: improved values gradient dialog and located bindable properties(texture , tail and mesh param) page.

hg/feature/sound
dnk-88 14 years ago
parent 5ae29fbc63
commit 0dc7b47cec

@ -127,13 +127,12 @@ void CEditRangeUIntWidget::setMinimum(int value)
void CEditRangeUIntWidget::changeSlider(int value)
{
// NeL wrapper
if ((_Wrapper != NULL) && (_Wrapper->get() != uint32(value)))
_Wrapper->setAndUpdateModifiedFlag(value);
if (_emit)
Q_EMIT valueChanged(value);
// NeL wrapper
if (_Wrapper == NULL) return;
if (_Wrapper->get() == uint32(value)) return;
_Wrapper->setAndUpdateModifiedFlag(value);
}
void CEditRangeUIntWidget::updateUi()
@ -232,13 +231,12 @@ void CEditRangeIntWidget::setMinimum(int value)
void CEditRangeIntWidget::changeSlider(int value)
{
// NeL wrapper
if ((_Wrapper != NULL) && (_Wrapper->get() != sint32(value)))
_Wrapper->setAndUpdateModifiedFlag(value);
if (_emit)
Q_EMIT valueChanged(value);
// NeL wrapper
if (_Wrapper == NULL) return;
if (_Wrapper->get() == sint32(value)) return;
_Wrapper->setAndUpdateModifiedFlag(value);
}
void CEditRangeIntWidget::updateUi()
@ -341,13 +339,13 @@ void CEditRangeFloatWidget::changeSlider(int value)
int deltaSlider = _ui.horizontalSlider->maximum() - _ui.horizontalSlider->minimum();
float newValue = _ui.startSpinBox->value() + ((delta / deltaSlider) * value);
_ui.currentSpinBox->setValue(newValue);
if (_emit)
Q_EMIT valueChanged(newValue);
// NeL wrapper
if (_Wrapper == NULL) return;
if (fabs(newValue - _Wrapper->get()) < 0.0001) return;
_Wrapper->setAndUpdateModifiedFlag(newValue);
if ((_Wrapper != NULL) && (fabs(newValue - _Wrapper->get()) > 0.0001))
_Wrapper->setAndUpdateModifiedFlag(newValue);
if (_emit)
Q_EMIT valueChanged(newValue);
}
void CEditRangeFloatWidget::updateUi()

@ -557,14 +557,7 @@
<string/>
</property>
<layout class="QGridLayout" name="gridLayout_10">
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="useHermitteCheckBox">
<property name="text">
<string>Use hermitte interpolation</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<item row="0" column="0">
<widget class="QCheckBox" name="constantLengthCheckBox">
<property name="toolTip">
<string>Non parametric anim only</string>
@ -574,14 +567,21 @@
</property>
</widget>
</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">
<property name="text">
<string>Trail coord. system:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<item row="1" column="1">
<widget class="QComboBox" name="coordSystemComboBox">
<item>
<property name="text">
@ -605,28 +605,28 @@
</item>
</widget>
</item>
<item row="3" column="0">
<item row="2" column="0">
<widget class="QLabel" name="ribbonLengthLabel">
<property name="text">
<string>Length(m):</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<item row="3" column="0" colspan="2">
<widget class="NLQT::CEditRangeFloatWidget" name="ribbonLengthWidget" native="true">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<item row="4" column="0">
<widget class="QLabel" name="lodDegradationLabel">
<property name="text">
<string>LOD degradation:</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<item row="5" column="0" colspan="2">
<widget class="NLQT::CEditRangeFloatWidget" name="lodDegradationWidget" native="true"/>
</item>
</layout>
@ -710,6 +710,12 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>NLQT::CParticleTextureWidget</class>
<extends>QWidget</extends>
<header>particle_texture_widget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>NLQT::CEditRangeUIntWidget</class>
<extends>QWidget</extends>
@ -728,12 +734,6 @@
<header>attrib_widget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>NLQT::CParticleTextureWidget</class>
<extends>QWidget</extends>
<header>particle_texture_widget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>NLQT::CMeshWidget</class>
<extends>QWidget</extends>

@ -137,7 +137,7 @@ CLocatedBindablePage::CLocatedBindablePage(QWidget *parent)
connect(_ui.independantSizeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setIndependantSize(bool)));
connect(_ui.alignCheckBox, SIGNAL(toggled(bool)), this, SLOT(setAlignOnMotion(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.blendModeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setBlendMode(int)));
connect(_ui.zbiasDoubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setZBias(double)));

@ -54,6 +54,7 @@ CLocatedPage::CLocatedPage(QWidget *parent)
_ui.massWidget->init();
_ui.maxNumParticleWidget->setRange(1, 501);
_ui.maxNumParticleWidget->enableUpperBound(1 << 16, true);
_ui.maxNumParticleWidget->setWrapper(&_MaxNbParticlesWrapper);
connect(_ui.coordSystemComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setMatrixMode(int)));

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>195</width>
<height>114</height>
<height>118</height>
</rect>
</property>
<property name="windowTitle">
@ -83,5 +83,22 @@
</layout>
</widget>
<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>

@ -69,6 +69,8 @@ void CMeshWidget::setCurrentShape(CWorkspaceNode *ownerNode, NL3D::CPSShapeParti
NL3D::CPSConstraintMesh *cm = NLMISC::safe_cast<NL3D::CPSConstraintMesh *>(_ShapeParticle);
if (cm->getNumShapes() > 1)
_ui.morphCheckBox->setChecked(true);
else
_ui.morphCheckBox->setChecked(false);
updateForMorph();
}
@ -142,7 +144,6 @@ void CMeshWidget::updateForMorph()
_ui.browsePushButton->setEnabled(!enable);
_ui.meshLineEdit->setEnabled(!enable);
_ui.label->setEnabled(!enable);
_ui.editPushButton->setEnabled(enable);
if (!enable)
_ui.meshLineEdit->setText(cm->getShape().c_str());
else

@ -167,7 +167,7 @@ void CParticleControlDialog::updateCount()
_ui.numWantedFacesLabel->setText(tr("Num wanted faces: %1").arg(numWantedFaces));
// 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();
}

@ -30,19 +30,6 @@
<string>Integration</string>
</attribute>
<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>
<widget class="QCheckBox" name="loadBalancingCheckBox">
<property name="sizePolicy">
@ -508,26 +495,66 @@
</widget>
</item>
<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">
<property name="text">
<string>Max view dist:</string>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="5" column="0">
<widget class="NLQT::CEditRangeFloatWidget" name="maxViewDistWidget" native="true"/>
</item>
<item row="5" column="0">
<item row="6" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>LOD Ratio:</string>
</property>
</widget>
</item>
<item row="6" column="0">
<item row="7" column="0">
<widget class="NLQT::CEditRangeFloatWidget" name="lodRatioWidget" native="true"/>
</item>
<item row="7" column="0">
<item row="8" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -548,6 +575,19 @@
</attribute>
<layout class="QGridLayout" name="gridLayout_7">
<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">
<property name="toolTip">
<string/>
@ -563,14 +603,14 @@
</property>
</widget>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="NLQT::CAttribRGBAWidget" name="colorWidget">
<property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="toolTip">
<string/>
@ -580,7 +620,7 @@
</property>
</widget>
</item>
<item row="3" column="0">
<item row="4" column="0">
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -674,46 +714,6 @@
</widget>
</item>
<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">
<property name="title">
<string/>
@ -865,7 +865,7 @@
</layout>
</widget>
</item>
<item row="3" column="0">
<item row="2" column="0">
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>

@ -21,7 +21,7 @@
</property>
</widget>
</item>
<item row="1" column="0">
<item row="1" column="0" colspan="2">
<widget class="QGroupBox" name="multitexturingGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
@ -53,10 +53,16 @@
</layout>
</widget>
</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">
<property name="enabled">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="text">
<string>Texture grouped</string>
@ -66,25 +72,19 @@
</property>
</widget>
</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>
</widget>
<customwidgets>
<customwidget>
<class>NLQT::CAttribIntWidget</class>
<class>NLQT::CParticleTextureWidget</class>
<extends>QWidget</extends>
<header>attrib_widget.h</header>
<header>particle_texture_widget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>NLQT::CParticleTextureWidget</class>
<class>NLQT::CAttribIntWidget</class>
<extends>QWidget</extends>
<header>particle_texture_widget.h</header>
<header>attrib_widget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
@ -97,12 +97,44 @@
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>81</x>
<y>46</y>
<x>100</x>
<y>67</y>
</hint>
<hint type="destinationlabel">
<x>285</x>
<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>129</x>
<y>56</y>
<x>174</x>
<y>17</y>
</hint>
</hints>
</connection>

@ -61,7 +61,7 @@ void CParticleTextureAnimWidget::setCurrentTextureAnim(NL3D::CPSTexturedParticle
_EditedParticle = tp;
_MTP = mtp;
_ui.texAnimCheckBox->blockSignals(true);
disconnect(_ui.texAnimCheckBox, SIGNAL(toggled(bool)), this, SLOT(setEnabledTexAnim(bool)));
bool isAnimTex = _EditedParticle->getTextureGroup() ? true : false;
_ui.texAnimCheckBox->setChecked(isAnimTex);
@ -75,13 +75,16 @@ void CParticleTextureAnimWidget::setCurrentTextureAnim(NL3D::CPSTexturedParticle
else
_ui.multitexturingGroupBox->hide();
_ui.texAnimCheckBox->blockSignals(false);
connect(_ui.texAnimCheckBox, SIGNAL(toggled(bool)), this, SLOT(setEnabledTexAnim(bool)));
}
void CParticleTextureAnimWidget::setEnabledTexAnim(bool 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
NLMISC::CPath::removeAllAlternativeSearchPath();
@ -144,7 +147,6 @@ void CParticleTextureAnimWidget::updateTexAnimState(bool state)
_ui.texWidget->updateUi();
}
_ui.texWidget->setVisible(!state);
_ui.textureGroupedPushButton->setVisible(state);
_ui.texIndexWidget->setVisible(state);
}

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>191</width>
<height>162</height>
<height>176</height>
</rect>
</property>
<property name="windowTitle">
@ -18,8 +18,8 @@
<widget class="QScrollArea" name="scrollArea">
<property name="minimumSize">
<size>
<width>100</width>
<height>100</height>
<width>105</width>
<height>105</height>
</size>
</property>
<property name="maximumSize">
@ -36,8 +36,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>94</width>
<height>94</height>
<width>103</width>
<height>103</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">

@ -221,8 +221,8 @@ void CParticleWorkspaceDialog::clickedItem(const QModelIndex & index)
if (index.flags() != Qt::NoItemFlags)
_PropertyDialog->setCurrentEditedElement(_currentItem);
if (_currentItem && ((_currentItem->itemType() == ItemType::Workspace) ||
(_currentItem->itemType() == ItemType::ParticleSystemNotLoaded)))
if ((_currentItem->itemType() == ItemType::Workspace) ||
(_currentItem->itemType() == ItemType::ParticleSystemNotLoaded))
_currentItem = NULL;
}
@ -285,6 +285,15 @@ void CParticleWorkspaceDialog::customContextMenu()
popurMenu->addAction(_deleteAction);
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());
delete popurMenu;
}

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>243</width>
<height>107</height>
<width>206</width>
<height>90</height>
</rect>
</property>
<property name="windowTitle">
@ -15,23 +15,6 @@
</property>
<layout class="QGridLayout" name="gridLayout">
<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">
<property name="toolTip">
<string>Ribbon orientation</string>
@ -53,7 +36,7 @@
</item>
</widget>
</item>
<item row="1" column="2" rowspan="2">
<item row="0" column="1" rowspan="3">
<widget class="NLQT::CGraphicsInfoWidget" name="pathWidget" native="true">
<property name="minimumSize">
<size>
@ -69,7 +52,7 @@
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<item row="1" column="0">
<widget class="QComboBox" name="tailShapeComboBox">
<property name="toolTip">
<string>Tail shape</string>
@ -116,6 +99,13 @@
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="tailFadingCheckBox">
<property name="text">
<string>Tail fading</string>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>

@ -34,7 +34,6 @@ CTailParticleWidget::CTailParticleWidget(QWidget *parent)
_ui.pathWidget->setMode(Mode::RibbonShape);
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.tailShapeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setTailShape(int)));
}
@ -55,17 +54,14 @@ void CTailParticleWidget::setCurrentTailParticle(CWorkspaceNode *ownerNode, NL3D
{
_ui.pathWidget->hide();
_ui.ribbonOrientationComboBox->hide();
_ui.tailPersistAfterDeathCheckBox->hide();
_ui.tailShapeComboBox->hide();
}
else
{
_ui.pathWidget->show();
_ui.ribbonOrientationComboBox->show();
_ui.tailPersistAfterDeathCheckBox->show();
_ui.tailShapeComboBox->show();
NL3D::CPSRibbon *r = dynamic_cast<NL3D::CPSRibbon *>(_TailParticle);
// _ui.tailPersistAfterDeathCheckBox = (r->getPersistAfterDeath();
_ui.ribbonOrientationComboBox->setCurrentIndex(r->getOrientation());
// 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)
{
NL3D::CPSRibbon *r = dynamic_cast<NL3D::CPSRibbon *>(_TailParticle);

@ -49,7 +49,6 @@ public:
private Q_SLOTS:
void setTailFading(bool state);
void setPersistAfterDeath(bool state);
void setTailShape(int index);
void setRibbonOrientation(int index);

@ -121,7 +121,7 @@ CGradientDialog::CGradientDialog(CWorkspaceNode *ownerNode,
editWidget = _ClientInterface->createDialog(this);
_gridLayout->addWidget(editWidget, 4, 1, 1, 2);
setWindowTitle(tr("Dialog"));
setWindowTitle(_ClientInterface->getTitleDialog());
_label->setText(tr("Num samples:"));
if (canTuneNbStages)

@ -60,6 +60,9 @@ public:
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
enum TAction { Add, Insert, Delete, Up, Down };
@ -180,6 +183,8 @@ public:
return newDialog(this, parent);
}
virtual QString getTitleDialog() const = 0;
/// create a new dialog with given id and wrapper
virtual QWidget *newDialog(IPSWrapper<T> *wrapper, QWidget *parent) = 0;
@ -259,6 +264,11 @@ public:
return editWidget;
}
virtual QString getTitleDialog() const
{
return tr("Float values gradient dialog");
}
virtual void setCurrentIndex(uint index)
{
_CurrentEditedIndex = index;
@ -267,7 +277,7 @@ public:
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;
@ -290,6 +300,11 @@ public:
return editWidget;
}
virtual QString getTitleDialog() const
{
return tr("UInt values gradient dialog");
}
virtual void setCurrentIndex(uint index)
{
_CurrentEditedIndex = index;
@ -321,6 +336,11 @@ public:
return editWidget;
}
virtual QString getTitleDialog() const
{
return tr("Int values gradient dialog");
}
virtual void setCurrentIndex(uint index)
{
_CurrentEditedIndex = index;
@ -351,6 +371,11 @@ public:
return editWidget;
}
virtual QString getTitleDialog() const
{
return tr("Color gradient dialog");
}
virtual void setCurrentIndex(uint index)
{
_CurrentEditedIndex = index;
@ -360,7 +385,7 @@ public:
virtual void displayValue(uint index, QListWidgetItem *item)
{
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));
QPainter painter(&pixmap);
painter.setRenderHint(QPainter::Antialiasing, true);
@ -386,7 +411,10 @@ public:
editWidget->setWrapper(wrapper);
return editWidget;
}
virtual QString getTitleDialog() const
{
return tr("Plane basis gradient dialog");
}
virtual void setCurrentIndex(uint index)
{
_CurrentEditedIndex = index;
@ -418,6 +446,10 @@ public:
// all method inherited from IValueGradientClient
virtual QWidget *createDialog(QWidget *parent);
virtual QString getTitleDialog() const
{
return tr("Texture grouped dialog");
}
virtual bool modifyGradient(TAction, uint index);
virtual void displayValue(uint index, QListWidgetItem *item);
virtual void setCurrentIndex(uint index);

Loading…
Cancel
Save