mirror of https://github.com/CGAL/cgal
Dialog: remove Discard + Improve "Min mass"
This commit is contained in:
parent
e0e97f3b1d
commit
c4781ac645
|
|
@ -18,6 +18,9 @@
|
||||||
<layout class="QGridLayout">
|
<layout class="QGridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QVBoxLayout">
|
<layout class="QVBoxLayout">
|
||||||
|
<property name="sizeConstraint">
|
||||||
|
<enum>QLayout::SetDefaultConstraint</enum>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="GlViewer" name="viewer" native="true">
|
<widget class="GlViewer" name="viewer" native="true">
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
|
|
@ -29,47 +32,32 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Min. mass</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSlider" name="min_mass_slider">
|
<widget class="QSlider" name="min_mass_slider">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="tickPosition">
|
||||||
</item>
|
<enum>QSlider::TicksBelow</enum>
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout">
|
|
||||||
<item>
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="tickInterval">
|
||||||
<size>
|
<number>10</number>
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Discard</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QSpinBox" name="discard_spinbox">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>10000</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
@ -648,10 +636,6 @@
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
|
||||||
<tabstop>min_mass_slider</tabstop>
|
|
||||||
<tabstop>discard_spinbox</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources>
|
<resources>
|
||||||
<include location="pwsrec.qrc"/>
|
<include location="pwsrec.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
||||||
|
|
@ -120,10 +120,6 @@ public:
|
||||||
m_min_mass = min_value;
|
m_min_mass = min_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_nb_edges_to_ignore(int nb) {
|
|
||||||
m_ignore = nb;
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_percentage(double percentage) {
|
void set_percentage(double percentage) {
|
||||||
m_percentage = percentage;
|
m_percentage = percentage;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ maxNumRecentFiles(15), recentFileActs(15)
|
||||||
addRecentFiles(menuFile, actionQuit);
|
addRecentFiles(menuFile, actionQuit);
|
||||||
connect(actionQuit, SIGNAL(triggered()), this, SLOT(close()));
|
connect(actionQuit, SIGNAL(triggered()), this, SLOT(close()));
|
||||||
connect(min_mass_slider, SIGNAL(valueChanged(int)), this, SLOT(update()));
|
connect(min_mass_slider, SIGNAL(valueChanged(int)), this, SLOT(update()));
|
||||||
connect(discard_spinbox, SIGNAL(valueChanged(int)), this, SLOT(update()));
|
|
||||||
connect(this, SIGNAL(openRecentFile(QString)), this, SLOT(open(QString)));
|
connect(this, SIGNAL(openRecentFile(QString)), this, SLOT(open(QString)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -154,7 +153,6 @@ void MainWindow::save(const QString& filename)
|
||||||
void MainWindow::update()
|
void MainWindow::update()
|
||||||
{
|
{
|
||||||
m_scene->set_min_mass(min_mass());
|
m_scene->set_min_mass(min_mass());
|
||||||
m_scene->set_nb_edges_to_ignore(ignore_edges());
|
|
||||||
m_scene->set_percentage(percentage());
|
m_scene->set_percentage(percentage());
|
||||||
viewer->repaint();
|
viewer->repaint();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,11 +56,6 @@ public:
|
||||||
return value / max_value;
|
return value / max_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ignore_edges() const
|
|
||||||
{
|
|
||||||
return discard_spinbox->value();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Q_SLOTS:
|
protected Q_SLOTS:
|
||||||
// drag and drop
|
// drag and drop
|
||||||
void dropEvent(QDropEvent *event);
|
void dropEvent(QDropEvent *event);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue