remove optional in plugin

This commit is contained in:
Lingjie Zhu 2018-12-06 14:08:23 +08:00
parent dad6a07e00
commit 27bcc29060
2 changed files with 59 additions and 64 deletions

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>654</width> <width>717</width>
<height>360</height> <height>356</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -64,74 +64,27 @@
</item> </item>
<item> <item>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="3" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>#Relaxations</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QSpinBox" name="nb_relaxations">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum>
</property>
<property name="value">
<number>5</number>
</property>
</widget>
</item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QCheckBox" name="cb_error_drop"> <widget class="QLabel" name="label_9">
<property name="toolTip">
<string/>
</property>
<property name="text"> <property name="text">
<string>Error drop</string> <string>Error drop</string>
</property> </property>
<property name="autoExclusive">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QDoubleSpinBox" name="error_drop">
<property name="enabled">
<bool>false</bool>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum>
</property>
<property name="decimals">
<number>4</number>
</property>
<property name="minimum">
<double>0.000100000000000</double>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
<property name="value">
<double>0.010000000000000</double>
</property>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QCheckBox" name="cb_nb_proxies"> <widget class="QLabel" name="label_8">
<property name="text"> <property name="text">
<string>#Proxies</string> <string>#Proxies</string>
</property> </property>
<property name="checked"> </widget>
<bool>true</bool> </item>
</property> <item row="3" column="0">
<property name="autoExclusive"> <widget class="QLabel" name="label_2">
<bool>true</bool> <property name="text">
<string>#Relaxations</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -164,6 +117,50 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="2" column="2">
<widget class="QDoubleSpinBox" name="error_drop">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Negative value is ignored</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum>
</property>
<property name="decimals">
<number>4</number>
</property>
<property name="minimum">
<double>-1.000000000000000</double>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
<property name="value">
<double>-1.000000000000000</double>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QSpinBox" name="nb_relaxations">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum>
</property>
<property name="value">
<number>5</number>
</property>
</widget>
</item>
<item row="4" column="0"> <item row="4" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">

View File

@ -299,10 +299,8 @@ void Polyhedron_demo_surface_mesh_approximation_plugin::on_buttonSeeding_clicked
time.start(); time.start();
approx.initialize_seeds(CGAL::parameters::seeding_method( approx.initialize_seeds(CGAL::parameters::seeding_method(
static_cast<VSA::Seeding_method>(ui_widget.comboMethod->currentIndex())) static_cast<VSA::Seeding_method>(ui_widget.comboMethod->currentIndex()))
.max_number_of_proxies((ui_widget.cb_nb_proxies->isChecked() ? .max_number_of_proxies(ui_widget.nb_proxies->value())
boost::optional<std::size_t>(ui_widget.nb_proxies->value()) : boost::none)) .min_error_drop(ui_widget.error_drop->value())
.min_error_drop((ui_widget.cb_error_drop->isChecked() ?
boost::optional<EPICK::FT>(ui_widget.error_drop->value()) : boost::none))
.number_of_relaxations(ui_widget.nb_relaxations->value())); .number_of_relaxations(ui_widget.nb_relaxations->value()));
approx.run(ui_widget.nb_iterations->value()); approx.run(ui_widget.nb_iterations->value());