|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>eric5.E5Gui.E5TextSpinBox</title> |
|
6 <style> |
|
7 body { |
|
8 background:white; |
|
9 margin: 0em 1em 10em 1em; |
|
10 color: black; |
|
11 } |
|
12 |
|
13 h1 { color: white; background: #4FA4FF; } |
|
14 h2 { color: white; background: #4FA4FF; } |
|
15 h3 { color: white; background: #00557F; } |
|
16 h4 { color: white; background: #00557F; } |
|
17 |
|
18 a { color: #AA5500; } |
|
19 |
|
20 </style> |
|
21 </head> |
|
22 <body><a NAME="top" ID="top"></a> |
|
23 <h1>eric5.E5Gui.E5TextSpinBox</h1> |
|
24 |
|
25 <h3>Global Attributes</h3> |
|
26 <table> |
|
27 <tr><td>None</td></tr> |
|
28 </table> |
|
29 <h3>Classes</h3> |
|
30 <table> |
|
31 <tr> |
|
32 <td><a href="#E5TextSpinBox">E5TextSpinBox</a></td> |
|
33 <td>Class implementing a spinbox with textual entries.</td> |
|
34 </tr> |
|
35 </table> |
|
36 <h3>Functions</h3> |
|
37 <table> |
|
38 <tr><td>None</td></tr> |
|
39 </table> |
|
40 <hr /><hr /> |
|
41 <a NAME="E5TextSpinBox" ID="E5TextSpinBox"></a> |
|
42 <h2>E5TextSpinBox</h2> |
|
43 <p> |
|
44 Class implementing a spinbox with textual entries. |
|
45 </p> |
|
46 <h3>Derived from</h3> |
|
47 QSpinBox |
|
48 <h3>Class Attributes</h3> |
|
49 <table> |
|
50 <tr><td>None</td></tr> |
|
51 </table> |
|
52 <h3>Methods</h3> |
|
53 <table> |
|
54 <tr> |
|
55 <td><a href="#E5TextSpinBox.__init__">E5TextSpinBox</a></td> |
|
56 <td>Constructor</td> |
|
57 </tr><tr> |
|
58 <td><a href="#E5TextSpinBox.addItem">addItem</a></td> |
|
59 <td>Public method to add an item with item data.</td> |
|
60 </tr><tr> |
|
61 <td><a href="#E5TextSpinBox.currentIndex">currentIndex</a></td> |
|
62 <td>Public method to retrieve the current index.</td> |
|
63 </tr><tr> |
|
64 <td><a href="#E5TextSpinBox.itemData">itemData</a></td> |
|
65 <td>Public method to retrieve the data associated with an item.</td> |
|
66 </tr><tr> |
|
67 <td><a href="#E5TextSpinBox.textFromValue">textFromValue</a></td> |
|
68 <td>Protected method to convert a value to text.</td> |
|
69 </tr><tr> |
|
70 <td><a href="#E5TextSpinBox.valueFromText">valueFromText</a></td> |
|
71 <td>Protected method to convert a text to a value.</td> |
|
72 </tr> |
|
73 </table> |
|
74 <a NAME="E5TextSpinBox.__init__" ID="E5TextSpinBox.__init__"></a> |
|
75 <h4>E5TextSpinBox (Constructor)</h4> |
|
76 <b>E5TextSpinBox</b>(<i>parent = None</i>) |
|
77 <p> |
|
78 Constructor |
|
79 </p><dl> |
|
80 <dt><i>parent</i></dt> |
|
81 <dd> |
|
82 reference to the parent widget (QWidget) |
|
83 </dd> |
|
84 </dl><a NAME="E5TextSpinBox.addItem" ID="E5TextSpinBox.addItem"></a> |
|
85 <h4>E5TextSpinBox.addItem</h4> |
|
86 <b>addItem</b>(<i>txt, data = None</i>) |
|
87 <p> |
|
88 Public method to add an item with item data. |
|
89 </p><dl> |
|
90 <dt><i>txt</i></dt> |
|
91 <dd> |
|
92 text to be shown (string) |
|
93 </dd><dt><i>data</i></dt> |
|
94 <dd> |
|
95 associated data |
|
96 </dd> |
|
97 </dl><a NAME="E5TextSpinBox.currentIndex" ID="E5TextSpinBox.currentIndex"></a> |
|
98 <h4>E5TextSpinBox.currentIndex</h4> |
|
99 <b>currentIndex</b>(<i></i>) |
|
100 <p> |
|
101 Public method to retrieve the current index. |
|
102 </p><dl> |
|
103 <dt>Returns:</dt> |
|
104 <dd> |
|
105 current index (integer) |
|
106 </dd> |
|
107 </dl><a NAME="E5TextSpinBox.itemData" ID="E5TextSpinBox.itemData"></a> |
|
108 <h4>E5TextSpinBox.itemData</h4> |
|
109 <b>itemData</b>(<i>index</i>) |
|
110 <p> |
|
111 Public method to retrieve the data associated with an item. |
|
112 </p><dl> |
|
113 <dt><i>index</i></dt> |
|
114 <dd> |
|
115 index of the item (integer) |
|
116 </dd> |
|
117 </dl><dl> |
|
118 <dt>Returns:</dt> |
|
119 <dd> |
|
120 associated data |
|
121 </dd> |
|
122 </dl><a NAME="E5TextSpinBox.textFromValue" ID="E5TextSpinBox.textFromValue"></a> |
|
123 <h4>E5TextSpinBox.textFromValue</h4> |
|
124 <b>textFromValue</b>(<i>value</i>) |
|
125 <p> |
|
126 Protected method to convert a value to text. |
|
127 </p><dl> |
|
128 <dt><i>value</i></dt> |
|
129 <dd> |
|
130 value to be converted (integer) |
|
131 </dd> |
|
132 </dl><dl> |
|
133 <dt>Returns:</dt> |
|
134 <dd> |
|
135 text for the given value (string) |
|
136 </dd> |
|
137 </dl><a NAME="E5TextSpinBox.valueFromText" ID="E5TextSpinBox.valueFromText"></a> |
|
138 <h4>E5TextSpinBox.valueFromText</h4> |
|
139 <b>valueFromText</b>(<i>txt</i>) |
|
140 <p> |
|
141 Protected method to convert a text to a value. |
|
142 </p><dl> |
|
143 <dt><i>txt</i></dt> |
|
144 <dd> |
|
145 text to be converted (string) |
|
146 </dd> |
|
147 </dl><dl> |
|
148 <dt>Returns:</dt> |
|
149 <dd> |
|
150 value for the given text (integer) |
|
151 </dd> |
|
152 </dl> |
|
153 <div align="right"><a href="#top">Up</a></div> |
|
154 <hr /> |
|
155 </body></html> |