MEPP2 Project
DialogCurvature1.cpp
Go to the documentation of this file.
1 // Copyright (c) 2012-2019 University of Lyon and CNRS (France).
2 // All rights reserved.
3 //
4 // This file is part of MEPP2; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published
6 // by the Free Software Foundation; either version 3 of the License,
7 // or (at your option) any later version.
8 //
9 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11 #include "DialogCurvature1.h"
12 #include "ui_DialogCurvature1.h"
15  : BasePluginDialogQt(parent), ui(new Ui::DialogCurvature1)
16 {
17  ui->setupUi(this);
18 
19  ui->verticalLayout->addWidget(helpButton, 0, Qt::AlignRight);
20  QObject::connect( helpButton, SIGNAL(clicked(bool)), this, SLOT(onHelpTriggered()) );
21 
22  // ---
23 
24  link = "https://liris.cnrs.fr/mepp/doc/nightly/_filter_mesh_curvature.html";
25 }
29 void
30 FEVV::DialogCurvature1::setCurvature(bool geod, double radius, bool Cmin_max, bool Dmin_max)
31 {
32  Qt::CheckState state_geod =
33  geod ? Qt::CheckState::Checked : Qt::CheckState::Unchecked;
34  ui->checkBox_geod->setCheckState(state_geod);
35 
36  ui->lineEdit_radius->setText(QString::number(radius));
37 
38  Qt::CheckState state_Cmin_max =
39  Cmin_max ? Qt::CheckState::Checked : Qt::CheckState::Unchecked;
40  ui->checkBox_Cmin_max->setCheckState(state_Cmin_max);
41 
42  Qt::CheckState state_Dmin_max =
43  Dmin_max ? Qt::CheckState::Checked : Qt::CheckState::Unchecked;
44  ui->checkBox_Dmin_max->setCheckState(state_Dmin_max);
45 }
47 void
48 FEVV::DialogCurvature1::getCurvature(bool &geod, double &radius, bool &Cmin_max, bool &Dmin_max)
49 {
50  geod = ui->checkBox_geod->isChecked();
51 
52  radius = ui->lineEdit_radius->text().toDouble();
53 
54  Cmin_max = ui->checkBox_Cmin_max->isChecked();
55 
56  Dmin_max = ui->checkBox_Dmin_max->isChecked();
57 }
FEVV::DialogCurvature1
Definition: DialogCurvature1.h:23
FEVV::DialogCurvature1::onHelpTriggered
void onHelpTriggered()
Definition: DialogCurvature1.h:34
FEVV::DialogCurvature1::ui
Ui::DialogCurvature1 * ui
Definition: DialogCurvature1.h:37
FEVV::BasePluginDialogQt::helpButton
QPushButton * helpButton
Definition: BasePluginDialogQt.h:61
FEVV::BasePluginDialogQt::link
QString link
Definition: BasePluginDialogQt.h:63
FEVV::DialogCurvature1::DialogCurvature1
DialogCurvature1(QWidget *parent=0)
Definition: DialogCurvature1.cpp:14
FEVV::DialogCurvature1::~DialogCurvature1
~DialogCurvature1()
Definition: DialogCurvature1.cpp:27
Ui
Definition: DialogBooleanOperations1.h:17
FEVV::DialogCurvature1::getCurvature
void getCurvature(bool &geod, double &radius, bool &Cmin_max, bool &Dmin_max)
Definition: DialogCurvature1.cpp:48
FEVV::BasePluginDialogQt
This class is intended to provide a help message to plugins dialogs.
Definition: BasePluginDialogQt.h:29
FEVV::DialogCurvature1::setCurvature
void setCurvature(bool geod, double radius, bool Cmin_max, bool Dmin_max)
Definition: DialogCurvature1.cpp:30
DialogCurvature1.h