widget_graphs_visual
¶
Module Contents¶
-
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
-
class
widget_graphs_visual
(theGraphs, **kwargs)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
Widget element to draw a graph. The traces and graphs to draw are defined in
Graphs
taken as argument. This widget is linked to the excellent third-party library pyqtgraph, under MIT license-
signal_must_update
¶
-
signal_graph_changed
¶
-
set_graph_disposition
(self, indexGraph, row=1, col=1, rowspan=1, colspan=1)[source]¶ Change the graphs disposition.
- Parameters
indexGraph – index of the graph to change
row – row where to place the graph
col – column where to place the graph
rowspan – number of rows across which the graph spans
colspan – number of columns across which the graph spans
- Returns
-
__create_graph
(self, idGraph)¶
-
__check_graphs
(self)¶
-
update_graphs
(self, singleUpdate=True)[source]¶ This method is used to update the graph. This is fast but NOT safe (especially when working with threads). To limit the risks, please use self.signal_must_update.emit() instead.
- Parameters
singleUpdate – if set to False, the graph will periodically refres each self.refreshtime
-
keyPressEvent
(self, event)[source]¶ What happens if a key is pressed. R: reset the axes to their default value
Get the QGraphicsLayout where it’s possible to add buttons, etc.
-
set_actionOnClick
(self, theActionOnClick)[source]¶ Action to perform when the graph is clicked
- Parameters
theActionOnClick –
on_graph_click_interface
- Returns
-
set_title
(self, idGraph, titleName, **kwargs)[source]¶ Set title of the graph
- Parameters
idGraph – id of the graph
titleName – title to set
-
set_article_template
(self, graph_size_x=8.8, graph_size_y=4.4, legendPosition='NW')[source]¶ Method to set the graphs to article quality graph.
- Parameters
graph_size_x – width of the graph in cm
graph_size_y – height of the graph in cm
legendPosition – position of the legend (NE, SE, SW, NW)
- Returns
-