eric6/Documentation/Source/eric6.E5Gui.E5SqueezeLabels.html

branch
maintenance
changeset 6989
8b8cadf8d7e9
parent 6942
2602857055c5
child 7273
391d6b7b1eff
equal deleted inserted replaced
6938:7926553b7509 6989:8b8cadf8d7e9
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.E5Gui.E5SqueezeLabels</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.E5SqueezeLabels</h1>
23 <p>
24 Module implementing labels that squeeze their contents to fit the size of the
25 label.
26 </p>
27 <h3>Global Attributes</h3>
28 <table>
29 <tr><td>None</td></tr>
30 </table>
31 <h3>Classes</h3>
32 <table>
33 <tr>
34 <td><a href="#E5SqueezeLabel">E5SqueezeLabel</a></td>
35 <td>Class implementing a label that squeezes its contents to fit its size.</td>
36 </tr><tr>
37 <td><a href="#E5SqueezeLabelPath">E5SqueezeLabelPath</a></td>
38 <td>Class implementing a label showing a file path compacted to fit its size.</td>
39 </tr>
40 </table>
41 <h3>Functions</h3>
42 <table>
43 <tr><td>None</td></tr>
44 </table>
45 <hr /><hr />
46 <a NAME="E5SqueezeLabel" ID="E5SqueezeLabel"></a>
47 <h2>E5SqueezeLabel</h2>
48 <p>
49 Class implementing a label that squeezes its contents to fit its size.
50 </p>
51 <h3>Derived from</h3>
52 QLabel
53 <h3>Class Attributes</h3>
54 <table>
55 <tr><td>None</td></tr>
56 </table>
57 <h3>Class Methods</h3>
58 <table>
59 <tr><td>None</td></tr>
60 </table>
61 <h3>Methods</h3>
62 <table>
63 <tr>
64 <td><a href="#E5SqueezeLabel.__init__">E5SqueezeLabel</a></td>
65 <td>Constructor</td>
66 </tr><tr>
67 <td><a href="#E5SqueezeLabel.paintEvent">paintEvent</a></td>
68 <td>Protected method called when some painting is required.</td>
69 </tr><tr>
70 <td><a href="#E5SqueezeLabel.setText">setText</a></td>
71 <td>Public method to set the label's text.</td>
72 </tr>
73 </table>
74 <h3>Static Methods</h3>
75 <table>
76 <tr><td>None</td></tr>
77 </table>
78 <a NAME="E5SqueezeLabel.__init__" ID="E5SqueezeLabel.__init__"></a>
79 <h4>E5SqueezeLabel (Constructor)</h4>
80 <b>E5SqueezeLabel</b>(<i>parent=None</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>
88 </dl><a NAME="E5SqueezeLabel.paintEvent" ID="E5SqueezeLabel.paintEvent"></a>
89 <h4>E5SqueezeLabel.paintEvent</h4>
90 <b>paintEvent</b>(<i>event</i>)
91 <p>
92 Protected method called when some painting is required.
93 </p><dl>
94 <dt><i>event</i></dt>
95 <dd>
96 reference to the paint event (QPaintEvent)
97 </dd>
98 </dl><a NAME="E5SqueezeLabel.setText" ID="E5SqueezeLabel.setText"></a>
99 <h4>E5SqueezeLabel.setText</h4>
100 <b>setText</b>(<i>txt</i>)
101 <p>
102 Public method to set the label's text.
103 </p><dl>
104 <dt><i>txt</i></dt>
105 <dd>
106 the text to be shown (string)
107 </dd>
108 </dl>
109 <div align="right"><a href="#top">Up</a></div>
110 <hr /><hr />
111 <a NAME="E5SqueezeLabelPath" ID="E5SqueezeLabelPath"></a>
112 <h2>E5SqueezeLabelPath</h2>
113 <p>
114 Class implementing a label showing a file path compacted to fit its size.
115 </p>
116 <h3>Derived from</h3>
117 QLabel
118 <h3>Class Attributes</h3>
119 <table>
120 <tr><td>None</td></tr>
121 </table>
122 <h3>Class Methods</h3>
123 <table>
124 <tr><td>None</td></tr>
125 </table>
126 <h3>Methods</h3>
127 <table>
128 <tr>
129 <td><a href="#E5SqueezeLabelPath.__init__">E5SqueezeLabelPath</a></td>
130 <td>Constructor</td>
131 </tr><tr>
132 <td><a href="#E5SqueezeLabelPath.length">length</a></td>
133 <td>Public method to return the length of a text in pixels.</td>
134 </tr><tr>
135 <td><a href="#E5SqueezeLabelPath.paintEvent">paintEvent</a></td>
136 <td>Protected method called when some painting is required.</td>
137 </tr><tr>
138 <td><a href="#E5SqueezeLabelPath.setPath">setPath</a></td>
139 <td>Public method to set the path of the label.</td>
140 </tr><tr>
141 <td><a href="#E5SqueezeLabelPath.setSurrounding">setSurrounding</a></td>
142 <td>Public method to set the surrounding of the path string.</td>
143 </tr><tr>
144 <td><a href="#E5SqueezeLabelPath.setTextPath">setTextPath</a></td>
145 <td>Public method to set the surrounding and the path of the label.</td>
146 </tr>
147 </table>
148 <h3>Static Methods</h3>
149 <table>
150 <tr><td>None</td></tr>
151 </table>
152 <a NAME="E5SqueezeLabelPath.__init__" ID="E5SqueezeLabelPath.__init__"></a>
153 <h4>E5SqueezeLabelPath (Constructor)</h4>
154 <b>E5SqueezeLabelPath</b>(<i>parent=None</i>)
155 <p>
156 Constructor
157 </p><dl>
158 <dt><i>parent</i></dt>
159 <dd>
160 reference to the parent Widget (QWidget)
161 </dd>
162 </dl><a NAME="E5SqueezeLabelPath.length" ID="E5SqueezeLabelPath.length"></a>
163 <h4>E5SqueezeLabelPath.length</h4>
164 <b>length</b>(<i>txt</i>)
165 <p>
166 Public method to return the length of a text in pixels.
167 </p><dl>
168 <dt><i>txt</i></dt>
169 <dd>
170 text to calculate the length for after wrapped (string)
171 </dd>
172 </dl><dl>
173 <dt>Returns:</dt>
174 <dd>
175 length of the wrapped text in pixels (integer)
176 </dd>
177 </dl><a NAME="E5SqueezeLabelPath.paintEvent" ID="E5SqueezeLabelPath.paintEvent"></a>
178 <h4>E5SqueezeLabelPath.paintEvent</h4>
179 <b>paintEvent</b>(<i>event</i>)
180 <p>
181 Protected method called when some painting is required.
182 </p><dl>
183 <dt><i>event</i></dt>
184 <dd>
185 reference to the paint event (QPaintEvent)
186 </dd>
187 </dl><a NAME="E5SqueezeLabelPath.setPath" ID="E5SqueezeLabelPath.setPath"></a>
188 <h4>E5SqueezeLabelPath.setPath</h4>
189 <b>setPath</b>(<i>path</i>)
190 <p>
191 Public method to set the path of the label.
192 </p><dl>
193 <dt><i>path</i></dt>
194 <dd>
195 path to be shown (string)
196 </dd>
197 </dl><a NAME="E5SqueezeLabelPath.setSurrounding" ID="E5SqueezeLabelPath.setSurrounding"></a>
198 <h4>E5SqueezeLabelPath.setSurrounding</h4>
199 <b>setSurrounding</b>(<i>surrounding</i>)
200 <p>
201 Public method to set the surrounding of the path string.
202 </p><dl>
203 <dt><i>surrounding</i></dt>
204 <dd>
205 the a string containg placeholders for the path
206 (string)
207 </dd>
208 </dl><a NAME="E5SqueezeLabelPath.setTextPath" ID="E5SqueezeLabelPath.setTextPath"></a>
209 <h4>E5SqueezeLabelPath.setTextPath</h4>
210 <b>setTextPath</b>(<i>surrounding, path</i>)
211 <p>
212 Public method to set the surrounding and the path of the label.
213 </p><dl>
214 <dt><i>surrounding</i></dt>
215 <dd>
216 the a string containg placeholders for the path
217 (string)
218 </dd><dt><i>path</i></dt>
219 <dd>
220 path to be shown (string)
221 </dd>
222 </dl>
223 <div align="right"><a href="#top">Up</a></div>
224 <hr />
225 </body></html>

eric ide

mercurial