5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.MicroPython.MicroPythonGraphWidget</h1> |
9 <h1>eric7.MicroPython.MicroPythonGraphWidget</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing the MicroPython graph widget. |
11 Module implementing the MicroPython graph widget. |
13 </p> |
12 </p> |
|
13 |
14 <h3>Global Attributes</h3> |
14 <h3>Global Attributes</h3> |
15 |
15 <table> |
16 <table> |
16 <tr><td>None</td></tr> |
17 <tr><td>None</td></tr> |
17 </table> |
18 </table> |
18 |
19 <h3>Classes</h3> |
19 <h3>Classes</h3> |
20 |
20 <table> |
21 <table> |
|
22 |
|
23 <tr> |
21 <tr> |
24 <td><a href="#MicroPythonGraphWidget">MicroPythonGraphWidget</a></td> |
22 <td><a href="#MicroPythonGraphWidget">MicroPythonGraphWidget</a></td> |
25 <td>Class implementing the MicroPython graph widget.</td> |
23 <td>Class implementing the MicroPython graph widget.</td> |
26 </tr> |
24 </tr> |
27 </table> |
25 </table> |
|
26 |
28 <h3>Functions</h3> |
27 <h3>Functions</h3> |
29 |
28 <table> |
30 <table> |
29 <tr><td>None</td></tr> |
31 <tr><td>None</td></tr> |
30 </table> |
32 </table> |
31 |
33 <hr /> |
32 <hr /> |
34 <hr /> |
33 <hr /> |
35 <a NAME="MicroPythonGraphWidget" ID="MicroPythonGraphWidget"></a> |
34 <a NAME="MicroPythonGraphWidget" ID="MicroPythonGraphWidget"></a> |
36 <h2>MicroPythonGraphWidget</h2> |
35 <h2>MicroPythonGraphWidget</h2> |
37 |
|
38 <p> |
36 <p> |
39 Class implementing the MicroPython graph widget. |
37 Class implementing the MicroPython graph widget. |
40 </p> |
38 </p> |
|
39 |
41 <h3>Signals</h3> |
40 <h3>Signals</h3> |
42 <dl> |
41 <dl> |
43 |
42 |
44 <dt>dataFlood</dt> |
43 <dt>dataFlood</dt> |
45 <dd> |
44 <dd> |
97 <tr> |
94 <tr> |
98 <td><a href="#MicroPythonGraphWidget.saveData">saveData</a></td> |
95 <td><a href="#MicroPythonGraphWidget.saveData">saveData</a></td> |
99 <td>Public method to save the dialog's raw data.</td> |
96 <td>Public method to save the dialog's raw data.</td> |
100 </tr> |
97 </tr> |
101 </table> |
98 </table> |
|
99 |
102 <h3>Static Methods</h3> |
100 <h3>Static Methods</h3> |
103 |
101 <table> |
104 <table> |
102 <tr><td>None</td></tr> |
105 <tr><td>None</td></tr> |
103 </table> |
106 </table> |
104 |
107 |
105 |
108 <a NAME="MicroPythonGraphWidget.__init__" ID="MicroPythonGraphWidget.__init__"></a> |
106 <a NAME="MicroPythonGraphWidget.__init__" ID="MicroPythonGraphWidget.__init__"></a> |
109 <h4>MicroPythonGraphWidget (Constructor)</h4> |
107 <h4>MicroPythonGraphWidget (Constructor)</h4> |
110 <b>MicroPythonGraphWidget</b>(<i>parent=None</i>) |
108 <b>MicroPythonGraphWidget</b>(<i>parent=None</i>) |
111 |
|
112 <p> |
109 <p> |
113 Constructor |
110 Constructor |
114 </p> |
111 </p> |
|
112 |
115 <dl> |
113 <dl> |
116 |
114 |
117 <dt><i>parent</i> (QWidget)</dt> |
115 <dt><i>parent</i> (QWidget)</dt> |
118 <dd> |
116 <dd> |
119 reference to the parent widget |
117 reference to the parent widget |
120 </dd> |
118 </dd> |
121 </dl> |
119 </dl> |
122 <a NAME="MicroPythonGraphWidget.__addData" ID="MicroPythonGraphWidget.__addData"></a> |
120 <a NAME="MicroPythonGraphWidget.__addData" ID="MicroPythonGraphWidget.__addData"></a> |
123 <h4>MicroPythonGraphWidget.__addData</h4> |
121 <h4>MicroPythonGraphWidget.__addData</h4> |
124 <b>__addData</b>(<i>values</i>) |
122 <b>__addData</b>(<i>values</i>) |
125 |
|
126 <p> |
123 <p> |
127 Private method to add a tuple of values to the graph. |
124 Private method to add a tuple of values to the graph. |
128 </p> |
125 </p> |
129 <p> |
126 <p> |
130 It ensures there are the required number of line series, adds the data |
127 It ensures there are the required number of line series, adds the data |
131 to the line series and updates the range of the chart so the chart |
128 to the line series and updates the range of the chart so the chart |
132 displays nicely. |
129 displays nicely. |
133 </p> |
130 </p> |
|
131 |
134 <dl> |
132 <dl> |
135 |
133 |
136 <dt><i>values</i> (tuple of int or float)</dt> |
134 <dt><i>values</i> (tuple of int or float)</dt> |
137 <dd> |
135 <dd> |
138 tuple containing the data to be added |
136 tuple containing the data to be added |
139 </dd> |
137 </dd> |
140 </dl> |
138 </dl> |
141 <a NAME="MicroPythonGraphWidget.__handleMaxXChanged" ID="MicroPythonGraphWidget.__handleMaxXChanged"></a> |
139 <a NAME="MicroPythonGraphWidget.__handleMaxXChanged" ID="MicroPythonGraphWidget.__handleMaxXChanged"></a> |
142 <h4>MicroPythonGraphWidget.__handleMaxXChanged</h4> |
140 <h4>MicroPythonGraphWidget.__handleMaxXChanged</h4> |
143 <b>__handleMaxXChanged</b>(<i>value</i>) |
141 <b>__handleMaxXChanged</b>(<i>value</i>) |
144 |
|
145 <p> |
142 <p> |
146 Private slot handling a change of the max. X spin box. |
143 Private slot handling a change of the max. X spin box. |
147 </p> |
144 </p> |
|
145 |
148 <dl> |
146 <dl> |
149 |
147 |
150 <dt><i>value</i> (int)</dt> |
148 <dt><i>value</i> (int)</dt> |
151 <dd> |
149 <dd> |
152 value of the spin box |
150 value of the spin box |
153 </dd> |
151 </dd> |
154 </dl> |
152 </dl> |
155 <a NAME="MicroPythonGraphWidget.hasData" ID="MicroPythonGraphWidget.hasData"></a> |
153 <a NAME="MicroPythonGraphWidget.hasData" ID="MicroPythonGraphWidget.hasData"></a> |
156 <h4>MicroPythonGraphWidget.hasData</h4> |
154 <h4>MicroPythonGraphWidget.hasData</h4> |
157 <b>hasData</b>(<i></i>) |
155 <b>hasData</b>(<i></i>) |
158 |
|
159 <p> |
156 <p> |
160 Public method to check, if the chart contains some valid data. |
157 Public method to check, if the chart contains some valid data. |
161 </p> |
158 </p> |
|
159 |
162 <dl> |
160 <dl> |
163 <dt>Return:</dt> |
161 <dt>Return:</dt> |
164 <dd> |
162 <dd> |
165 flag indicating valid data |
163 flag indicating valid data |
166 </dd> |
164 </dd> |
191 </dd> |
189 </dd> |
192 </dl> |
190 </dl> |
193 <a NAME="MicroPythonGraphWidget.on_saveButton_clicked" ID="MicroPythonGraphWidget.on_saveButton_clicked"></a> |
191 <a NAME="MicroPythonGraphWidget.on_saveButton_clicked" ID="MicroPythonGraphWidget.on_saveButton_clicked"></a> |
194 <h4>MicroPythonGraphWidget.on_saveButton_clicked</h4> |
192 <h4>MicroPythonGraphWidget.on_saveButton_clicked</h4> |
195 <b>on_saveButton_clicked</b>(<i></i>) |
193 <b>on_saveButton_clicked</b>(<i></i>) |
196 |
|
197 <p> |
194 <p> |
198 Private slot to save the raw data to a CSV file. |
195 Private slot to save the raw data to a CSV file. |
199 </p> |
196 </p> |
|
197 |
200 <a NAME="MicroPythonGraphWidget.preferencesChanged" ID="MicroPythonGraphWidget.preferencesChanged"></a> |
198 <a NAME="MicroPythonGraphWidget.preferencesChanged" ID="MicroPythonGraphWidget.preferencesChanged"></a> |
201 <h4>MicroPythonGraphWidget.preferencesChanged</h4> |
199 <h4>MicroPythonGraphWidget.preferencesChanged</h4> |
202 <b>preferencesChanged</b>(<i></i>) |
200 <b>preferencesChanged</b>(<i></i>) |
203 |
|
204 <p> |
201 <p> |
205 Public slot to apply changed preferences. |
202 Public slot to apply changed preferences. |
206 </p> |
203 </p> |
|
204 |
207 <a NAME="MicroPythonGraphWidget.processData" ID="MicroPythonGraphWidget.processData"></a> |
205 <a NAME="MicroPythonGraphWidget.processData" ID="MicroPythonGraphWidget.processData"></a> |
208 <h4>MicroPythonGraphWidget.processData</h4> |
206 <h4>MicroPythonGraphWidget.processData</h4> |
209 <b>processData</b>(<i>data</i>) |
207 <b>processData</b>(<i>data</i>) |
210 |
|
211 <p> |
208 <p> |
212 Public slot to process the raw data. |
209 Public slot to process the raw data. |
213 </p> |
210 </p> |
214 <p> |
211 <p> |
215 It takes raw bytes, checks the data for a valid tuple of ints or |
212 It takes raw bytes, checks the data for a valid tuple of ints or |
216 floats and adds the data to the graph. If the the length of the bytes |
213 floats and adds the data to the graph. If the the length of the bytes |
217 data is greater than 1024 then a dataFlood signal is emitted to ensure |
214 data is greater than 1024 then a dataFlood signal is emitted to ensure |
218 eric can take action to remain responsive. |
215 eric can take action to remain responsive. |
219 </p> |
216 </p> |
|
217 |
220 <dl> |
218 <dl> |
221 |
219 |
222 <dt><i>data</i> (bytes)</dt> |
220 <dt><i>data</i> (bytes)</dt> |
223 <dd> |
221 <dd> |
224 raw data received from the connected device via the main |
222 raw data received from the connected device via the main |