SpectMorph
smmorphplanwindow.hh
1 // Licensed GNU LGPL v3 or later: http://www.gnu.org/licenses/lgpl.html
2 
3 #ifndef SPECTMORPH_MORPH_PLAN_WINDOW_HH
4 #define SPECTMORPH_MORPH_PLAN_WINDOW_HH
5 
6 #include <assert.h>
7 #include <sys/time.h>
8 
9 #include <vector>
10 #include <string>
11 
12 #include "smmain.hh"
13 #include "smmorphplan.hh"
14 #include "smmorphsource.hh"
15 #include "smmorphplanview.hh"
16 #include "smmorphoperator.hh"
17 
18 #include <QWidget>
19 #include <QMainWindow>
20 #include <QMessageBox>
21 #include <QScrollArea>
22 
23 namespace SpectMorph
24 {
25 
26 class MorphPlanWindow : public QMainWindow
27 {
28  Q_OBJECT
29 
30  std::string m_filename;
31  std::string win_title;
32  MorphPlanPtr m_morph_plan;
33  MorphPlanView *morph_plan_view;
34  QScrollArea *scroll_area;
35 
36  void add_op_action (QMenu *menu, const char *title, const char *type);
37  void fill_template_menu (QMenu *menu);
38  void update_window_title();
39  bool load (const std::string& filename);
40 
41 public:
42  MorphPlanWindow (MorphPlanPtr morph_plan, const std::string& title);
43 
44  MorphOperator *where (MorphOperator *op, const QPoint& pos);
45  void add_control_widget (QWidget *widget);
46  void set_filename (const std::string& filename);
47 
48 public slots:
49  void on_file_import_clicked();
50  void on_file_export_clicked();
51  void on_load_index_clicked();
52  void on_add_operator();
53  void on_load_template();
54  void on_need_resize();
55  void on_update_window_size();
56 
57 signals:
58  void update_size();
59 };
60 
61 }
62 
63 #endif
Definition: smmorphplanwindow.hh:26
Definition: smmorphoperator.hh:19
Definition: smmorphplanview.hh:16
Definition: smalignedarray.cc:7