|
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.E5Action</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.E5Action</h1> |
|
24 <p> |
|
25 Module implementing an Action class extending QAction. |
|
26 </p><p> |
|
27 This extension is necessary in order to support alternate keyboard |
|
28 shortcuts. |
|
29 </p> |
|
30 <h3>Global Attributes</h3> |
|
31 <table> |
|
32 <tr><td>None</td></tr> |
|
33 </table> |
|
34 <h3>Classes</h3> |
|
35 <table> |
|
36 <tr> |
|
37 <td><a href="#ArgumentsError">ArgumentsError</a></td> |
|
38 <td>Class implementing an exception, which is raised, if the wrong number of arguments are given.</td> |
|
39 </tr><tr> |
|
40 <td><a href="#E5Action">E5Action</a></td> |
|
41 <td>Class implementing an Action class extending QAction.</td> |
|
42 </tr> |
|
43 </table> |
|
44 <h3>Functions</h3> |
|
45 <table> |
|
46 <tr> |
|
47 <td><a href="#addActions">addActions</a></td> |
|
48 <td>Module function to add a list of actions to a widget.</td> |
|
49 </tr><tr> |
|
50 <td><a href="#createActionGroup">createActionGroup</a></td> |
|
51 <td>Module function to create an action group.</td> |
|
52 </tr> |
|
53 </table> |
|
54 <hr /><hr /> |
|
55 <a NAME="ArgumentsError" ID="ArgumentsError"></a> |
|
56 <h2>ArgumentsError</h2> |
|
57 <p> |
|
58 Class implementing an exception, which is raised, if the wrong number of arguments |
|
59 are given. |
|
60 </p> |
|
61 <h3>Derived from</h3> |
|
62 RuntimeError |
|
63 <h3>Class Attributes</h3> |
|
64 <table> |
|
65 <tr><td>None</td></tr> |
|
66 </table> |
|
67 <h3>Methods</h3> |
|
68 <table> |
|
69 <tr> |
|
70 <td><a href="#ArgumentsError.__init__">ArgumentsError</a></td> |
|
71 <td>Constructor</td> |
|
72 </tr><tr> |
|
73 <td><a href="#ArgumentsError.__repr__">__repr__</a></td> |
|
74 <td>Private method returning a representation of the exception.</td> |
|
75 </tr><tr> |
|
76 <td><a href="#ArgumentsError.__str__">__str__</a></td> |
|
77 <td>Private method returning a string representation of the exception.</td> |
|
78 </tr> |
|
79 </table> |
|
80 <a NAME="ArgumentsError.__init__" ID="ArgumentsError.__init__"></a> |
|
81 <h4>ArgumentsError (Constructor)</h4> |
|
82 <b>ArgumentsError</b>(<i>error</i>) |
|
83 <p> |
|
84 Constructor |
|
85 </p><a NAME="ArgumentsError.__repr__" ID="ArgumentsError.__repr__"></a> |
|
86 <h4>ArgumentsError.__repr__</h4> |
|
87 <b>__repr__</b>(<i></i>) |
|
88 <p> |
|
89 Private method returning a representation of the exception. |
|
90 </p><dl> |
|
91 <dt>Returns:</dt> |
|
92 <dd> |
|
93 string representing the error message |
|
94 </dd> |
|
95 </dl><a NAME="ArgumentsError.__str__" ID="ArgumentsError.__str__"></a> |
|
96 <h4>ArgumentsError.__str__</h4> |
|
97 <b>__str__</b>(<i></i>) |
|
98 <p> |
|
99 Private method returning a string representation of the exception. |
|
100 </p><dl> |
|
101 <dt>Returns:</dt> |
|
102 <dd> |
|
103 string representing the error message |
|
104 </dd> |
|
105 </dl> |
|
106 <div align="right"><a href="#top">Up</a></div> |
|
107 <hr /><hr /> |
|
108 <a NAME="E5Action" ID="E5Action"></a> |
|
109 <h2>E5Action</h2> |
|
110 <p> |
|
111 Class implementing an Action class extending QAction. |
|
112 </p> |
|
113 <h3>Derived from</h3> |
|
114 QAction |
|
115 <h3>Class Attributes</h3> |
|
116 <table> |
|
117 <tr><td>None</td></tr> |
|
118 </table> |
|
119 <h3>Methods</h3> |
|
120 <table> |
|
121 <tr> |
|
122 <td><a href="#E5Action.__init__">E5Action</a></td> |
|
123 <td>Constructor</td> |
|
124 </tr><tr> |
|
125 <td><a href="#E5Action.alternateShortcut">alternateShortcut</a></td> |
|
126 <td>Public method to retrieve the alternative keyboard shortcut.</td> |
|
127 </tr><tr> |
|
128 <td><a href="#E5Action.setAlternateShortcut">setAlternateShortcut</a></td> |
|
129 <td>Public slot to set the alternative keyboard shortcut.</td> |
|
130 </tr> |
|
131 </table> |
|
132 <a NAME="E5Action.__init__" ID="E5Action.__init__"></a> |
|
133 <h4>E5Action (Constructor)</h4> |
|
134 <b>E5Action</b>(<i>*args</i>) |
|
135 <p> |
|
136 Constructor |
|
137 </p><dl> |
|
138 <dt><i>args</i></dt> |
|
139 <dd> |
|
140 argument list of the constructor. This list is one of |
|
141 <ul> |
|
142 <li>text (string), icon (QIcon), menu text (string), |
|
143 accelarator (QKeySequence), alternative accelerator (QKeySequence), |
|
144 parent (QObject), name (string), toggle (boolean)</li> |
|
145 <li>text (string), icon (QIcon), menu text (string), |
|
146 accelarator (QKeySequence), alternative accelerator (QKeySequence), |
|
147 parent (QObject), name (string)</li> |
|
148 <li>text (string), menu text (string), |
|
149 accelarator (QKeySequence), alternative accelerator (QKeySequence), |
|
150 parent (QObject), name (string), toggle (boolean)</li> |
|
151 <li>text (string), menu text (string), |
|
152 accelarator (QKeySequence), alternative accelerator (QKeySequence), |
|
153 parent (QObject), name (string)</li> |
|
154 </ul> |
|
155 </dd> |
|
156 </dl><a NAME="E5Action.alternateShortcut" ID="E5Action.alternateShortcut"></a> |
|
157 <h4>E5Action.alternateShortcut</h4> |
|
158 <b>alternateShortcut</b>(<i></i>) |
|
159 <p> |
|
160 Public method to retrieve the alternative keyboard shortcut. |
|
161 </p><dl> |
|
162 <dt>Returns:</dt> |
|
163 <dd> |
|
164 the alternative accelerator (QKeySequence) |
|
165 </dd> |
|
166 </dl><a NAME="E5Action.setAlternateShortcut" ID="E5Action.setAlternateShortcut"></a> |
|
167 <h4>E5Action.setAlternateShortcut</h4> |
|
168 <b>setAlternateShortcut</b>(<i>shortcut</i>) |
|
169 <p> |
|
170 Public slot to set the alternative keyboard shortcut. |
|
171 </p><dl> |
|
172 <dt><i>shortcut</i></dt> |
|
173 <dd> |
|
174 the alternative accelerator (QKeySequence) |
|
175 </dd> |
|
176 </dl> |
|
177 <div align="right"><a href="#top">Up</a></div> |
|
178 <hr /><hr /> |
|
179 <a NAME="addActions" ID="addActions"></a> |
|
180 <h2>addActions</h2> |
|
181 <b>addActions</b>(<i>target, actions</i>) |
|
182 <p> |
|
183 Module function to add a list of actions to a widget. |
|
184 </p><dl> |
|
185 <dt><i>target</i></dt> |
|
186 <dd> |
|
187 reference to the target widget (QWidget) |
|
188 </dd><dt><i>actions</i></dt> |
|
189 <dd> |
|
190 list of actions to be added to the target. A |
|
191 None indicates a separator (list of QActions) |
|
192 </dd> |
|
193 </dl> |
|
194 <div align="right"><a href="#top">Up</a></div> |
|
195 <hr /><hr /> |
|
196 <a NAME="createActionGroup" ID="createActionGroup"></a> |
|
197 <h2>createActionGroup</h2> |
|
198 <b>createActionGroup</b>(<i>parent, name = None, exclusive = False</i>) |
|
199 <p> |
|
200 Module function to create an action group. |
|
201 </p><dl> |
|
202 <dt><i>parent</i></dt> |
|
203 <dd> |
|
204 parent object of the action group (QObject) |
|
205 </dd><dt><i>name</i></dt> |
|
206 <dd> |
|
207 name of the action group object (string) |
|
208 </dd><dt><i>exclusive</i></dt> |
|
209 <dd> |
|
210 flag indicating an exclusive action group (boolean) |
|
211 </dd> |
|
212 </dl><dl> |
|
213 <dt>Returns:</dt> |
|
214 <dd> |
|
215 reference to the created action group (QActionGroup) |
|
216 </dd> |
|
217 </dl> |
|
218 <div align="right"><a href="#top">Up</a></div> |
|
219 <hr /> |
|
220 </body></html> |