1 #ifndef GPMG_MovieGraphDrawPanel_H
2 #define GPMG_MovieGraphDrawPanel_H
27 vector<tString> mGraphFiles;
35 static const tFlag PLAY;
39 tReal mMinPoint[3],mMaxPoint[3];
40 map<tString,tReal*> mBoundsValue;
43 SP::GPM_ModelGraph mCurrentGraph;
45 SP::GPMG_MovieThread mMovieThread;
72 static inline SP::GPMG_MovieGraphDrawPanel
New() {
74 GPMG_MovieGraphDrawPanel::Delete());
81 mMovieThread->setPanel(getThis());
97 const tReal minPoint[3],
98 const tReal maxPoint[3],
99 const map<tString,tReal*>& bounds) {
101 int i,n=files.size();
102 mGraphFiles.resize(n);
104 mGraphFiles[i]=files[i];
133 const tReal minPoint[3],
134 const tReal maxPoint[3],
135 const map<tString,tReal*>& bounds);
143 const tReal maxPoint[3],
144 const map<tString,tReal*>& bounds);
183 virtual void computeVertexBounds(
double& xMin,
double& yMin,
double& xMax,
double& yMax)
const;
211 return (mFileIndex<((
int)mGraphFiles.size())-1);
216 return (mFileIndex>0);
221 return (mFileIndex==0);
226 return (mFileIndex==((
int)mGraphFiles.size())-1);
231 void next(
const int& d);
243 if (mFileIndex==0)
return;
251 if (mFileIndex==((
int)(mGraphFiles.size())-1))
return;
252 mFileIndex=mGraphFiles.size();
286 void showCurrentGraph();
304 void drawEdges(
const tReal& xmin,
314 void enableMovieMenus();
void setDelay(const int &i)
set the delay in secunds
Definition: GPMG_MovieGraphDrawPanel.h:151
GPMG_MovieGraphDrawPanel()
build a GPMG_MovieGraphDrawPanel
Definition: GPMG_MovieGraphDrawPanel.cpp:28
virtual ~GPMG_MovieGraphDrawPanel(void)
destroy a GPMG_MovieGraphDrawPanel
Definition: GPMG_MovieGraphDrawPanel.cpp:44
void goToFirst()
go to first graph
Definition: GPMG_MovieGraphDrawPanel.h:241
void goToLast()
go to last graph
Definition: GPMG_MovieGraphDrawPanel.h:250
this class describes a Graph Draw Panel.
Definition: GPMG_DrawPanel.h:15
virtual void loadFromUIClass(const UI_Class &mclass)
how to load the object from a Meta Model class
Definition: GPMG_MovieGraphDrawPanel.cpp:566
This class describes a model graph.
Definition: GPM_ModelGraph.h:21
void addGraph(const GPM_ModelGraph &graph, const tString &file, const tReal minPoint[3], const tReal maxPoint[3], const map< tString, tReal * > &bounds)
add graph.
Definition: GPMG_MovieGraphDrawPanel.cpp:111
virtual void saveToUIClass(UI_Class &mclass) const
how to save the object from a mate model class
Definition: GPMG_MovieGraphDrawPanel.cpp:573
#define tBoolean
Definition: types.h:35
static const tFlag RESULT_GRAPH
Definition: GPMG_Project.h:37
virtual void computeEdgesScale()
compute the edge scale
Definition: GPMG_MovieGraphDrawPanel.cpp:208
void setGraphFiles(const vector< tString > &files, const tReal minPoint[3], const tReal maxPoint[3], const map< tString, tReal * > &bounds)
set the graph files
Definition: GPMG_MovieGraphDrawPanel.h:96
virtual void computePortsScale()
compute the port scale
Definition: GPMG_MovieGraphDrawPanel.cpp:193
virtual void toDoAfterThisSetting()
method called after thi ssetting
Definition: GPMG_DrawPanel.h:117
void stop()
play the graphs
Definition: GPMG_MovieGraphDrawPanel.cpp:671
void threadHasBeenSuspended(const int &steap, const tFlag &action)
method called from movie thread
Definition: GPMG_MovieGraphDrawPanel.cpp:612
tBoolean hasNext() const
return true if has next file
Definition: GPMG_MovieGraphDrawPanel.h:210
tBoolean isOnFirst() const
return true if the graph print is the first graph
Definition: GPMG_MovieGraphDrawPanel.h:220
virtual void computeNodesScale()
recompute the node scale
Definition: GPMG_MovieGraphDrawPanel.cpp:178
DEFINE_SPTR(GPMG_MovieGraphDrawPanel)
tBoolean areNodesShown() const
get if the nodes are shown
Definition: GPMG_DrawPanel.h:312
void play(const tBoolean &isLoopOn)
play the graphs
Definition: GPMG_MovieGraphDrawPanel.cpp:581
void clearScales()
clear scales
Definition: GPMG_MovieGraphDrawPanel.cpp:60
void save(const tString &prefix)
save the graphs
Definition: GPMG_MovieGraphDrawPanel.cpp:718
void setScales(const tReal minPoint[3], const tReal maxPoint[3], const map< tString, tReal * > &bounds)
set scales
Definition: GPMG_MovieGraphDrawPanel.cpp:77
virtual tBoolean paintElements()
paint the element in the drawing area
Definition: GPMG_MovieGraphDrawPanel.cpp:266
void previous()
show previous graph
Definition: GPMG_MovieGraphDrawPanel.h:235
#define tString
Definition: types.h:36
this class describes the output by default write on standart output
Definition: CORE_Out.h:21
virtual tFlag getGraphType(const GPM_Graph *graph) const
return the graph type of the graph
Definition: GPMG_MovieGraphDrawPanel.h:155
tBoolean isOnLast() const
return true if the graph print is the last graph
Definition: GPMG_MovieGraphDrawPanel.h:225
virtual void computeVertexBounds(double &xMin, double &yMin, double &xMax, double &yMax) const
recompute the vertex bounds
Definition: GPMG_MovieGraphDrawPanel.cpp:101
tBoolean hasPrevious() const
return true if has previous file
Definition: GPMG_MovieGraphDrawPanel.h:215
void initAttributes()
method called by toDOAfterThisSetting method
Definition: GPMG_MovieGraphDrawPanel.cpp:52
void clearGraphs()
clear the graph
Definition: GPMG_MovieGraphDrawPanel.cpp:171
void next()
show next graph
Definition: GPMG_MovieGraphDrawPanel.h:204
This class describes a graph which is a list of nodes & ports.
Definition: GPM_Graph.h:19
#define tReal
Definition: types.h:18
tBoolean arePortsShown() const
get if the ports are shown
Definition: GPMG_DrawPanel.h:317
static SP::GPMG_MovieGraphDrawPanel New()
create a 2D plotter panel
Definition: GPMG_MovieGraphDrawPanel.h:72
void threadHasFinished(const tFlag &action)
method called from movie thread
Definition: GPMG_MovieGraphDrawPanel.cpp:665
this class describes a Graph Draw Panel.
Definition: GPMG_MovieGraphDrawPanel.h:17
#define tFlag
Definition: types.h:14
virtual void toDoAfterThisSetting()
method called after thi ssetting
Definition: GPMG_MovieGraphDrawPanel.h:79