ccAlignDlg::ccAlignDlg(ccGenericPointCloud *data, ccGenericPointCloud *model, QWidget* parent) : QDialog(parent), Ui::AlignDialog() { setupUi(this); setWindowFlags(Qt::Tool); samplingMethod->addItem("None"); samplingMethod->addItem("Random"); samplingMethod->addItem("Space"); samplingMethod->addItem("Octree"); samplingMethod->setCurrentIndex(NONE); QColor qRed(255,0,0); QColor qYellow(255,255,0); ccDisplayOptionsDlg::SetButtonColor(dataColorButton,qRed); ccDisplayOptionsDlg::SetButtonColor(modelColorButton,qYellow); dataObject = data; modelObject = model; setColorsAndLabels(); changeSamplingMethod(samplingMethod->currentIndex()); toggleNbMaxCandidates(isNbCandLimited->isChecked()); connect(swapButton, SIGNAL(clicked()), this, SLOT(swapModelAndData())); connect(modelSample, SIGNAL(sliderReleased()), this, SLOT(modelSliderReleased())); connect(dataSample, SIGNAL(sliderReleased()), this, SLOT(dataSliderReleased())); connect(modelSamplingRate, SIGNAL(valueChanged(double)), this, SLOT(modelSamplingRateChanged(double))); connect(dataSamplingRate, SIGNAL(valueChanged(double)), this, SLOT(dataSamplingRateChanged(double))); connect(deltaEstimation, SIGNAL(clicked()), this, SLOT(estimateDelta())); connect(samplingMethod, SIGNAL(currentIndexChanged(int)), this, SLOT(changeSamplingMethod(int))); connect(isNbCandLimited, SIGNAL(toggled(bool)), this, SLOT(toggleNbMaxCandidates(bool))); }
ccOrderChoiceDlg::ccOrderChoiceDlg( ccHObject* firstEntity, const char* firstRole, ccHObject* secondEntity, const char* secondRole, QWidget* parent/*=0*/) : QDialog(parent) , Ui::RoleChoiceDialog() { setupUi(this); setWindowFlags(Qt::Tool); connect(swapButton, SIGNAL(clicked()), this, SLOT(swap())); firstlabel->setText(firstRole); secondlabel->setText(secondRole); QColor qRed(255,0,0); QColor qYellow(255,255,0); ccDisplayOptionsDlg::SetButtonColor(firstColorButton,qRed); ccDisplayOptionsDlg::SetButtonColor(secondColorButton,qYellow); firstEnt=firstEntity; secondEnt=secondEntity; originalOrder=true; setColorsAndLabels(); }
ccRegistrationDlg::ccRegistrationDlg(ccHObject *data, ccHObject *model, QWidget* parent/*=0*/) : QDialog(parent) , Ui::RegistrationDialog() { assert(data && model); dataEntity = data; modelEntity = model; setupUi(this); errorDifferenceLineEdit->setValidator(new QDoubleValidator(errorDifferenceLineEdit)); setWindowFlags(Qt::Tool); setColorsAndLabels(); QColor qRed(255,0,0); QColor qYellow(255,255,0); ccDisplayOptionsDlg::SetButtonColor(dataColorButton,qRed); ccDisplayOptionsDlg::SetButtonColor(modelColorButton,qYellow); //restore semi-persistent settings adjustScaleCheckBox->setChecked(s_adjustScale); randomSamplingLimitSpinBox->setValue(s_randomSamplingLimit); errorDifferenceLineEdit->setText(QString::number(s_errorDifference,'e',3)); connect(swapButton, SIGNAL(clicked()), this, SLOT(swapModelAndData())); }
ccOrderChoiceDlg::ccOrderChoiceDlg( ccHObject* firstEntity, QString firstRole, ccHObject* secondEntity, QString secondRole, ccMainAppInterface* app/*=0*/) : QDialog(app ? app->getMainWindow() : 0, Qt::Tool) , m_gui(new Ui_RoleChoiceDialog) , m_app(app) , m_firstEnt(firstEntity) , m_secondEnt(secondEntity) , m_useInputOrder(true) { m_gui->setupUi(this); connect(m_gui->swapButton, SIGNAL(clicked()), this, SLOT(swap())); m_gui->firstlabel->setText(firstRole); m_gui->secondlabel->setText(secondRole); QColor qRed(255,0,0); QColor qYellow(255,255,0); ccQtHelpers::SetButtonColor(m_gui->firstColorButton,qRed); ccQtHelpers::SetButtonColor(m_gui->secondColorButton,qYellow); setColorsAndLabels(); }
//SLOTS void ccAlignDlg::swapModelAndData() { std::swap(dataObject,modelObject); setColorsAndLabels(); changeSamplingMethod(samplingMethod->currentIndex()); }
void ccOrderChoiceDlg::swap() { originalOrder = !originalOrder; setColorsAndLabels(); }
void ccRegistrationDlg::swapModelAndData() { std::swap(dataEntity,modelEntity); setColorsAndLabels(); }
void ccOrderChoiceDlg::swap() { m_useInputOrder = !m_useInputOrder; setColorsAndLabels(); }