eric7/Documentation/Source/eric7.EricWidgets.EricTextSpinBox.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.EricWidgets.EricTextSpinBox</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.EricWidgets.EricTextSpinBox</h1>
24
25 <p>
26 Module implementing a spinbox with textual entries.
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="#EricTextSpinBox">EricTextSpinBox</a></td>
39 <td>Class implementing a spinbox with textual entries.</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="EricTextSpinBox" ID="EricTextSpinBox"></a>
50 <h2>EricTextSpinBox</h2>
51
52 <p>
53 Class implementing a spinbox with textual entries.
54 </p>
55 <h3>Derived from</h3>
56 QSpinBox
57 <h3>Class Attributes</h3>
58
59 <table>
60 <tr><td>None</td></tr>
61 </table>
62 <h3>Class Methods</h3>
63
64 <table>
65 <tr><td>None</td></tr>
66 </table>
67 <h3>Methods</h3>
68
69 <table>
70
71 <tr>
72 <td><a href="#EricTextSpinBox.__init__">EricTextSpinBox</a></td>
73 <td>Constructor</td>
74 </tr>
75 <tr>
76 <td><a href="#EricTextSpinBox.addItem">addItem</a></td>
77 <td>Public method to add an item with item data.</td>
78 </tr>
79 <tr>
80 <td><a href="#EricTextSpinBox.currentIndex">currentIndex</a></td>
81 <td>Public method to retrieve the current index.</td>
82 </tr>
83 <tr>
84 <td><a href="#EricTextSpinBox.itemData">itemData</a></td>
85 <td>Public method to retrieve the data associated with an item.</td>
86 </tr>
87 <tr>
88 <td><a href="#EricTextSpinBox.textFromValue">textFromValue</a></td>
89 <td>Public method to convert a value to text.</td>
90 </tr>
91 <tr>
92 <td><a href="#EricTextSpinBox.valueFromText">valueFromText</a></td>
93 <td>Public method to convert a text to a value.</td>
94 </tr>
95 </table>
96 <h3>Static Methods</h3>
97
98 <table>
99 <tr><td>None</td></tr>
100 </table>
101
102 <a NAME="EricTextSpinBox.__init__" ID="EricTextSpinBox.__init__"></a>
103 <h4>EricTextSpinBox (Constructor)</h4>
104 <b>EricTextSpinBox</b>(<i>parent=None</i>)
105
106 <p>
107 Constructor
108 </p>
109 <dl>
110
111 <dt><i>parent</i></dt>
112 <dd>
113 reference to the parent widget (QWidget)
114 </dd>
115 </dl>
116 <a NAME="EricTextSpinBox.addItem" ID="EricTextSpinBox.addItem"></a>
117 <h4>EricTextSpinBox.addItem</h4>
118 <b>addItem</b>(<i>txt, data=None</i>)
119
120 <p>
121 Public method to add an item with item data.
122 </p>
123 <dl>
124
125 <dt><i>txt</i></dt>
126 <dd>
127 text to be shown (string)
128 </dd>
129 <dt><i>data</i></dt>
130 <dd>
131 associated data
132 </dd>
133 </dl>
134 <a NAME="EricTextSpinBox.currentIndex" ID="EricTextSpinBox.currentIndex"></a>
135 <h4>EricTextSpinBox.currentIndex</h4>
136 <b>currentIndex</b>(<i></i>)
137
138 <p>
139 Public method to retrieve the current index.
140 </p>
141 <dl>
142 <dt>Return:</dt>
143 <dd>
144 current index (integer)
145 </dd>
146 </dl>
147 <a NAME="EricTextSpinBox.itemData" ID="EricTextSpinBox.itemData"></a>
148 <h4>EricTextSpinBox.itemData</h4>
149 <b>itemData</b>(<i>index</i>)
150
151 <p>
152 Public method to retrieve the data associated with an item.
153 </p>
154 <dl>
155
156 <dt><i>index</i></dt>
157 <dd>
158 index of the item (integer)
159 </dd>
160 </dl>
161 <dl>
162 <dt>Return:</dt>
163 <dd>
164 associated data
165 </dd>
166 </dl>
167 <a NAME="EricTextSpinBox.textFromValue" ID="EricTextSpinBox.textFromValue"></a>
168 <h4>EricTextSpinBox.textFromValue</h4>
169 <b>textFromValue</b>(<i>value</i>)
170
171 <p>
172 Public method to convert a value to text.
173 </p>
174 <dl>
175
176 <dt><i>value</i></dt>
177 <dd>
178 value to be converted (integer)
179 </dd>
180 </dl>
181 <dl>
182 <dt>Return:</dt>
183 <dd>
184 text for the given value (string)
185 </dd>
186 </dl>
187 <a NAME="EricTextSpinBox.valueFromText" ID="EricTextSpinBox.valueFromText"></a>
188 <h4>EricTextSpinBox.valueFromText</h4>
189 <b>valueFromText</b>(<i>txt</i>)
190
191 <p>
192 Public method to convert a text to a value.
193 </p>
194 <dl>
195
196 <dt><i>txt</i></dt>
197 <dd>
198 text to be converted (string)
199 </dd>
200 </dl>
201 <dl>
202 <dt>Return:</dt>
203 <dd>
204 value for the given text (integer)
205 </dd>
206 </dl>
207 <div align="right"><a href="#top">Up</a></div>
208 <hr />
209 </body></html>

eric ide

mercurial