examplesActionOnClick

Package Contents

class on_graph_click_delete(theDataLink)[source]

Bases: optimeed.visualize.gui.widgets.widget_graphs_visual.on_graph_click_interface

On Click: Delete the points from the graph, and save the modified collection

apply(self)[source]
reset(self)[source]
graph_clicked(self, theGraphVisual, index_graph, index_trace, indices_points)[source]
get_name(self)[source]
class on_graph_click_export(theDataLink)[source]

Bases: optimeed.visualize.gui.widgets.widget_graphs_visual.on_graph_click_interface

On click: export the selected points

graph_clicked(self, theGraphVisual, index_graph, index_trace, indices_points)[source]
reset_graph(self)[source]
get_name(self)[source]
class on_click_extract_pareto(theDataLink, max_x=False, max_y=False)[source]

Bases: optimeed.visualize.gui.widgets.widget_graphs_visual.on_graph_click_interface

On click: extract the pareto from the cloud of points

graph_clicked(self, the_graph_visual, index_graph, index_trace, _)[source]
get_name(self)[source]
class on_graph_click_showInfo(theLinkDataGraph, visuals=None)[source]

Bases: optimeed.visualize.gui.widgets.widget_graphs_visual.on_graph_click_interface

On click: show informations about the points (loop through attributes)

class DataInformationVisuals[source]
delete_visual(self, theVisual)[source]
add_visual(self, theVisual, theTrace, indexPoint)[source]
get_new_index(self)[source]
curr_index(self)[source]
graph_clicked(self, theGraphVisual, index_graph, index_trace, indices_points)[source]

Action to perform when a point in the graph has been clicked: Creates new window displaying the device and its informations

get_name(self)[source]
class Repr_opengl(DeviceDrawer)[source]
get_widget(self, theNewDevice)[source]
class Repr_lines(attribute_lines)[source]
get_widget(self, theNewDevice)[source]
class Repr_brut_attributes(is_light=True, convertToHtml=True, recursion_level=5)[source]
get_widget(self, theNewDevice)[source]
class Repr_image(get_base_64_from_device)[source]
get_widget(self, theNewDevice)[source]
class on_graph_click_remove_trace(theDataLink)[source]

Bases: optimeed.visualize.gui.widgets.widget_graphs_visual.on_graph_click_interface

graph_clicked(self, theGraphVisual, index_graph, index_trace, _)[source]
get_name(self)[source]
class on_click_copy_something(theDataLink, functionStrFromDevice)[source]

Bases: optimeed.visualize.gui.widgets.widget_graphs_visual.on_graph_click_interface

On Click: copy something

graph_clicked(self, the_graph_visual, index_graph, index_trace, indices_points)[source]
get_name(self)[source]
class on_click_change_symbol(theLinkDataGraph)[source]

Bases: optimeed.visualize.gui.widgets.widget_graphs_visual.on_graph_click_interface

On Click: Change the symbol of the point that is clicked

graph_clicked(self, theGraphVisual, index_graph, index_trace, indices_points)[source]
get_name(self)[source]
class on_graph_click_interface[source]

Interface class for the action to perform when a point is clicked

abstract graph_clicked(self, theGraphsVisual, index_graph, index_trace, indices_points)[source]

Action to perform when a graph is clicked

Parameters
  • theGraphsVisual – class widget_graphs_visual that has called the method

  • index_graph – Index of the graph that has been clicked

  • index_trace – Index of the trace that has been clicked

  • indices_points – graph Indices of the points that have been clicked

Returns

abstract get_name(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

class widget_text(theText, is_light=False, convertToHtml=False)[source]

Bases: PyQt5.QtWidgets.QLabel

Widget able to display a text

set_text(self, theText, convertToHtml=False)[source]

Set the text to display

class widget_line_drawer(minWinHeight=300, minWinWidth=300, is_light=True)[source]

Bases: PyQt5.QtWidgets.QWidget

Widget allowing to display several lines easily

signal_must_update
on_update_signal(self, listOfLines)[source]
delete_lines(self, key_id)[source]

Dele the lines :param key_id: id to delete :return:

set_lines(self, listOfLines, key_id=0, pen=None)[source]

Set the lines to display :param listOfLines: list of [x1, y1, x2, y2] corresponding to lines :param key_id: id of the trace :param pen: pen used to draw the lines :return:

paintEvent(self, event, painter=None)[source]
get_extrema_lines(self)[source]
class DataAnimationOpenGL(theOpenGLWidget, theId=0, window_title='Animation')[source]

Bases: optimeed.visualize.gui.gui_data_animation.DataAnimationVisuals

Implements DataAnimationVisuals to show opengl drawing

update_widget_w_animation(self, key, index, the_data_animation)[source]
export_widget(self, painter)[source]
delete_key_widgets(self, key)[source]
class DataAnimationOpenGLwText(*args, is_light=True, **kwargs)[source]

Bases: optimeed.visualize.gui.widgets.graphsVisualWidget.examplesActionOnClick.on_click_anim.DataAnimationOpenGL

Implements DataAnimationVisuals to show opengl drawing and text

update_widget_w_animation(self, key, index, the_data_animation)[source]
get_interesting_elements(self, devices_list)[source]
class DataAnimationLines(get_lines_method, is_light=True, theId=0, window_title='Animation')[source]

Bases: optimeed.visualize.gui.gui_data_animation.DataAnimationVisuals

Implements DataAnimationVisuals to show drawing made out of lines (widget_line_drawer)

export_widget(self, painter)[source]
delete_key_widgets(self, key)[source]
update_widget_w_animation(self, key, index, the_data_animation)[source]
get_interesting_elements(self, devices_list)[source]
class DataAnimationVisualswText(*args, **kwargs)[source]

Bases: optimeed.visualize.gui.widgets.graphsVisualWidget.examplesActionOnClick.on_click_anim.DataAnimationLines

Same as DataAnimationLines but also with text

update_widget_w_animation(self, key, index, the_data_animation)[source]
class on_graph_click_showAnim(theLinkDataGraph, theAnimation)[source]

Bases: optimeed.visualize.gui.widgets.widget_graphs_visual.on_graph_click_interface

On click: add or remove an element to animate

graph_clicked(self, theGraphVisual, index_graph, index_trace, indices_points)[source]
get_name(self)[source]
class on_click_measure[source]

Bases: optimeed.visualize.gui.widgets.widget_graphs_visual.on_graph_click_interface

On Click: Measure distance. Click on two points to perform that action

graph_clicked(self, the_graph_visual, index_graph, index_trace, indices_points)[source]
reset_distance(self)[source]
display_distance(self)[source]
get_name(self)[source]