src/eric7/Documentation/Source/eric7.EricWidgets.EricSqueezeLabels.html

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8596
d64760b2da50
child 10423
299802979277
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.EricWidgets.EricSqueezeLabels</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.EricWidgets.EricSqueezeLabels</h1>
10
11 <p>
12 Module implementing labels that squeeze their contents to fit the size of the
13 label.
14 </p>
15 <h3>Global Attributes</h3>
16
17 <table>
18 <tr><td>None</td></tr>
19 </table>
20 <h3>Classes</h3>
21
22 <table>
23
24 <tr>
25 <td><a href="#EricSqueezeLabel">EricSqueezeLabel</a></td>
26 <td>Class implementing a label that squeezes its contents to fit its size.</td>
27 </tr>
28 <tr>
29 <td><a href="#EricSqueezeLabelPath">EricSqueezeLabelPath</a></td>
30 <td>Class implementing a label showing a file path compacted to fit its size.</td>
31 </tr>
32 </table>
33 <h3>Functions</h3>
34
35 <table>
36 <tr><td>None</td></tr>
37 </table>
38 <hr />
39 <hr />
40 <a NAME="EricSqueezeLabel" ID="EricSqueezeLabel"></a>
41 <h2>EricSqueezeLabel</h2>
42
43 <p>
44 Class implementing a label that squeezes its contents to fit its size.
45 </p>
46 <h3>Derived from</h3>
47 QLabel
48 <h3>Class Attributes</h3>
49
50 <table>
51 <tr><td>None</td></tr>
52 </table>
53 <h3>Class Methods</h3>
54
55 <table>
56 <tr><td>None</td></tr>
57 </table>
58 <h3>Methods</h3>
59
60 <table>
61
62 <tr>
63 <td><a href="#EricSqueezeLabel.__init__">EricSqueezeLabel</a></td>
64 <td>Constructor</td>
65 </tr>
66 <tr>
67 <td><a href="#EricSqueezeLabel.paintEvent">paintEvent</a></td>
68 <td>Protected method called when some painting is required.</td>
69 </tr>
70 <tr>
71 <td><a href="#EricSqueezeLabel.setText">setText</a></td>
72 <td>Public method to set the label's text.</td>
73 </tr>
74 </table>
75 <h3>Static Methods</h3>
76
77 <table>
78 <tr><td>None</td></tr>
79 </table>
80
81 <a NAME="EricSqueezeLabel.__init__" ID="EricSqueezeLabel.__init__"></a>
82 <h4>EricSqueezeLabel (Constructor)</h4>
83 <b>EricSqueezeLabel</b>(<i>parent=None</i>)
84
85 <p>
86 Constructor
87 </p>
88 <dl>
89
90 <dt><i>parent</i></dt>
91 <dd>
92 reference to the parent Widget (QWidget)
93 </dd>
94 </dl>
95 <a NAME="EricSqueezeLabel.paintEvent" ID="EricSqueezeLabel.paintEvent"></a>
96 <h4>EricSqueezeLabel.paintEvent</h4>
97 <b>paintEvent</b>(<i>event</i>)
98
99 <p>
100 Protected method called when some painting is required.
101 </p>
102 <dl>
103
104 <dt><i>event</i></dt>
105 <dd>
106 reference to the paint event (QPaintEvent)
107 </dd>
108 </dl>
109 <a NAME="EricSqueezeLabel.setText" ID="EricSqueezeLabel.setText"></a>
110 <h4>EricSqueezeLabel.setText</h4>
111 <b>setText</b>(<i>txt</i>)
112
113 <p>
114 Public method to set the label's text.
115 </p>
116 <dl>
117
118 <dt><i>txt</i></dt>
119 <dd>
120 the text to be shown (string)
121 </dd>
122 </dl>
123 <div align="right"><a href="#top">Up</a></div>
124 <hr />
125 <hr />
126 <a NAME="EricSqueezeLabelPath" ID="EricSqueezeLabelPath"></a>
127 <h2>EricSqueezeLabelPath</h2>
128
129 <p>
130 Class implementing a label showing a file path compacted to fit its size.
131 </p>
132 <h3>Derived from</h3>
133 QLabel
134 <h3>Class Attributes</h3>
135
136 <table>
137 <tr><td>None</td></tr>
138 </table>
139 <h3>Class Methods</h3>
140
141 <table>
142 <tr><td>None</td></tr>
143 </table>
144 <h3>Methods</h3>
145
146 <table>
147
148 <tr>
149 <td><a href="#EricSqueezeLabelPath.__init__">EricSqueezeLabelPath</a></td>
150 <td>Constructor</td>
151 </tr>
152 <tr>
153 <td><a href="#EricSqueezeLabelPath.length">length</a></td>
154 <td>Public method to return the length of a text in pixels.</td>
155 </tr>
156 <tr>
157 <td><a href="#EricSqueezeLabelPath.paintEvent">paintEvent</a></td>
158 <td>Protected method called when some painting is required.</td>
159 </tr>
160 <tr>
161 <td><a href="#EricSqueezeLabelPath.setPath">setPath</a></td>
162 <td>Public method to set the path of the label.</td>
163 </tr>
164 <tr>
165 <td><a href="#EricSqueezeLabelPath.setSurrounding">setSurrounding</a></td>
166 <td>Public method to set the surrounding of the path string.</td>
167 </tr>
168 <tr>
169 <td><a href="#EricSqueezeLabelPath.setTextPath">setTextPath</a></td>
170 <td>Public method to set the surrounding and the path of the label.</td>
171 </tr>
172 </table>
173 <h3>Static Methods</h3>
174
175 <table>
176 <tr><td>None</td></tr>
177 </table>
178
179 <a NAME="EricSqueezeLabelPath.__init__" ID="EricSqueezeLabelPath.__init__"></a>
180 <h4>EricSqueezeLabelPath (Constructor)</h4>
181 <b>EricSqueezeLabelPath</b>(<i>parent=None</i>)
182
183 <p>
184 Constructor
185 </p>
186 <dl>
187
188 <dt><i>parent</i></dt>
189 <dd>
190 reference to the parent Widget (QWidget)
191 </dd>
192 </dl>
193 <a NAME="EricSqueezeLabelPath.length" ID="EricSqueezeLabelPath.length"></a>
194 <h4>EricSqueezeLabelPath.length</h4>
195 <b>length</b>(<i>txt</i>)
196
197 <p>
198 Public method to return the length of a text in pixels.
199 </p>
200 <dl>
201
202 <dt><i>txt</i></dt>
203 <dd>
204 text to calculate the length for after wrapped (string)
205 </dd>
206 </dl>
207 <dl>
208 <dt>Return:</dt>
209 <dd>
210 length of the wrapped text in pixels (integer)
211 </dd>
212 </dl>
213 <a NAME="EricSqueezeLabelPath.paintEvent" ID="EricSqueezeLabelPath.paintEvent"></a>
214 <h4>EricSqueezeLabelPath.paintEvent</h4>
215 <b>paintEvent</b>(<i>event</i>)
216
217 <p>
218 Protected method called when some painting is required.
219 </p>
220 <dl>
221
222 <dt><i>event</i></dt>
223 <dd>
224 reference to the paint event (QPaintEvent)
225 </dd>
226 </dl>
227 <a NAME="EricSqueezeLabelPath.setPath" ID="EricSqueezeLabelPath.setPath"></a>
228 <h4>EricSqueezeLabelPath.setPath</h4>
229 <b>setPath</b>(<i>path</i>)
230
231 <p>
232 Public method to set the path of the label.
233 </p>
234 <dl>
235
236 <dt><i>path</i></dt>
237 <dd>
238 path to be shown (string)
239 </dd>
240 </dl>
241 <a NAME="EricSqueezeLabelPath.setSurrounding" ID="EricSqueezeLabelPath.setSurrounding"></a>
242 <h4>EricSqueezeLabelPath.setSurrounding</h4>
243 <b>setSurrounding</b>(<i>surrounding</i>)
244
245 <p>
246 Public method to set the surrounding of the path string.
247 </p>
248 <dl>
249
250 <dt><i>surrounding</i></dt>
251 <dd>
252 the a string containg placeholders for the path
253 (string)
254 </dd>
255 </dl>
256 <a NAME="EricSqueezeLabelPath.setTextPath" ID="EricSqueezeLabelPath.setTextPath"></a>
257 <h4>EricSqueezeLabelPath.setTextPath</h4>
258 <b>setTextPath</b>(<i>surrounding, path</i>)
259
260 <p>
261 Public method to set the surrounding and the path of the label.
262 </p>
263 <dl>
264
265 <dt><i>surrounding</i></dt>
266 <dd>
267 the a string containg placeholders for the path
268 (string)
269 </dd>
270 <dt><i>path</i></dt>
271 <dd>
272 path to be shown (string)
273 </dd>
274 </dl>
275 <div align="right"><a href="#top">Up</a></div>
276 <hr />
277 </body></html>

eric ide

mercurial