Commit 72a30e6f authored by Jan Möbius's avatar Jan Möbius

Dennis: Activate checkbox on value change

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7025 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 734d4372
......@@ -84,6 +84,11 @@ bool DecimaterPlugin::initializeToolbox(QWidget*& _widget)
connect(tool_->roundness,SIGNAL(valueChanged(double) ),this,SLOT(updateRoundness(double)) );
connect(tool_->roundnessSlider,SIGNAL(valueChanged(int) ),this,SLOT(updateRoundness(int)) );
connect(tool_->distance,SIGNAL(valueChanged(double) ),this,SLOT(updateDistance()) );
connect(tool_->normalDeviation,SIGNAL(valueChanged(int) ),this,SLOT(updateNormalDev()) );
connect(tool_->normalDeviationSlider,SIGNAL(valueChanged(int) ),this,SLOT(updateNormalDev()) );
connect(tool_->verticesCount,SIGNAL(valueChanged(int) ),this,SLOT(updateVertices()) );
connect(tool_->verticesCountSlider,SIGNAL(valueChanged(int) ),this,SLOT(updateVertices()) );
// Force update if the Toolbox gets visible
connect(tool_, SIGNAL(showing()), this, SLOT( slotUpdateNumVertices() ) );
......@@ -111,6 +116,7 @@ void DecimaterPlugin::pluginsInitialized() {
void DecimaterPlugin::updateRoundness(int _value)
{
tool_->roundness->setValue( (double) _value / 100.0 );
tool_->cbRoundness->setChecked (true);
}
......@@ -123,6 +129,7 @@ void DecimaterPlugin::updateRoundness(int _value)
void DecimaterPlugin::updateRoundness(double _value)
{
tool_->roundnessSlider->setValue( (int) (_value * 100) );
tool_->cbRoundness->setChecked (true);
}
//-----------------------------------------------------------------------------
......@@ -347,5 +354,29 @@ void DecimaterPlugin::slotObjectUpdated(int /*_identifier*/)
//-----------------------------------------------------------------------------
// activate checkbox if value has changed
void DecimaterPlugin::updateVertices()
{
tool_->cbVertices->setChecked (true);
}
//-----------------------------------------------------------------------------
// activate checkbox if value has changed
void DecimaterPlugin::updateNormalDev()
{
tool_->cbNormalDev->setChecked (true);
}
//-----------------------------------------------------------------------------
// activate checkbox if value has changed
void DecimaterPlugin::updateDistance()
{
tool_->cbDistance->setChecked (true);
}
//-----------------------------------------------------------------------------
Q_EXPORT_PLUGIN2(DecimaterPlugin , DecimaterPlugin );
......@@ -130,6 +130,11 @@ private slots:
void updateRoundness(int _value);
void updateRoundness(double _value);
/// slider / spinbox updates
void updateDistance ();
void updateNormalDev ();
void updateVertices ();
/// update number of vertices information
void slotUpdateNumVertices();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment