summaryrefslogtreecommitdiff
path: root/src/GudhUI/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/GudhUI/gui')
-rw-r--r--src/GudhUI/gui/MainWindow.cpp12
-rw-r--r--src/GudhUI/gui/MainWindow.h2
-rw-r--r--src/GudhUI/gui/UniformNeighborsMenu.ui5
-rw-r--r--src/GudhUI/gui/main_window.ui18
4 files changed, 33 insertions, 4 deletions
diff --git a/src/GudhUI/gui/MainWindow.cpp b/src/GudhUI/gui/MainWindow.cpp
index f1dd8e83..f5abfffc 100644
--- a/src/GudhUI/gui/MainWindow.cpp
+++ b/src/GudhUI/gui/MainWindow.cpp
@@ -96,8 +96,8 @@ MainWindow::connectActions(){
SLOT(show_euler_characteristic()));
QObject::connect(this->actionPersistence, SIGNAL(triggered()), this,
SLOT(persistence_menu()));
-
-
+ QObject::connect(this->actionEstimate_topological_changes, SIGNAL(triggered()), this,
+ SLOT(critical_points_menu()));
QObject::connect(this, SIGNAL(sceneChanged()), this->viewer_instructor_,
SLOT(sceneChanged()));
@@ -278,6 +278,14 @@ MainWindow::compute_persistence(int p,double threshold,int max_dim,double min_pe
model_.show_persistence(p,threshold,max_dim,min_pers);
}
+void
+MainWindow::critical_points_menu(){
+ bool ok;
+ double max_length = QInputDialog::getDouble(this, tr("Maximal edge length for the Rips"),
+ tr("Maximal edge length:"), 0, 0, 10000, 3, &ok);
+ if (ok)
+ model_.show_critical_points(max_length);
+}
#include "MainWindow.moc"
diff --git a/src/GudhUI/gui/MainWindow.h b/src/GudhUI/gui/MainWindow.h
index 0eef29ed..506a1f3a 100644
--- a/src/GudhUI/gui/MainWindow.h
+++ b/src/GudhUI/gui/MainWindow.h
@@ -83,7 +83,7 @@ public:
void show_euler_characteristic();
void persistence_menu();
void compute_persistence(int p,double threshold,int max_dim,double min_pers);
-
+ void critical_points_menu();
public:
diff --git a/src/GudhUI/gui/UniformNeighborsMenu.ui b/src/GudhUI/gui/UniformNeighborsMenu.ui
index 1f7cf980..f8ef7a24 100644
--- a/src/GudhUI/gui/UniformNeighborsMenu.ui
+++ b/src/GudhUI/gui/UniformNeighborsMenu.ui
@@ -34,7 +34,7 @@
<rect>
<x>30</x>
<y>10</y>
- <width>249</width>
+ <width>262</width>
<height>84</height>
</rect>
</property>
@@ -72,6 +72,9 @@
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBoxAlpha">
+ <property name="decimals">
+ <number>3</number>
+ </property>
<property name="maximum">
<double>100000000.000000000000000</double>
</property>
diff --git a/src/GudhUI/gui/main_window.ui b/src/GudhUI/gui/main_window.ui
index ac3caf41..8a7ad7da 100644
--- a/src/GudhUI/gui/main_window.ui
+++ b/src/GudhUI/gui/main_window.ui
@@ -89,6 +89,7 @@
<addaction name="actionEuler_characteristic"/>
<addaction name="actionShow_homology_group"/>
<addaction name="actionPersistence"/>
+ <addaction name="actionEstimate_topological_changes"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuPoints"/>
@@ -209,15 +210,32 @@
</property>
</action>
<action name="actionEuler_characteristic">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
<property name="text">
<string>Euler characteristic</string>
</property>
+ <property name="visible">
+ <bool>true</bool>
+ </property>
</action>
<action name="actionHomology_groups">
<property name="text">
<string>Homology groups</string>
</property>
</action>
+ <action name="actionEstimate_topological_changes">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Rips critical points approximation</string>
+ </property>
+ <property name="visible">
+ <bool>false</bool>
+ </property>
+ </action>
</widget>
<customwidgets>
<customwidget>