SpectMorph
smmorphoperatorview.hh
1 // Licensed GNU LGPL v3 or later: http://www.gnu.org/licenses/lgpl.html
2 
3 #ifndef SPECTMORPH_MORPH_OPERATOR_VIEW_HH
4 #define SPECTMORPH_MORPH_OPERATOR_VIEW_HH
5 
6 #include "smmorphplanwindow.hh"
7 
8 #include <QGroupBox>
9 #include <QToolButton>
10 
11 namespace SpectMorph
12 {
13 
14 class MorphOperator;
15 class MorphOperatorView : public QFrame
16 {
17  Q_OBJECT
18 protected:
19  QLabel *head_label;
20  QWidget *body_widget;
21  QMenu *context_menu;
22  QToolButton *fold_button;
23  MorphOperator *m_op;
24  MorphPlanWindow *morph_plan_window;
25  bool remove;
26  bool in_move;
27 
28  void contextMenuEvent (QContextMenuEvent *event);
29  void mousePressEvent (QMouseEvent *event);
30  void mouseMoveEvent (QMouseEvent *event);
31  void mouseReleaseEvent (QMouseEvent *event);
32 
33  void set_body_layout (QLayout *layout);
34  void update_body_visible();
35 
36 public:
37  MorphOperatorView (MorphOperator *op, MorphPlanWindow *morph_plan_window);
38 
39  MorphOperator *op();
40 
41  static MorphOperatorView *create (MorphOperator *op, MorphPlanWindow *window);
42 
43 public slots:
44  void on_operators_changed();
45  void on_rename();
46  void on_remove();
47  void on_fold_clicked();
48 
49 signals:
50  void move_indication (MorphOperator *op);
51  void need_resize();
52 };
53 
54 }
55 
56 #endif
Definition: smmorphplanwindow.hh:26
Definition: smmorphoperator.hh:19
Definition: smalignedarray.cc:7
Definition: smmorphoperatorview.hh:15