VPTissue Reference Manual
EditorActions.h
Go to the documentation of this file.
1 #ifndef SIMPT_EDITOR_EDITOR_ACTIONS_H_INCLUDED
2 #define SIMPT_EDITOR_EDITOR_ACTIONS_H_INCLUDED
3 /*
4  * Copyright 2011-2016 Universiteit Antwerpen
5  *
6  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
7  * the European Commission - subsequent versions of the EUPL (the "Licence");
8  * You may not use this work except in compliance with the Licence.
9  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the Licence is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the Licence for the specific language governing
15  * permissions and limitations under the Licence.
16  */
22 #include <QMenuBar>
23 
24 namespace SimPT_Editor {
25 
26 class PTreePanels;
27 class TissueGraphicsView;
28 class TissueEditor;
29 class UndoStack;
30 
31 
35 class EditorActions : public QMenuBar
36 {
37  Q_OBJECT
38 public:
47  PTreePanels* panels, UndoStack* undoStack);
48 
50  virtual ~EditorActions();
51 
53  void FixToggle();
54 
56  void Show(bool visible);
57 
58 public slots:
60  void LeafOpened();
61 
63  void LeafClosed();
64 
66  void ModeChanged();
67 
69  void Modified();
70 
72  void ItemsSelected(unsigned int count);
73 
74 private:
76  void Initialize();
77 
78 private:
79  // Project pull down menu
80  QAction* m_new_tissue;
81  QAction* m_open_tissue;
82  QAction* m_save_tissue;
83  QAction* m_close_tissue;
84  QAction* m_quit;
85 
86  // Selection modes
87  QAction* m_display_mode;
88  QAction* m_node_mode;
89  QAction* m_edge_mode;
90  QAction* m_cell_mode;
91 
92  // Edit pull down menu.
93  QAction* m_delete_item;
94  QAction* m_split_edge;
95  QAction* m_split_cell;
96  QAction* m_create_cell;
97  QAction* m_copy_attributes;
98  QAction* m_find_and_select;
99 
100  QAction* m_undo;
101  QAction* m_redo;
102 
103  // View pull down menu.
104  QAction* m_show_attribute_panel;
105  QAction* m_show_geometric_panel;
106  QAction* m_show_parameters_panel;
107  QAction* m_transparent_cells;
108  QAction* m_set_display_mode;
109  QAction* m_set_background;
110 
111  QAction* m_cancel;
112 
113  // Pull down menus.
114  QMenu* m_menu_project;
115  QMenu* m_menu_edit;
116  QMenu* m_menu_view;
117 
118  // Views.
119  TissueEditor* m_parent;
120  TissueGraphicsView* m_view;
121  PTreePanels* m_panels;
122  UndoStack* m_undo_stack;
123 };
124 
125 } // namespace
126 
127 #endif // end_of_include_guard
see the online Qt documentation
Namespace for SimPT tissue editor package.
Definition: Cell.h:32
The graphical view on the tissue.
void FixToggle()
Fix the toggles of the modes.
void ModeChanged()
The mode has been changed.
EditorActions(TissueEditor *parent, TissueGraphicsView *view, PTreePanels *panels, UndoStack *undoStack)
Constructor.
Main GUI class for cell editor.
Definition: TissueEditor.h:42
void Show(bool visible)
Show or hide the menubar.
see the online Qt documentation
Undo Stack for actions performed on a tissue.
Definition: UndoStack.h:31
Manages the attribute and geometric ptree panel for a given tissue.
Definition: PTreePanels.h:35
void ItemsSelected(unsigned int count)
Number of items that were selected.
virtual ~EditorActions()
Destructor.
void LeafOpened()
A tissue has been opened.
void LeafClosed()
The tissue has been closed.
The actions in the menu bar of the workspace.
Definition: EditorActions.h:35
void Modified()
The tissue has been modified.