Massive cleaning

This commit is contained in:
Daniel Girardeau-Montaut
2020-09-13 15:47:24 +02:00
parent 9f11ec661c
commit d076705431
17 changed files with 756 additions and 692 deletions
+20 -10
View File
@@ -1,25 +1,35 @@
#include "QuantiDialog.h"
#include<cmath>
#include <QVariant>
//##########################################################################
//# #
//# CLOUDCOMPARE PLUGIN: ColorimetricSegmenter #
//# #
//# This program is free software; you can redistribute it and/or modify #
//# it under the terms of the GNU General Public License as published by #
//# the Free Software Foundation; version 2 of the License. #
//# #
//# This program is distributed in the hope that it will be useful, #
//# but WITHOUT ANY WARRANTY; without even the implied warranty of #
//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
//# GNU General Public License for more details. #
//# #
//# COPYRIGHT: Tri-Thien TRUONG, Ronan COLLIER, Mathieu LETRONE #
//# #
//##########################################################################
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::updateLabelValues);
connect(area_quanti, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::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)))));
int value = area_quanti->value();
nb_color_label->setText(QString::number(value*value*value));
}