**onclick** ==================================== .. py:module:: optimeed.visualize.onclick .. toctree:: :titlesonly: :maxdepth: 1 animationGUI/index.rst animation_examples/index.rst collectionExporterGUI/index.rst onclickInterface/index.rst onclick_animate/index.rst onclick_changeSymbol/index.rst onclick_copySomething/index.rst onclick_delete/index.rst onclick_exportCollection/index.rst onclick_exportToTxt/index.rst onclick_exportTrace/index.rst onclick_extractPareto/index.rst onclick_getXY/index.rst onclick_measure/index.rst onclick_removeTrace/index.rst onclick_representDevice/index.rst onclick_tojson/index.rst representDevice_examples/index.rst Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: optimeed.visualize.onclick.RepresentDeviceInterface optimeed.visualize.onclick.Onclick_animate optimeed.visualize.onclick.Onclick_changeSymbol optimeed.visualize.onclick.Onclick_copySomething optimeed.visualize.onclick.Onclick_delete optimeed.visualize.onclick.Onclick_exportCollection optimeed.visualize.onclick.Onclick_exportToTxt optimeed.visualize.onclick.Onclick_exportTrace optimeed.visualize.onclick.Onclick_extractPareto optimeed.visualize.onclick.Onclick_measure optimeed.visualize.onclick.Onclick_removeTrace optimeed.visualize.onclick.Onclick_representDevice optimeed.visualize.onclick.Onclick_tojson optimeed.visualize.onclick.OnclickInterface optimeed.visualize.onclick.Onclick_getXY optimeed.visualize.onclick.Represent_opengl optimeed.visualize.onclick.Represent_image optimeed.visualize.onclick.Represent_lines optimeed.visualize.onclick.Represent_brut_attributes optimeed.visualize.onclick.Represent_txt_function optimeed.visualize.onclick.Animate_lines optimeed.visualize.onclick.Animate_openGL optimeed.visualize.onclick.Animate_lines_and_text optimeed.visualize.onclick.Animate_openGL_and_text .. py:class:: RepresentDeviceInterface .. py:method:: get_widget(theDevice) :abstractmethod: Get Qt widget that represents the device :param theDevice: the Device to be represented :return: Qt widget .. py:class:: Onclick_animate(theLinkDataGraph, theAnimation) Bases: :py:obj:`optimeed.visualize.onclick.onclickInterface.OnclickInterface` On click: add or remove an element to animate .. py:method:: graph_clicked(theGraphVisual, index_graph, index_trace, indices_points) Action to perform when a graph is clicked :param theGraphsVisual: class widget_graphs_visual that has called the method :param index_graph: Index of the graph that has been clicked :param index_trace: Index of the trace that has been clicked :param indices_points: graph Indices of the points that have been clicked :return: .. py:method:: get_name() .. py:class:: Onclick_changeSymbol(theLinkDataGraph) Bases: :py:obj:`optimeed.visualize.onclick.onclickInterface.OnclickInterface` On Click: Change the symbol of the point that is clicked .. py:method:: graph_clicked(theGraphVisual, index_graph, index_trace, indices_points) Action to perform when a graph is clicked :param theGraphsVisual: class widget_graphs_visual that has called the method :param index_graph: Index of the graph that has been clicked :param index_trace: Index of the trace that has been clicked :param indices_points: graph Indices of the points that have been clicked :return: .. py:method:: get_name() .. py:class:: Onclick_copySomething(theDataLink, functionStrFromDevice) Bases: :py:obj:`optimeed.visualize.onclick.onclickInterface.OnclickInterface` On Click: copy something .. py:method:: graph_clicked(the_graph_visual, index_graph, index_trace, indices_points) Action to perform when a graph is clicked :param theGraphsVisual: class widget_graphs_visual that has called the method :param index_graph: Index of the graph that has been clicked :param index_trace: Index of the trace that has been clicked :param indices_points: graph Indices of the points that have been clicked :return: .. py:method:: get_name() .. py:class:: Onclick_delete(theDataLink) Bases: :py:obj:`optimeed.visualize.onclick.onclickInterface.OnclickInterface` On Click: Delete the points from the graph .. py:method:: graph_clicked(_theGraphVisual, index_graph, index_trace, indices_points) Action to perform when a graph is clicked :param theGraphsVisual: class widget_graphs_visual that has called the method :param index_graph: Index of the graph that has been clicked :param index_trace: Index of the trace that has been clicked :param indices_points: graph Indices of the points that have been clicked :return: .. py:method:: get_name() .. py:class:: Onclick_exportCollection(theDataLink) Bases: :py:obj:`optimeed.visualize.onclick.onclickInterface.OnclickInterface` On click: export the selected points .. py:method:: graph_clicked(theGraphVisual, index_graph, index_trace, indices_points) Action to perform when a graph is clicked :param theGraphsVisual: class widget_graphs_visual that has called the method :param index_graph: Index of the graph that has been clicked :param index_trace: Index of the trace that has been clicked :param indices_points: graph Indices of the points that have been clicked :return: .. py:method:: reset_graph() .. py:method:: get_name() .. py:class:: Onclick_exportToTxt(theDataLink, attributes_shadow=None) Bases: :py:obj:`optimeed.visualize.onclick.onclickInterface.OnclickInterface` On click: export the data of the whole the trace selected .. py:method:: graph_clicked(theGraphVisual, index_graph, index_trace, indices_points) Action to perform when a graph is clicked :param theGraphsVisual: class widget_graphs_visual that has called the method :param index_graph: Index of the graph that has been clicked :param index_trace: Index of the trace that has been clicked :param indices_points: graph Indices of the points that have been clicked :return: .. py:method:: get_name() .. py:class:: Onclick_exportTrace(theDataLink, getShadow=True) Bases: :py:obj:`optimeed.visualize.onclick.onclickInterface.OnclickInterface` On click: export the data of the whole the trace selected .. py:method:: graph_clicked(theGraphVisual, index_graph, index_trace, indices_points) Action to perform when a graph is clicked :param theGraphsVisual: class widget_graphs_visual that has called the method :param index_graph: Index of the graph that has been clicked :param index_trace: Index of the trace that has been clicked :param indices_points: graph Indices of the points that have been clicked :return: .. py:method:: get_name() .. py:class:: Onclick_extractPareto(theDataLink, max_x=False, max_y=False) Bases: :py:obj:`optimeed.visualize.onclick.onclickInterface.OnclickInterface` On click: extract the pareto from the cloud of points .. py:method:: graph_clicked(the_graph_visual, index_graph, index_trace, _) Action to perform when a graph is clicked :param theGraphsVisual: class widget_graphs_visual that has called the method :param index_graph: Index of the graph that has been clicked :param index_trace: Index of the trace that has been clicked :param indices_points: graph Indices of the points that have been clicked :return: .. py:method:: get_name() .. py:class:: Onclick_measure Bases: :py:obj:`optimeed.visualize.onclick.onclickInterface.OnclickInterface` On Click: Measure distance. Click on two points to perform that action .. py:method:: graph_clicked(the_graph_visual, index_graph, index_trace, indices_points) Action to perform when a graph is clicked :param theGraphsVisual: class widget_graphs_visual that has called the method :param index_graph: Index of the graph that has been clicked :param index_trace: Index of the trace that has been clicked :param indices_points: graph Indices of the points that have been clicked :return: .. py:method:: reset_distance() .. py:method:: display_distance() .. py:method:: get_name() .. py:class:: Onclick_removeTrace(theDataLink) Bases: :py:obj:`optimeed.visualize.onclick.onclickInterface.OnclickInterface` Interface class for the action to perform when a point is clicked .. py:method:: graph_clicked(theGraphVisual, index_graph, index_trace, _) Action to perform when a graph is clicked :param theGraphsVisual: class widget_graphs_visual that has called the method :param index_graph: Index of the graph that has been clicked :param index_trace: Index of the trace that has been clicked :param indices_points: graph Indices of the points that have been clicked :return: .. py:method:: get_name() .. py:class:: Onclick_representDevice(theLinkDataGraph, visuals) Bases: :py:obj:`optimeed.visualize.onclick.onclickInterface.OnclickInterface` On click: show informations about the points (loop through attributes) .. py:class:: DataInformationVisuals .. py:method:: delete_visual(theVisual) .. py:method:: add_visual(theVisual, theTrace, indexPoint) .. py:method:: get_new_index() .. py:method:: curr_index() .. py:method:: graph_clicked(theGraphVisual, index_graph, index_trace, indices_points) Action to perform when a point in the graph has been clicked: Creates new window displaying the device and its informations .. py:method:: get_name() .. py:class:: Onclick_tojson(theDataLink) Bases: :py:obj:`optimeed.visualize.onclick.onclickInterface.OnclickInterface` Interface class for the action to perform when a point is clicked .. py:method:: graph_clicked(theGraphVisual, index_graph, index_trace, indices_points) Action to perform when a graph is clicked :param theGraphsVisual: class widget_graphs_visual that has called the method :param index_graph: Index of the graph that has been clicked :param index_trace: Index of the trace that has been clicked :param indices_points: graph Indices of the points that have been clicked :return: .. py:method:: get_name() .. py:class:: OnclickInterface Interface class for the action to perform when a point is clicked .. py:method:: graph_clicked(theGraphsVisual, index_graph, index_trace, indices_points) :abstractmethod: Action to perform when a graph is clicked :param theGraphsVisual: class widget_graphs_visual that has called the method :param index_graph: Index of the graph that has been clicked :param index_trace: Index of the trace that has been clicked :param indices_points: graph Indices of the points that have been clicked :return: .. py:method:: get_name() :abstractmethod: .. py:class:: Onclick_getXY Bases: :py:obj:`optimeed.visualize.onclick.onclickInterface.OnclickInterface` On click: display X and Y coordinates of the points .. py:method:: graph_clicked(theGraphVisual, index_graph, index_trace, indices_points) Action to perform when a graph is clicked :param theGraphsVisual: class widget_graphs_visual that has called the method :param index_graph: Index of the graph that has been clicked :param index_trace: Index of the trace that has been clicked :param indices_points: graph Indices of the points that have been clicked :return: .. py:method:: get_name() .. py:class:: Represent_opengl(DeviceDrawer) Bases: :py:obj:`optimeed.visualize.onclick.onclick_representDevice.RepresentDeviceInterface` .. py:method:: get_widget(theNewDevice) Get Qt widget that represents the device :param theDevice: the Device to be represented :return: Qt widget .. py:class:: Represent_image(get_base_64_from_device) Bases: :py:obj:`optimeed.visualize.onclick.onclick_representDevice.RepresentDeviceInterface` .. py:method:: get_widget(theNewDevice) Get Qt widget that represents the device :param theDevice: the Device to be represented :return: Qt widget .. py:class:: Represent_lines(attribute_lines) Bases: :py:obj:`optimeed.visualize.onclick.onclick_representDevice.RepresentDeviceInterface` .. py:method:: get_widget(theNewDevice) Get Qt widget that represents the device :param theDevice: the Device to be represented :return: Qt widget .. py:class:: Represent_brut_attributes(is_light=True, convertToHtml=True, recursion_level=5) Bases: :py:obj:`optimeed.visualize.onclick.onclick_representDevice.RepresentDeviceInterface` .. py:method:: get_widget(theNewDevice) Get Qt widget that represents the device :param theDevice: the Device to be represented :return: Qt widget .. py:class:: Represent_txt_function(is_light=True, convertToHtml=True) Bases: :py:obj:`optimeed.visualize.onclick.onclick_representDevice.RepresentDeviceInterface` .. py:method:: getTxt(theNewDevice) .. py:method:: get_widget(theNewDevice) Get Qt widget that represents the device :param theDevice: the Device to be represented :return: Qt widget .. py:class:: Animate_lines(get_lines_method, is_light=True, theId=0, window_title='Animation') Bases: :py:obj:`optimeed.visualize.onclick.animationGUI.AnimationGUI` Implements :class:`~DataAnimationVisuals` to show drawing made out of lines (:class:`~optimeed.visualize.gui.widgets.widget_line_drawer`) .. py:method:: export_widget(painter) Render scene with a painter :param painter: PyQt painter .. py:method:: delete_key_widgets(key) What to do when a key has to be deleted :param key: key of the trace that has to be deleted .. py:method:: update_widget_w_animation(key, index, the_data_animation) 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:: get_interesting_elements(devices_list) Function called upon new trace creation. From a list, takes the interesting elements for animation :param element_list: :return: new_element_list .. py:class:: Animate_openGL(theOpenGLWidget, theId=0, window_title='Animation') Bases: :py:obj:`optimeed.visualize.onclick.animationGUI.AnimationGUI` Implements :class:`~DataAnimationVisuals` to show opengl drawing .. py:method:: update_widget_w_animation(key, index, the_data_animation) 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:: export_widget(painter) Render scene with a painter :param painter: PyQt painter .. py:method:: delete_key_widgets(key) What to do when a key has to be deleted :param key: key of the trace that has to be deleted .. py:class:: Animate_lines_and_text(*args, **kwargs) Bases: :py:obj:`Animate_lines` Same as :class:`~DataAnimationLines` but also with text .. py:method:: update_widget_w_animation(key, index, the_data_animation) 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:class:: Animate_openGL_and_text(*args, is_light=True, **kwargs) Bases: :py:obj:`Animate_openGL` Implements :class:`~DataAnimationVisuals` to show opengl drawing and text .. py:method:: update_widget_w_animation(key, index, the_data_animation) 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:: get_interesting_elements(devices_list) Function called upon new trace creation. From a list, takes the interesting elements for animation :param element_list: :return: new_element_list