Skip to content

Commit

Permalink
signals for sliders changed back to sliderMoved()
Browse files Browse the repository at this point in the history
  • Loading branch information
buddhi1980 committed Jun 28, 2016
1 parent 8aff217 commit b547932
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions mandelbulber2/src/automated_widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,9 @@ void cAutomatedWidgets::slotLogVect3Changed(const QString &text)
}
}

//NOTE: there are used sliderMoved() signals instead of valueChangd(), because valueChanged()
//caused problems with editing values in edit fields and spinboxes.

// automatic setting of event slots for all sliders
void cAutomatedWidgets::ConnectSignalsForSlidersInWindow(QWidget *window)
{
Expand All @@ -454,7 +457,7 @@ void cAutomatedWidgets::ConnectSignalsForSlidersInWindow(QWidget *window)

if (type == QString("slider"))
{
QApplication::connect(slider, SIGNAL(valueChanged(int)), this, SLOT(slotSliderMoved(int)));
QApplication::connect(slider, SIGNAL(sliderMoved(int)), this, SLOT(slotSliderMoved(int)));

QString spinBoxName = QString("spinbox_") + parameterName;
QDoubleSpinBox *spinBox = slider->parent()->findChild<QDoubleSpinBox *>(spinBoxName);
Expand All @@ -472,7 +475,7 @@ void cAutomatedWidgets::ConnectSignalsForSlidersInWindow(QWidget *window)
if (type == QString("logslider"))
{
QApplication::connect(
slider, SIGNAL(valueChanged(int)), this, SLOT(slotLogSliderMoved(int)));
slider, SIGNAL(sliderMoved(int)), this, SLOT(slotLogSliderMoved(int)));

QString editFieldName = QString("logedit_") + parameterName;
QLineEdit *lineEdit = slider->parent()->findChild<QLineEdit *>(editFieldName);
Expand All @@ -490,7 +493,7 @@ void cAutomatedWidgets::ConnectSignalsForSlidersInWindow(QWidget *window)
if (type == QString("logslidervect3"))
{
QApplication::connect(
slider, SIGNAL(valueChanged(int)), this, SLOT(slotLogSliderVect3Moved(int)));
slider, SIGNAL(sliderMoved(int)), this, SLOT(slotLogSliderVect3Moved(int)));

QString editFieldName = QString("logvect3_") + parameterName;
QLineEdit *lineEdit = slider->parent()->findChild<QLineEdit *>(editFieldName);
Expand All @@ -508,7 +511,7 @@ void cAutomatedWidgets::ConnectSignalsForSlidersInWindow(QWidget *window)
if (type == QString("sliderInt"))
{
QApplication::connect(
slider, SIGNAL(valueChanged(int)), this, SLOT(slotIntSliderMoved(int)));
slider, SIGNAL(sliderMoved(int)), this, SLOT(slotIntSliderMoved(int)));

QString spinboxName = QString("spinboxInt_") + parameterName;
QSpinBox *spinbox = slider->parent()->findChild<QSpinBox *>(spinboxName);
Expand All @@ -525,7 +528,7 @@ void cAutomatedWidgets::ConnectSignalsForSlidersInWindow(QWidget *window)
}
if (type == QString("slider3"))
{
QApplication::connect(slider, SIGNAL(valueChanged(int)), this, SLOT(slotSlider3Moved(int)));
QApplication::connect(slider, SIGNAL(sliderMoved(int)), this, SLOT(slotSlider3Moved(int)));
QString spinboxName = QString("spinbox3_") + parameterName;
QDoubleSpinBox *spinbox = slider->parent()->findChild<QDoubleSpinBox *>(spinboxName);
if (spinbox)
Expand Down Expand Up @@ -571,7 +574,7 @@ void cAutomatedWidgets::ConnectSignalsForSlidersInWindow(QWidget *window)

if (type == QString("dial3"))
{
QApplication::connect(dial, SIGNAL(valueChanged(int)), this, SLOT(slotDial3Moved(int)));
QApplication::connect(dial, SIGNAL(sliderMoved(int)), this, SLOT(slotDial3Moved(int)));

QString spinBoxName = QString("spinboxd3_") + parameterName;
QDoubleSpinBox *spinBox = dial->parent()->findChild<QDoubleSpinBox *>(spinBoxName);
Expand All @@ -588,7 +591,7 @@ void cAutomatedWidgets::ConnectSignalsForSlidersInWindow(QWidget *window)
}
if (type == QString("dial4"))
{
QApplication::connect(dial, SIGNAL(valueChanged(int)), this, SLOT(slotDial4Moved(int)));
QApplication::connect(dial, SIGNAL(sliderMoved(int)), this, SLOT(slotDial4Moved(int)));

QString spinBoxName = QString("spinboxd4_") + parameterName;
QDoubleSpinBox *spinBox = dial->parent()->findChild<QDoubleSpinBox *>(spinBoxName);
Expand All @@ -605,7 +608,7 @@ void cAutomatedWidgets::ConnectSignalsForSlidersInWindow(QWidget *window)
}
if (type == QString("dial"))
{
QApplication::connect(dial, SIGNAL(valueChanged(int)), this, SLOT(slotDialMoved(int)));
QApplication::connect(dial, SIGNAL(sliderMoved(int)), this, SLOT(slotDialMoved(int)));

QString spinBoxName = QString("spinboxd_") + parameterName;
QDoubleSpinBox *spinBox = dial->parent()->findChild<QDoubleSpinBox *>(spinBoxName);
Expand Down

0 comments on commit b547932

Please sign in to comment.