gui_data_animation

Module Contents

class DataAnimationTrace(elements_list, theTrace)[source]

Contains all the element to animate for a trace

class element_animation(elements)[source]
get(self)[source]
get_element_animations(self, itemNumber, index_in_show)[source]

Get the element to show :param itemNumber: item number (0 if only one think to draw) :param index_in_show: index in the list :return: The element to draw

show_all(self)[source]
delete_all(self)[source]
get_indices_to_show(self)[source]
add_element(self, indexPoint)[source]
add_index_to_show(self, index)[source]
_remove_index_from_show(self, index)[source]
set_curr_brush(self, index_in_show)[source]
set_idle_brush(self, index_in_show)[source]
get_number_of_elements(self)[source]
map_index(self, index_in_show)[source]
get_base_pen(self)[source]
class DataAnimationVisuals(id=0, window_title='Animation')[source]

Bases: PyQt5.QtWidgets.QMainWindow

Spawns a gui that includes button to create animations nicely when paired with widget_graphs_visual

SlIDER_MAXIMUM_VALUE = 500
SLIDER_MINIMUM_VALUE = 1
add_trace(self, trace_id, element_list, theTrace)[source]

Add a trace to the animation.

Parameters
  • trace_id – id of the trace

  • element_list – List of elements to save: [[OpenGL_item1, text_item1], [OpenGL_item2, text_item2], … [OpenGL_itemN, text_itemN]]

  • theTraceTraceVisual

Returns

static get_interesting_elements(element_list)[source]

Function called upon new trace creation. From a list, takes the interesting elements for animation :param element_list: :return: new_element_list

add_elementToTrace(self, trace_id, indexPoint)[source]
delete_point(self, trace_id, thePoint)[source]
reset_all(self)[source]
delete_all(self)[source]
pause_play(self)[source]
show_all(self)[source]
next_frame(self)[source]
slider_handler(self)[source]
frame_selector(self)[source]
set_refreshTime(self)[source]
is_empty(self)[source]
run(self)[source]
closeEvent(self, _)[source]
contains_trace(self, trace_id)[source]
export_picture(self)[source]
abstract export_widget(self, painter)[source]

Render scene with a painter

Parameters

painter – PyQt painter

abstract update_widget_w_animation(self, key, index, the_data_animation)[source]

What to do when a new element has to be animated. Example: self.theOpenGLWidget.set_deviceToDraw(the_data_animation.get_element_animations(0, index))

Parameters
  • key – key of the trace that has to be animated

  • index – index that has to be animated

  • the_data_animationDataAnimationTrace that has to be animated

abstract delete_key_widgets(self, key)[source]

What to do when a key has to be deleted

Parameters

key – key of the trace that has to be deleted