C++ main module for gpm Package  1.0
GPMG_MainWindow.h
Go to the documentation of this file.
1 #ifndef GPMG_MainWindow_H
2 #define GPMG_MainWindow_H
3 
4 #include "GUI_RootWindow.h"
5 
6 #include "GPMG_ShowGraphWindow.h"
7 #include "GPMG_VertexWindow.h"
8 #include "GPMG_EdgeWindow.h"
10 #include "GPMG_GraphStateWindow.h"
11 #include "GPMG_RulesWindow.h"
12 #include "GPMG_RunWindow.h"
13 #include "GPMG_RuleGraphWindow.h"
14 #include "GPMG_MovieGraphWindow.h"
15 
22 class GPMG_MainWindow : public GUI_RootWindow {
23 
24  SP_OBJECT(GPMG_MainWindow);
25  // ATTRIBUTES
26 private:
27 
28  /* \brief windows name
29  */
30  static const tString GRAPH_WINDOW_NAME;
31  static const tString RULE_GRAPHS_WINDOW_NAME;
32  static const tString RULES_WINDOW_NAME;
33  static const tString RUN_WINDOW_NAME;
34  static const tString VERTEX_WINDOW_NAME;
35  static const tString EDGE_WINDOW_NAME;
36  static const tString ENVIRONMENT_WINDOW_NAME;
37  static const tString GRAPH_STATE_WINDOW_NAME;
38  static const tString MOVIE_WINDOW_NAME;
39 
40 
41 protected:
42  // METHODS
43 
44  // CONSTRUCTORS
45 
47 
48 
49 
50  // DESTRUCTORS
51 
52 
55  virtual ~GPMG_MainWindow(void);
56 
57 public:
58 
59  // NEW Methods
60 
61  static SP::GPMG_MainWindow New() {
62  return New("");
63  };
64 
65  static SP::GPMG_MainWindow New(const tString& name) {
66  SP::GPMG_MainWindow win(new GPMG_MainWindow(),
67  GPMG_MainWindow::Delete());
68  win->setThis(win);
69  win->setName(name);
70  return win;
71  };
75  static SP::GPMG_MainWindow NewInstanceFromFile(const tString& file);
76 
77 
78  virtual void toDoAfterThisSetting() {
79  GUI_RootWindow::toDoAfterThisSetting();
80  createComponents();
81  };
82  // SET methods
83 
84  // GET methods
85 
95 
99 
109 
116 
131  tBoolean isRunWindowShown() const;
135 
138  tBoolean isEdgeWindowShown() const;
145 
146 
147 
148  // OTHERS methods
149 
150 public:
153  virtual void load(const tString& file);
154 
155 
156 
160  void showGraphWindow();
164  void showMovieGraphWindow();
172  void showVertexWindow();
176  void showEdgeWindow();
177 
181  void showEnvironmentWindow();
185  void showGraphStateWindow();
186 
190  void showRulesWindow();
194  void showRunWindow();
195 
199 
200 
201 public:
202 
203 
204 
209  virtual void showAllWindows(const tBoolean& resetLocation);
210 
215  virtual void modalWindowClosed(const tFlag& id,
216  const CORE_Object* value);
217 
220  void showVertex(GPM_Graph *pGraph,GPM_Graph *tGraph,const tFlag& graphType,GPM_Graph *graph,SP::GPM_Vertex vertex,const tBoolean& isReadOnly);
221 
224  void showEdge(GPM_Graph *pGraph,GPM_Graph *tGraph,const tFlag& graphType,GPM_Graph *graph,SP::GPM_Edge edge,const tBoolean& isReadOnly);
227  inline void showGraphElement(GPM_Graph *pGraph,GPM_Graph *tGraph,const tFlag& graphType,GPM_Graph *graph,SP::GPM_GraphElement elt,const tBoolean& isReadOnly) {
228  SP::GPM_Edge edge=dynamic_sp_cast<GPM_Edge>(elt);
229  if (edge.get()!=null) showEdge(pGraph,tGraph,graphType,graph,edge,isReadOnly);
230  else {
231  SP::GPM_Vertex vertex=dynamic_sp_cast<GPM_Vertex>(elt);
232  if (vertex.get()!=null) showVertex(pGraph,tGraph,graphType,graph,vertex,isReadOnly);
233  }
234  }
235 
236 private:
239  void createComponents();
240 
241 
242 
243 };
244 
245 #endif
void showEdgeWindow()
show the edge window
Definition: GPMG_MainWindow.cpp:491
GPMG_MainWindow()
Definition: GPMG_MainWindow.cpp:21
GPMG_EdgeWindow * getEdgeWindow()
get the edge window
Definition: GPMG_MainWindow.cpp:483
void showGraphWindow()
show the graph window
Definition: GPMG_MainWindow.cpp:219
this class describes a window to display run
Definition: GPMG_RunWindow.h:17
static SP::GPMG_MainWindow New(const tString &name)
Definition: GPMG_MainWindow.h:65
tBoolean isGraphWindowShown() const
return true is the graph window is shown
Definition: GPMG_MainWindow.cpp:188
GPMG_RulesWindow * getRulesWindow()
get the rules window
Definition: GPMG_MainWindow.cpp:704
void showRuleGraphsWindow(GPM_ModelFunction *rule)
show the rule graphs window
Definition: GPMG_MainWindow.cpp:353
boost::adjacency_list< boost::listS, boost::vecS, boost::undirectedS, VertexProperties, EdgeProperties > tGraph
Definition: GPM_Types.h:36
tBoolean isMovieGraphWindowShown() const
return true is the movie graph window is shown
Definition: GPMG_MainWindow.cpp:194
virtual void showAllWindows(const tBoolean &resetLocation)
show all windows specialized in order to call updateValues method for the patient window name ...
Definition: GPMG_MainWindow.cpp:66
GPMG_VertexWindow * getVertexWindow()
get the node window
Definition: GPMG_MainWindow.cpp:415
#define tBoolean
Definition: types.h:35
void showEdge(GPM_Graph *pGraph, GPM_Graph *tGraph, const tFlag &graphType, GPM_Graph *graph, SP::GPM_Edge edge, const tBoolean &isReadOnly)
show the edge in a window
Definition: GPMG_MainWindow.cpp:147
GPMG_RunWindow * getRunWindow()
get the run window
Definition: GPMG_MainWindow.cpp:814
This class is the root window of CCE Application.
Definition: GPMG_MainWindow.h:22
tBoolean isGraphStateWindowShown() const
return true is the graph state window is shown
Definition: GPMG_MainWindow.cpp:620
static SP::GPMG_MainWindow NewInstanceFromFile(const tString &file)
create a GPMG_MainWindow from XML file
Definition: GPMG_MainWindow.cpp:31
#define null
Definition: types.h:13
this class describes a window to display environment
Definition: GPMG_GraphStateWindow.h:17
this class describes a window to display environment
Definition: GPMG_EnvironmentWindow.h:19
This class describes a node.
Definition: GPM_Vertex.h:16
this class describes a window to show graph
Definition: GPMG_ShowGraphWindow.h:17
DEFINE_SPTR(GPMG_MainWindow)
void projectEnvironmentHasChanged()
environment of the project has changed
Definition: GPMG_MainWindow.cpp:767
tBoolean isRulesWindowShown() const
return true is the rules window is shown
Definition: GPMG_MainWindow.cpp:696
GPMG_GraphStateWindow * getGraphStateWindow()
get the graph state window
Definition: GPMG_MainWindow.cpp:627
This class describes a edge.
Definition: GPM_Edge.h:15
tBoolean isVertexWindowShown() const
return true is the vertex window is shown
Definition: GPMG_MainWindow.cpp:409
void showRunWindow()
show the run window
Definition: GPMG_MainWindow.cpp:823
void showGraphStateWindow()
show the graph state window
Definition: GPMG_MainWindow.cpp:636
static SP::GPMG_MainWindow New()
Definition: GPMG_MainWindow.h:61
GPMG_ShowGraphWindow * getShowGraphWindow()
get the graph window
Definition: GPMG_MainWindow.cpp:201
tBoolean isEdgeWindowShown() const
return true is the edge window is shown
Definition: GPMG_MainWindow.cpp:477
void showEnvironmentWindow()
show the environment window
Definition: GPMG_MainWindow.cpp:560
virtual ~GPMG_MainWindow(void)
destroy an object.
Definition: GPMG_MainWindow.cpp:26
tBoolean isRuleGraphsWindowShown() const
return true is the rule graphs window is shown
Definition: GPMG_MainWindow.cpp:337
virtual void toDoAfterThisSetting()
Definition: GPMG_MainWindow.h:78
abstract base class for most classes.
Definition: CORE_Object.h:30
virtual void load(const tString &file)
load a config window file
Definition: GPMG_MainWindow.cpp:38
#define tString
Definition: types.h:36
this class describes a window to display node properties
Definition: GPMG_VertexWindow.h:17
void showVertex(GPM_Graph *pGraph, GPM_Graph *tGraph, const tFlag &graphType, GPM_Graph *graph, SP::GPM_Vertex vertex, const tBoolean &isReadOnly)
show the node in a window
Definition: GPMG_MainWindow.cpp:166
GPMG_MovieGraphWindow * getMovieGraphWindow()
get the movie graph window
Definition: GPMG_MainWindow.cpp:210
this class describes a window to show movie of graphs
Definition: GPMG_MovieGraphWindow.h:17
tBoolean isRunWindowShown() const
return true is the run window is shown
Definition: GPMG_MainWindow.cpp:807
void showMovieGraphWindow()
show the movie graph window
Definition: GPMG_MainWindow.cpp:279
this class describes a window to display erules
Definition: GPMG_RulesWindow.h:17
This class describes a pattern function.
Definition: GPM_ModelFunction.h:23
void showRulesWindow()
show the rules window
Definition: GPMG_MainWindow.cpp:712
virtual void modalWindowClosed(const tFlag &id, const CORE_Object *value)
method called when a modal is closed
Definition: GPMG_MainWindow.cpp:800
this class describes a window to show graph
Definition: GPMG_RuleGraphWindow.h:19
This class describes a graph which is a list of nodes & ports.
Definition: GPM_Graph.h:19
GPMG_EnvironmentWindow * getEnvironmentWindow()
get the environment window
Definition: GPMG_MainWindow.cpp:551
this class describes a window to display edge properties
Definition: GPMG_EdgeWindow.h:17
void showGraphElement(GPM_Graph *pGraph, GPM_Graph *tGraph, const tFlag &graphType, GPM_Graph *graph, SP::GPM_GraphElement elt, const tBoolean &isReadOnly)
show the edge in a window
Definition: GPMG_MainWindow.h:227
void showVertexWindow()
show the vertex window
Definition: GPMG_MainWindow.cpp:423
GPMG_RuleGraphWindow * getRuleGraphsWindow()
get the rule graphs window
Definition: GPMG_MainWindow.cpp:344
#define tFlag
Definition: types.h:14
tBoolean isEnvironmentWindowShown() const
return true is the environment window is shown
Definition: GPMG_MainWindow.cpp:544