eric6/Documentation/Source/eric6.E5Gui.E5LineEdit.html

branch
maintenance
changeset 6989
8b8cadf8d7e9
parent 6942
2602857055c5
child 7204
cbf6d88004ce
equal deleted inserted replaced
6938:7926553b7509 6989:8b8cadf8d7e9
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.E5Gui.E5LineEdit</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><a NAME="top" ID="top"></a>
22 <h1>eric6.E5Gui.E5LineEdit</h1>
23 <p>
24 Module implementing specialized line edits.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#E5ClearableLineEdit">E5ClearableLineEdit</a></td>
34 <td>Class implementing a line edit widget showing some inactive text and a clear button, if it has some contents.</td>
35 </tr><tr>
36 <td><a href="#E5LineEdit">E5LineEdit</a></td>
37 <td>Class implementing a line edit widget showing some inactive text.</td>
38 </tr><tr>
39 <td><a href="#E5LineEditSideWidget">E5LineEditSideWidget</a></td>
40 <td>Class implementing the side widgets for the line edit class.</td>
41 </tr>
42 </table>
43 <h3>Functions</h3>
44 <table>
45 <tr><td>None</td></tr>
46 </table>
47 <hr /><hr />
48 <a NAME="E5ClearableLineEdit" ID="E5ClearableLineEdit"></a>
49 <h2>E5ClearableLineEdit</h2>
50 <p>
51 Class implementing a line edit widget showing some inactive text and a
52 clear button, if it has some contents.
53 </p>
54 <h3>Derived from</h3>
55 E5LineEdit
56 <h3>Class Attributes</h3>
57 <table>
58 <tr><td>None</td></tr>
59 </table>
60 <h3>Class Methods</h3>
61 <table>
62 <tr><td>None</td></tr>
63 </table>
64 <h3>Methods</h3>
65 <table>
66 <tr>
67 <td><a href="#E5ClearableLineEdit.__init__">E5ClearableLineEdit</a></td>
68 <td>Constructor</td>
69 </tr><tr>
70 <td><a href="#E5ClearableLineEdit.__textChanged">__textChanged</a></td>
71 <td>Private slot to handle changes of the text.</td>
72 </tr>
73 </table>
74 <h3>Static Methods</h3>
75 <table>
76 <tr><td>None</td></tr>
77 </table>
78 <a NAME="E5ClearableLineEdit.__init__" ID="E5ClearableLineEdit.__init__"></a>
79 <h4>E5ClearableLineEdit (Constructor)</h4>
80 <b>E5ClearableLineEdit</b>(<i>parent=None, inactiveText="", side=E5LineEdit.RightSide</i>)
81 <p>
82 Constructor
83 </p><dl>
84 <dt><i>parent</i></dt>
85 <dd>
86 reference to the parent widget (QWidget)
87 </dd><dt><i>inactiveText=</i></dt>
88 <dd>
89 text to be shown on inactivity (string)
90 </dd><dt><i>side=</i></dt>
91 <dd>
92 side the clear button should be shown at
93 (E5LineEdit.RightSide, E5LineEdit.LeftSide)
94 </dd>
95 </dl><a NAME="E5ClearableLineEdit.__textChanged" ID="E5ClearableLineEdit.__textChanged"></a>
96 <h4>E5ClearableLineEdit.__textChanged</h4>
97 <b>__textChanged</b>(<i>txt</i>)
98 <p>
99 Private slot to handle changes of the text.
100 </p><dl>
101 <dt><i>txt</i></dt>
102 <dd>
103 text (string)
104 </dd>
105 </dl>
106 <div align="right"><a href="#top">Up</a></div>
107 <hr /><hr />
108 <a NAME="E5LineEdit" ID="E5LineEdit"></a>
109 <h2>E5LineEdit</h2>
110 <p>
111 Class implementing a line edit widget showing some inactive text.
112 </p>
113 <h3>Derived from</h3>
114 QLineEdit
115 <h3>Class Attributes</h3>
116 <table>
117 <tr><td>LeftSide</td></tr><tr><td>RightSide</td></tr>
118 </table>
119 <h3>Class Methods</h3>
120 <table>
121 <tr><td>None</td></tr>
122 </table>
123 <h3>Methods</h3>
124 <table>
125 <tr>
126 <td><a href="#E5LineEdit.__init__">E5LineEdit</a></td>
127 <td>Constructor</td>
128 </tr><tr>
129 <td><a href="#E5LineEdit._updateTextMargins">_updateTextMargins</a></td>
130 <td>Protected slot to update the text margins.</td>
131 </tr><tr>
132 <td><a href="#E5LineEdit.addWidget">addWidget</a></td>
133 <td>Public method to add a widget to a side.</td>
134 </tr><tr>
135 <td><a href="#E5LineEdit.event">event</a></td>
136 <td>Public method to handle events.</td>
137 </tr><tr>
138 <td><a href="#E5LineEdit.inactiveText">inactiveText</a></td>
139 <td>Public method to get the inactive text.</td>
140 </tr><tr>
141 <td><a href="#E5LineEdit.leftMargin">leftMargin</a></td>
142 <td>Public method to get the size of the left margin.</td>
143 </tr><tr>
144 <td><a href="#E5LineEdit.paintEvent">paintEvent</a></td>
145 <td>Protected method handling a paint event.</td>
146 </tr><tr>
147 <td><a href="#E5LineEdit.removeWidget">removeWidget</a></td>
148 <td>Public method to remove a widget from a side.</td>
149 </tr><tr>
150 <td><a href="#E5LineEdit.setInactiveText">setInactiveText</a></td>
151 <td>Public method to set the inactive text.</td>
152 </tr><tr>
153 <td><a href="#E5LineEdit.setLeftMargin">setLeftMargin</a></td>
154 <td>Public method to set the left margin.</td>
155 </tr><tr>
156 <td><a href="#E5LineEdit.setWidgetSpacing">setWidgetSpacing</a></td>
157 <td>Public method to set the side widget spacing.</td>
158 </tr><tr>
159 <td><a href="#E5LineEdit.textMargin">textMargin</a></td>
160 <td>Public method to get the text margin for a side.</td>
161 </tr><tr>
162 <td><a href="#E5LineEdit.widgetSpacing">widgetSpacing</a></td>
163 <td>Public method to get the side widget spacing.</td>
164 </tr>
165 </table>
166 <h3>Static Methods</h3>
167 <table>
168 <tr><td>None</td></tr>
169 </table>
170 <a NAME="E5LineEdit.__init__" ID="E5LineEdit.__init__"></a>
171 <h4>E5LineEdit (Constructor)</h4>
172 <b>E5LineEdit</b>(<i>parent=None, inactiveText=""</i>)
173 <p>
174 Constructor
175 </p><dl>
176 <dt><i>parent</i></dt>
177 <dd>
178 reference to the parent widget (QWidget)
179 </dd><dt><i>inactiveText</i></dt>
180 <dd>
181 text to be shown on inactivity (string)
182 </dd>
183 </dl><a NAME="E5LineEdit._updateTextMargins" ID="E5LineEdit._updateTextMargins"></a>
184 <h4>E5LineEdit._updateTextMargins</h4>
185 <b>_updateTextMargins</b>(<i></i>)
186 <p>
187 Protected slot to update the text margins.
188 </p><a NAME="E5LineEdit.addWidget" ID="E5LineEdit.addWidget"></a>
189 <h4>E5LineEdit.addWidget</h4>
190 <b>addWidget</b>(<i>widget, position</i>)
191 <p>
192 Public method to add a widget to a side.
193 </p><dl>
194 <dt><i>widget</i></dt>
195 <dd>
196 reference to the widget to add (QWidget)
197 </dd><dt><i>position</i></dt>
198 <dd>
199 position to add to (E5LineEdit.LeftSide,
200 E5LineEdit.RightSide)
201 </dd>
202 </dl><a NAME="E5LineEdit.event" ID="E5LineEdit.event"></a>
203 <h4>E5LineEdit.event</h4>
204 <b>event</b>(<i>evt</i>)
205 <p>
206 Public method to handle events.
207 </p><dl>
208 <dt><i>evt</i></dt>
209 <dd>
210 reference to the event (QEvent)
211 </dd>
212 </dl><dl>
213 <dt>Returns:</dt>
214 <dd>
215 flag indicating, whether the event was recognized (boolean)
216 </dd>
217 </dl><a NAME="E5LineEdit.inactiveText" ID="E5LineEdit.inactiveText"></a>
218 <h4>E5LineEdit.inactiveText</h4>
219 <b>inactiveText</b>(<i></i>)
220 <p>
221 Public method to get the inactive text.
222 </p><dl>
223 <dt>Returns:</dt>
224 <dd>
225 inactive text (string)
226 </dd>
227 </dl><a NAME="E5LineEdit.leftMargin" ID="E5LineEdit.leftMargin"></a>
228 <h4>E5LineEdit.leftMargin</h4>
229 <b>leftMargin</b>(<i></i>)
230 <p>
231 Public method to get the size of the left margin.
232 </p><dl>
233 <dt>Returns:</dt>
234 <dd>
235 left margin in pixel (integer)
236 </dd>
237 </dl><a NAME="E5LineEdit.paintEvent" ID="E5LineEdit.paintEvent"></a>
238 <h4>E5LineEdit.paintEvent</h4>
239 <b>paintEvent</b>(<i>evt</i>)
240 <p>
241 Protected method handling a paint event.
242 </p><dl>
243 <dt><i>evt</i></dt>
244 <dd>
245 reference to the paint event (QPaintEvent)
246 </dd>
247 </dl><a NAME="E5LineEdit.removeWidget" ID="E5LineEdit.removeWidget"></a>
248 <h4>E5LineEdit.removeWidget</h4>
249 <b>removeWidget</b>(<i>widget</i>)
250 <p>
251 Public method to remove a widget from a side.
252 </p><dl>
253 <dt><i>widget</i></dt>
254 <dd>
255 reference to the widget to remove (QWidget)
256 </dd>
257 </dl><a NAME="E5LineEdit.setInactiveText" ID="E5LineEdit.setInactiveText"></a>
258 <h4>E5LineEdit.setInactiveText</h4>
259 <b>setInactiveText</b>(<i>inactiveText</i>)
260 <p>
261 Public method to set the inactive text.
262 </p><dl>
263 <dt><i>inactiveText</i></dt>
264 <dd>
265 text to be shown on inactivity (string)
266 </dd>
267 </dl><a NAME="E5LineEdit.setLeftMargin" ID="E5LineEdit.setLeftMargin"></a>
268 <h4>E5LineEdit.setLeftMargin</h4>
269 <b>setLeftMargin</b>(<i>margin</i>)
270 <p>
271 Public method to set the left margin.
272 </p><dl>
273 <dt><i>margin</i></dt>
274 <dd>
275 left margin in pixel (integer)
276 </dd>
277 </dl><a NAME="E5LineEdit.setWidgetSpacing" ID="E5LineEdit.setWidgetSpacing"></a>
278 <h4>E5LineEdit.setWidgetSpacing</h4>
279 <b>setWidgetSpacing</b>(<i>spacing</i>)
280 <p>
281 Public method to set the side widget spacing.
282 </p><dl>
283 <dt><i>spacing</i></dt>
284 <dd>
285 side widget spacing (integer)
286 </dd>
287 </dl><a NAME="E5LineEdit.textMargin" ID="E5LineEdit.textMargin"></a>
288 <h4>E5LineEdit.textMargin</h4>
289 <b>textMargin</b>(<i>position</i>)
290 <p>
291 Public method to get the text margin for a side.
292 </p><dl>
293 <dt><i>position</i></dt>
294 <dd>
295 side to get margin for (E5LineEdit.LeftSide,
296 E5LineEdit.RightSide)
297 </dd>
298 </dl><dl>
299 <dt>Returns:</dt>
300 <dd>
301 text margin (integer)
302 </dd>
303 </dl><a NAME="E5LineEdit.widgetSpacing" ID="E5LineEdit.widgetSpacing"></a>
304 <h4>E5LineEdit.widgetSpacing</h4>
305 <b>widgetSpacing</b>(<i></i>)
306 <p>
307 Public method to get the side widget spacing.
308 </p><dl>
309 <dt>Returns:</dt>
310 <dd>
311 side widget spacing (integer)
312 </dd>
313 </dl>
314 <div align="right"><a href="#top">Up</a></div>
315 <hr /><hr />
316 <a NAME="E5LineEditSideWidget" ID="E5LineEditSideWidget"></a>
317 <h2>E5LineEditSideWidget</h2>
318 <p>
319 Class implementing the side widgets for the line edit class.
320 </p><h3>Signals</h3>
321 <dl>
322 <dt>sizeHintChanged()</dt>
323 <dd>
324 emitted to indicate a change of the size hint
325 </dd>
326 </dl>
327 <h3>Derived from</h3>
328 QWidget
329 <h3>Class Attributes</h3>
330 <table>
331 <tr><td>None</td></tr>
332 </table>
333 <h3>Class Methods</h3>
334 <table>
335 <tr><td>None</td></tr>
336 </table>
337 <h3>Methods</h3>
338 <table>
339 <tr>
340 <td><a href="#E5LineEditSideWidget.__init__">E5LineEditSideWidget</a></td>
341 <td>Constructor</td>
342 </tr><tr>
343 <td><a href="#E5LineEditSideWidget.event">event</a></td>
344 <td>Public method to handle events.</td>
345 </tr>
346 </table>
347 <h3>Static Methods</h3>
348 <table>
349 <tr><td>None</td></tr>
350 </table>
351 <a NAME="E5LineEditSideWidget.__init__" ID="E5LineEditSideWidget.__init__"></a>
352 <h4>E5LineEditSideWidget (Constructor)</h4>
353 <b>E5LineEditSideWidget</b>(<i>parent=None</i>)
354 <p>
355 Constructor
356 </p><dl>
357 <dt><i>parent</i></dt>
358 <dd>
359 reference to the parent widget (QWidget)
360 </dd>
361 </dl><a NAME="E5LineEditSideWidget.event" ID="E5LineEditSideWidget.event"></a>
362 <h4>E5LineEditSideWidget.event</h4>
363 <b>event</b>(<i>evt</i>)
364 <p>
365 Public method to handle events.
366 </p><dl>
367 <dt><i>evt</i></dt>
368 <dd>
369 reference to the event (QEvent)
370 </dd>
371 </dl><dl>
372 <dt>Returns:</dt>
373 <dd>
374 flag indicating, whether the event was recognized (boolean)
375 </dd>
376 </dl>
377 <div align="right"><a href="#top">Up</a></div>
378 <hr />
379 </body></html>

eric ide

mercurial