``animationGUI`` ================================================= .. py:module:: optimeed.visualize.onclick.animationGUI Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: optimeed.visualize.onclick.animationGUI._AnimationTrace optimeed.visualize.onclick.animationGUI.AnimationGUI .. py:class:: _AnimationTrace(elements_list, theTrace) Contains all the element to animate for a trace .. py:class:: AnimationElement(elements) .. py:method:: get() .. py:method:: get_element_animations(itemNumber, index_in_show) 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 .. py:method:: show_all() .. py:method:: delete_all() .. py:method:: get_indices_to_show() .. py:method:: add_element(indexPoint) .. py:method:: add_index_to_show(index) .. py:method:: _remove_index_from_show(index) .. py:method:: set_curr_brush(index_in_show) .. py:method:: set_idle_brush(index_in_show) .. py:method:: get_number_of_elements() .. py:method:: map_index(index_in_show) .. py:method:: get_base_pen() .. py:class:: AnimationGUI(id=0, window_title='Animation') Bases: :py:obj:`PyQt5.QtWidgets.QMainWindow` Spawns a gui that includes button to create animations nicely when paired with :class:`~optimeed.visualize.gui.widgets.widget_graphs_visual` .. py:attribute:: SlIDER_MAXIMUM_VALUE :value: 500 .. py:attribute:: SLIDER_MINIMUM_VALUE :value: 1 .. py:method:: add_trace(trace_id, element_list, theTrace) Add a trace to the animation. :param trace_id: id of the trace :param element_list: List of elements to save: [[OpenGL_item1, text_item1], [OpenGL_item2, text_item2], ... [OpenGL_itemN, text_itemN]] :param theTrace: :class:`~optimeed.visualize.gui.widgets.graphsVisualWidget.TraceVisual.TraceVisual` :return: .. py:method:: get_interesting_elements(element_list) :staticmethod: Function called upon new trace creation. From a list, takes the interesting elements for animation :param element_list: :return: new_element_list .. py:method:: add_elementToTrace(trace_id, indexPoint) .. py:method:: delete_point(trace_id, thePoint) .. py:method:: reset_all() .. py:method:: delete_all() .. py:method:: pause_play() .. py:method:: show_all() .. py:method:: next_frame() .. py:method:: slider_handler() .. py:method:: frame_selector() .. py:method:: set_refreshTime() .. py:method:: is_empty() .. py:method:: run() .. py:method:: closeEvent(_) .. py:method:: contains_trace(trace_id) .. py:method:: export_picture() .. py:method:: export_widget(painter) :abstractmethod: Render scene with a painter :param painter: PyQt painter .. py:method:: update_widget_w_animation(key, index, the_data_animation) :abstractmethod: What to do when a new element has to be animated. Example: self.theOpenGLWidget.set_deviceToDraw(the_data_animation.get_element_animations(0, index)) :param key: key of the trace that has to be animated :param index: index that has to be animated :param the_data_animation: :class:`~DataAnimationTrace` that has to be animated .. py:method:: delete_key_widgets(key) :abstractmethod: What to do when a key has to be deleted :param key: key of the trace that has to be deleted