Commit 5233d119 authored by Kevin Coulomb's avatar Kevin Coulomb

+1

parent 6aec2bff
...@@ -130,7 +130,7 @@ public: ...@@ -130,7 +130,7 @@ public:
* \param draw_object the kind of object which will be drawn (OpenGL, SVG...). * \param draw_object the kind of object which will be drawn (OpenGL, SVG...).
* \param trace the trace data. * \param trace the trace data.
*/ */
void build(T* draw_object, Trace* trace) { void build(T* draw_object, Trace* trace, double zoom, const Interval & interval) {
draw_object->start_draw(); draw_object->start_draw();
...@@ -138,7 +138,7 @@ public: ...@@ -138,7 +138,7 @@ public:
browse_container_tree(draw_object, trace); browse_container_tree(draw_object, trace);
draw_object->end_draw_containers(); draw_object->end_draw_containers();
browse_entities(draw_object); browse_entities(draw_object,zoom,interval);
draw_object->end_draw(); draw_object->end_draw();
} }
...@@ -230,7 +230,7 @@ public: ...@@ -230,7 +230,7 @@ public:
/*! /*!
* \brief Browse the states list and draw them * \brief Browse the states list and draw them
*/ */
inline void browse_entities(T* draw_object) { inline void browse_entities(T* draw_object, double zoom, const Interval& interval) {
const Container *container; const Container *container;
BinaryTree<StateChange> *state_tree; BinaryTree<StateChange> *state_tree;
BinaryTree<Event> *event_tree; BinaryTree<Event> *event_tree;
...@@ -239,9 +239,12 @@ public: ...@@ -239,9 +239,12 @@ public:
const map<VariableType *, Variable *> *variable_map; const map<VariableType *, Variable *> *variable_map;
Variable *var; Variable *var;
const list<pair<Date, Double> > *variable_values; const list<pair<Date, Double> > *variable_values;
// const map<std::string, Value *> *extra_fields;
// const Color *color;
int position; int position;
int lvl_zoom;
if(zoom>=0)
lvl_zoom = zoom;
else
lvl_zoom = 0;
draw_object->start_draw_states(); draw_object->start_draw_states();
for (list<const Container *>::const_iterator c = _entity_containers.begin(); for (list<const Container *>::const_iterator c = _entity_containers.begin();
...@@ -256,14 +259,14 @@ public: ...@@ -256,14 +259,14 @@ public:
// Browse states // Browse states
DrawTree<T, StateChange>(draw_object, position, 0.0, DrawTree<T, StateChange>(draw_object, position, lvl_zoom,
_container_height, _container_v_space, _state_height, _state_v_space) _container_height, _container_v_space, _state_height, _state_v_space)
.draw_tree(state_tree, Interval(Date(0.0), Date(500.0))); .draw_tree(state_tree, interval);
// Browse events // Browse events
DrawTree<T, Event>(draw_object, position, 0.0, DrawTree<T, Event>(draw_object, position, lvl_zoom,
_container_height, _container_v_space, _state_height, _state_v_space) _container_height, _container_v_space, _state_height, _state_v_space)
.draw_tree(event_tree, Interval(Date(0.0), Date(500.0))); .draw_tree(event_tree, interval);
} }
......
...@@ -296,6 +296,13 @@ public : ...@@ -296,6 +296,13 @@ public :
*/ */
EntityValue *search_entity_value(String name, EntityType *entity_type) const; EntityValue *search_entity_value(String name, EntityType *entity_type) const;
/*!
* \fn get_max_date()
* \brief Function that return the max of the date
*/
Date get_max_date(){
return _max_date;
}
};//end class };//end class
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment