eric7/Documentation/Source/eric7.MicroPython.MicroPythonGraphWidget.html

branch
eric7
changeset 8372
e0227a7c850e
child 8596
d64760b2da50
equal deleted inserted replaced
8371:d6062691d424 8372:e0227a7c850e
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.MicroPython.MicroPythonGraphWidget</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body>
22 <a NAME="top" ID="top"></a>
23 <h1>eric7.MicroPython.MicroPythonGraphWidget</h1>
24
25 <p>
26 Module implementing the MicroPython graph widget.
27 </p>
28 <h3>Global Attributes</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <h3>Classes</h3>
34
35 <table>
36
37 <tr>
38 <td><a href="#MicroPythonGraphWidget">MicroPythonGraphWidget</a></td>
39 <td>Class implementing the MicroPython graph widget.</td>
40 </tr>
41 </table>
42 <h3>Functions</h3>
43
44 <table>
45 <tr><td>None</td></tr>
46 </table>
47 <hr />
48 <hr />
49 <a NAME="MicroPythonGraphWidget" ID="MicroPythonGraphWidget"></a>
50 <h2>MicroPythonGraphWidget</h2>
51
52 <p>
53 Class implementing the MicroPython graph widget.
54 </p>
55 <h3>Signals</h3>
56 <dl>
57
58 <dt>dataFlood</dt>
59 <dd>
60 emitted to indicate, that too much data is received
61 </dd>
62 </dl>
63 <h3>Derived from</h3>
64 QWidget
65 <h3>Class Attributes</h3>
66
67 <table>
68 <tr><td>None</td></tr>
69 </table>
70 <h3>Class Methods</h3>
71
72 <table>
73 <tr><td>None</td></tr>
74 </table>
75 <h3>Methods</h3>
76
77 <table>
78
79 <tr>
80 <td><a href="#MicroPythonGraphWidget.__init__">MicroPythonGraphWidget</a></td>
81 <td>Constructor</td>
82 </tr>
83 <tr>
84 <td><a href="#MicroPythonGraphWidget.__addData">__addData</a></td>
85 <td>Private method to add a tuple of values to the graph.</td>
86 </tr>
87 <tr>
88 <td><a href="#MicroPythonGraphWidget.__handleMaxXChanged">__handleMaxXChanged</a></td>
89 <td>Private slot handling a change of the max.</td>
90 </tr>
91 <tr>
92 <td><a href="#MicroPythonGraphWidget.hasData">hasData</a></td>
93 <td>Public method to check, if the chart contains some valid data.</td>
94 </tr>
95 <tr>
96 <td><a href="#MicroPythonGraphWidget.isDirty">isDirty</a></td>
97 <td>Public method to check, if the chart contains unsaved data.</td>
98 </tr>
99 <tr>
100 <td><a href="#MicroPythonGraphWidget.on_saveButton_clicked">on_saveButton_clicked</a></td>
101 <td>Private slot to save the raw data to a CSV file.</td>
102 </tr>
103 <tr>
104 <td><a href="#MicroPythonGraphWidget.preferencesChanged">preferencesChanged</a></td>
105 <td>Public slot to apply changed preferences.</td>
106 </tr>
107 <tr>
108 <td><a href="#MicroPythonGraphWidget.processData">processData</a></td>
109 <td>Public slot to process the raw data.</td>
110 </tr>
111 <tr>
112 <td><a href="#MicroPythonGraphWidget.saveData">saveData</a></td>
113 <td>Public method to save the dialog's raw data.</td>
114 </tr>
115 </table>
116 <h3>Static Methods</h3>
117
118 <table>
119 <tr><td>None</td></tr>
120 </table>
121
122 <a NAME="MicroPythonGraphWidget.__init__" ID="MicroPythonGraphWidget.__init__"></a>
123 <h4>MicroPythonGraphWidget (Constructor)</h4>
124 <b>MicroPythonGraphWidget</b>(<i>parent=None</i>)
125
126 <p>
127 Constructor
128 </p>
129 <dl>
130
131 <dt><i>parent</i> (QWidget)</dt>
132 <dd>
133 reference to the parent widget
134 </dd>
135 </dl>
136 <a NAME="MicroPythonGraphWidget.__addData" ID="MicroPythonGraphWidget.__addData"></a>
137 <h4>MicroPythonGraphWidget.__addData</h4>
138 <b>__addData</b>(<i>values</i>)
139
140 <p>
141 Private method to add a tuple of values to the graph.
142 </p>
143 <p>
144 It ensures there are the required number of line series, adds the data
145 to the line series and updates the range of the chart so the chart
146 displays nicely.
147 </p>
148 <dl>
149
150 <dt><i>values</i> (tuple of int or float)</dt>
151 <dd>
152 tuple containing the data to be added
153 </dd>
154 </dl>
155 <a NAME="MicroPythonGraphWidget.__handleMaxXChanged" ID="MicroPythonGraphWidget.__handleMaxXChanged"></a>
156 <h4>MicroPythonGraphWidget.__handleMaxXChanged</h4>
157 <b>__handleMaxXChanged</b>(<i>value</i>)
158
159 <p>
160 Private slot handling a change of the max. X spin box.
161 </p>
162 <dl>
163
164 <dt><i>value</i> (int)</dt>
165 <dd>
166 value of the spin box
167 </dd>
168 </dl>
169 <a NAME="MicroPythonGraphWidget.hasData" ID="MicroPythonGraphWidget.hasData"></a>
170 <h4>MicroPythonGraphWidget.hasData</h4>
171 <b>hasData</b>(<i></i>)
172
173 <p>
174 Public method to check, if the chart contains some valid data.
175 </p>
176 <dl>
177 <dt>Return:</dt>
178 <dd>
179 flag indicating valid data
180 </dd>
181 </dl>
182 <dl>
183 <dt>Return Type:</dt>
184 <dd>
185 bool
186 </dd>
187 </dl>
188 <a NAME="MicroPythonGraphWidget.isDirty" ID="MicroPythonGraphWidget.isDirty"></a>
189 <h4>MicroPythonGraphWidget.isDirty</h4>
190 <b>isDirty</b>(<i></i>)
191
192 <p>
193 Public method to check, if the chart contains unsaved data.
194 </p>
195 <dl>
196 <dt>Return:</dt>
197 <dd>
198 flag indicating unsaved data
199 </dd>
200 </dl>
201 <dl>
202 <dt>Return Type:</dt>
203 <dd>
204 bool
205 </dd>
206 </dl>
207 <a NAME="MicroPythonGraphWidget.on_saveButton_clicked" ID="MicroPythonGraphWidget.on_saveButton_clicked"></a>
208 <h4>MicroPythonGraphWidget.on_saveButton_clicked</h4>
209 <b>on_saveButton_clicked</b>(<i></i>)
210
211 <p>
212 Private slot to save the raw data to a CSV file.
213 </p>
214 <a NAME="MicroPythonGraphWidget.preferencesChanged" ID="MicroPythonGraphWidget.preferencesChanged"></a>
215 <h4>MicroPythonGraphWidget.preferencesChanged</h4>
216 <b>preferencesChanged</b>(<i></i>)
217
218 <p>
219 Public slot to apply changed preferences.
220 </p>
221 <a NAME="MicroPythonGraphWidget.processData" ID="MicroPythonGraphWidget.processData"></a>
222 <h4>MicroPythonGraphWidget.processData</h4>
223 <b>processData</b>(<i>data</i>)
224
225 <p>
226 Public slot to process the raw data.
227 </p>
228 <p>
229 It takes raw bytes, checks the data for a valid tuple of ints or
230 floats and adds the data to the graph. If the the length of the bytes
231 data is greater than 1024 then a dataFlood signal is emitted to ensure
232 eric can take action to remain responsive.
233 </p>
234 <dl>
235
236 <dt><i>data</i> (bytes)</dt>
237 <dd>
238 raw data received from the connected device via the main
239 device widget
240 </dd>
241 </dl>
242 <a NAME="MicroPythonGraphWidget.saveData" ID="MicroPythonGraphWidget.saveData"></a>
243 <h4>MicroPythonGraphWidget.saveData</h4>
244 <b>saveData</b>(<i></i>)
245
246 <p>
247 Public method to save the dialog's raw data.
248 </p>
249 <dl>
250 <dt>Return:</dt>
251 <dd>
252 flag indicating success
253 </dd>
254 </dl>
255 <dl>
256 <dt>Return Type:</dt>
257 <dd>
258 bool
259 </dd>
260 </dl>
261 <div align="right"><a href="#top">Up</a></div>
262 <hr />
263 </body></html>

eric ide

mercurial