This commit is contained in:
Mathieu Letrone
2020-05-07 11:20:12 +02:00
parent 6408e6b32c
commit 30e7108f83
3 changed files with 24 additions and 14 deletions
+13 -6
View File
@@ -6,13 +6,20 @@ QuantiDialog::QuantiDialog(QWidget* parent)
: QDialog(parent)
, Ui::QuantiDialog()
{
setupUi(this);
//connect(area_quanti, static_cast<void(QSpinBox::*)(double)>(&QSpinBox::valueChanged), this, SLOT(QuantiDialog::updateLabe()));
//connect(area_quanti, SIGNAL(valueChanged(int)), this, &QuantiDialog::updateLabelValue);
//connect(area_quanti, static_cast<void(QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged), this, &QuantiDialog::updateLabelValue);
connect(area_quanti, static_cast<void(QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged), this, &QuantiDialog::updateLabelValues);
}
/*
Method applied after entering a value in RGB text fields
*/
void QuantiDialog::updateLabelValues()
{
nb_color_label->setText(QString::fromStdString(std::to_string(static_cast<int>(pow(area_quanti->value(), 3)))));
}