summaryrefslogtreecommitdiff
path: root/src/GudhUI/gui/MainWindow.h
diff options
context:
space:
mode:
authorsalinasd <salinasd@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-01-27 10:20:13 +0000
committersalinasd <salinasd@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-01-27 10:20:13 +0000
commitf527cde6342c5b8109a20f0a6b483327c6569844 (patch)
tree1c0464b56b21ef7767f814b9a35a6e5c68aa7613 /src/GudhUI/gui/MainWindow.h
parentdf6c26bdcb28805e8949d08dad5acd012e91ecb8 (diff)
Merge GudhUI, a UI for gudhi based on Qt
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@427 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 17fedd974f14a8225b27d94361e835964eeb5cba
Diffstat (limited to 'src/GudhUI/gui/MainWindow.h')
-rw-r--r--src/GudhUI/gui/MainWindow.h97
1 files changed, 97 insertions, 0 deletions
diff --git a/src/GudhUI/gui/MainWindow.h b/src/GudhUI/gui/MainWindow.h
new file mode 100644
index 00000000..0eef29ed
--- /dev/null
+++ b/src/GudhUI/gui/MainWindow.h
@@ -0,0 +1,97 @@
+#ifndef MAIN_WINDOW_H
+#define MAIN_WINDOW_H
+
+
+#include <QMainWindow>
+#include "ui_main_window.h"
+#include "model/Model.h"
+#include "view/Viewer_instructor.h"
+
+
+class Menu_k_nearest_neighbors;
+class Menu_uniform_neighbors;
+class Menu_edge_contraction;
+class Menu_persistence;
+
+class MainWindow : public QMainWindow,public Ui::MainWindow{
+ Q_OBJECT
+
+private:
+ Model model_;
+ Viewer_instructor* viewer_instructor_;
+ Menu_k_nearest_neighbors* menu_k_nearest_neighbors_;
+ Menu_uniform_neighbors* menu_uniform_neighbors_;
+ Menu_edge_contraction* menu_edge_contraction_;
+ Menu_persistence* menu_persistence_;
+
+public:
+ MainWindow(QWidget* parent = 0);
+ void connectActions();
+
+ /**
+ * compute the bounding box and calls update view
+ */
+ void init_view() const;
+ void update_view() const;
+
+
+protected:
+ void closeEvent(QCloseEvent *event);
+ void keyPressEvent(QKeyEvent *event){}
+
+public:
+
+ public slots:
+
+
+ /**
+ * open a file chooser to choose an off to load
+ */
+ void off_file_open();
+
+ void off_points_open();
+
+ /**
+ * open a file chooser to choose an off to save
+ */
+ void off_file_save();
+ void off_points_save();
+
+ void show_graph_stats();
+ void show_complex_stats();
+ void show_complex_dimension();
+
+
+ void build_rips_menu();
+ void build_rips(double alpha);
+ void build_k_nearest_neighbors_menu();
+ void build_k_nearest_neighbors(unsigned k);
+
+
+ void contract_edge_menu();
+ void contract_edges(unsigned num_collapses);
+
+
+ void collapse_vertices();
+ void collapse_edges();
+
+
+ void uniform_noise();
+ void lloyd();
+
+ void show_homology_group();
+ void show_euler_characteristic();
+ void persistence_menu();
+ void compute_persistence(int p,double threshold,int max_dim,double min_pers);
+
+
+
+public:
+ signals:
+ void sceneChanged() const;
+
+
+};
+
+
+#endif