eric6/Documentation/Source/eric6.E5Gui.E5Action.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.E5Action</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.E5Action</h1>
23 <p>
24 Module implementing an Action class extending QAction.
25 </p><p>
26 This extension is necessary in order to support alternate keyboard
27 shortcuts.
28 </p>
29 <h3>Global Attributes</h3>
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <h3>Classes</h3>
34 <table>
35 <tr>
36 <td><a href="#ArgumentsError">ArgumentsError</a></td>
37 <td>Class implementing an exception, which is raised, if the wrong number of arguments are given.</td>
38 </tr><tr>
39 <td><a href="#E5Action">E5Action</a></td>
40 <td>Class implementing an Action class extending QAction.</td>
41 </tr>
42 </table>
43 <h3>Functions</h3>
44 <table>
45 <tr>
46 <td><a href="#addActions">addActions</a></td>
47 <td>Module function to add a list of actions to a widget.</td>
48 </tr><tr>
49 <td><a href="#createActionGroup">createActionGroup</a></td>
50 <td>Module function to create an action group.</td>
51 </tr>
52 </table>
53 <hr /><hr />
54 <a NAME="ArgumentsError" ID="ArgumentsError"></a>
55 <h2>ArgumentsError</h2>
56 <p>
57 Class implementing an exception, which is raised, if the wrong number of
58 arguments are given.
59 </p>
60 <h3>Derived from</h3>
61 RuntimeError
62 <h3>Class Attributes</h3>
63 <table>
64 <tr><td>None</td></tr>
65 </table>
66 <h3>Class Methods</h3>
67 <table>
68 <tr><td>None</td></tr>
69 </table>
70 <h3>Methods</h3>
71 <table>
72 <tr>
73 <td><a href="#ArgumentsError.__init__">ArgumentsError</a></td>
74 <td>Constructor</td>
75 </tr><tr>
76 <td><a href="#ArgumentsError.__repr__">__repr__</a></td>
77 <td>Special method returning a representation of the exception.</td>
78 </tr><tr>
79 <td><a href="#ArgumentsError.__str__">__str__</a></td>
80 <td>Special method returning a string representation of the exception.</td>
81 </tr>
82 </table>
83 <h3>Static Methods</h3>
84 <table>
85 <tr><td>None</td></tr>
86 </table>
87 <a NAME="ArgumentsError.__init__" ID="ArgumentsError.__init__"></a>
88 <h4>ArgumentsError (Constructor)</h4>
89 <b>ArgumentsError</b>(<i>error</i>)
90 <p>
91 Constructor
92 </p><dl>
93 <dt><i>error</i></dt>
94 <dd>
95 error message of the exception (string)
96 </dd>
97 </dl><a NAME="ArgumentsError.__repr__" ID="ArgumentsError.__repr__"></a>
98 <h4>ArgumentsError.__repr__</h4>
99 <b>__repr__</b>(<i></i>)
100 <p>
101 Special method returning a representation of the exception.
102 </p><dl>
103 <dt>Returns:</dt>
104 <dd>
105 string representing the error message
106 </dd>
107 </dl><a NAME="ArgumentsError.__str__" ID="ArgumentsError.__str__"></a>
108 <h4>ArgumentsError.__str__</h4>
109 <b>__str__</b>(<i></i>)
110 <p>
111 Special method returning a string representation of the exception.
112 </p><dl>
113 <dt>Returns:</dt>
114 <dd>
115 string representing the error message
116 </dd>
117 </dl>
118 <div align="right"><a href="#top">Up</a></div>
119 <hr /><hr />
120 <a NAME="E5Action" ID="E5Action"></a>
121 <h2>E5Action</h2>
122 <p>
123 Class implementing an Action class extending QAction.
124 </p>
125 <h3>Derived from</h3>
126 QAction
127 <h3>Class Attributes</h3>
128 <table>
129 <tr><td>None</td></tr>
130 </table>
131 <h3>Class Methods</h3>
132 <table>
133 <tr><td>None</td></tr>
134 </table>
135 <h3>Methods</h3>
136 <table>
137 <tr>
138 <td><a href="#E5Action.__init__">E5Action</a></td>
139 <td>Constructor</td>
140 </tr><tr>
141 <td><a href="#E5Action.__ammendToolTip">__ammendToolTip</a></td>
142 <td>Private slot to add the primary keyboard accelerator to the tooltip.</td>
143 </tr><tr>
144 <td><a href="#E5Action.alternateShortcut">alternateShortcut</a></td>
145 <td>Public method to retrieve the alternative keyboard shortcut.</td>
146 </tr><tr>
147 <td><a href="#E5Action.setAlternateShortcut">setAlternateShortcut</a></td>
148 <td>Public slot to set the alternative keyboard shortcut.</td>
149 </tr><tr>
150 <td><a href="#E5Action.setIconText">setIconText</a></td>
151 <td>Public slot to set the icon text of the action.</td>
152 </tr><tr>
153 <td><a href="#E5Action.setShortcut">setShortcut</a></td>
154 <td>Public slot to set the keyboard shortcut.</td>
155 </tr><tr>
156 <td><a href="#E5Action.setShortcuts">setShortcuts</a></td>
157 <td>Public slot to set the list of keyboard shortcuts.</td>
158 </tr>
159 </table>
160 <h3>Static Methods</h3>
161 <table>
162 <tr><td>None</td></tr>
163 </table>
164 <a NAME="E5Action.__init__" ID="E5Action.__init__"></a>
165 <h4>E5Action (Constructor)</h4>
166 <b>E5Action</b>(<i>*args</i>)
167 <p>
168 Constructor
169 </p><dl>
170 <dt><i>args</i></dt>
171 <dd>
172 argument list of the constructor. This list is one of
173 <ul>
174 <li>text (string), icon (QIcon), menu text (string),
175 accelarator (QKeySequence), alternative accelerator
176 (QKeySequence), parent (QObject), name (string), toggle
177 (boolean)</li>
178 <li>text (string), icon (QIcon), menu text (string),
179 accelarator (QKeySequence), alternative accelerator
180 (QKeySequence), parent (QObject), name (string)</li>
181 <li>text (string), menu text (string),
182 accelarator (QKeySequence), alternative accelerator
183 (QKeySequence), parent (QObject), name (string), toggle
184 (boolean)</li>
185 <li>text (string), menu text (string),
186 accelarator (QKeySequence), alternative accelerator
187 (QKeySequence), parent (QObject), name (string)</li>
188 </ul>
189 </dd>
190 </dl><dl>
191 <dt>Raises <b>ArgumentsError</b>:</dt>
192 <dd>
193 raised to indicate invalid arguments
194 </dd>
195 </dl><a NAME="E5Action.__ammendToolTip" ID="E5Action.__ammendToolTip"></a>
196 <h4>E5Action.__ammendToolTip</h4>
197 <b>__ammendToolTip</b>(<i></i>)
198 <p>
199 Private slot to add the primary keyboard accelerator to the tooltip.
200 </p><a NAME="E5Action.alternateShortcut" ID="E5Action.alternateShortcut"></a>
201 <h4>E5Action.alternateShortcut</h4>
202 <b>alternateShortcut</b>(<i></i>)
203 <p>
204 Public method to retrieve the alternative keyboard shortcut.
205 </p><dl>
206 <dt>Returns:</dt>
207 <dd>
208 the alternative accelerator (QKeySequence)
209 </dd>
210 </dl><a NAME="E5Action.setAlternateShortcut" ID="E5Action.setAlternateShortcut"></a>
211 <h4>E5Action.setAlternateShortcut</h4>
212 <b>setAlternateShortcut</b>(<i>shortcut, removeEmpty=False</i>)
213 <p>
214 Public slot to set the alternative keyboard shortcut.
215 </p><dl>
216 <dt><i>shortcut</i></dt>
217 <dd>
218 the alternative accelerator (QKeySequence)
219 </dd><dt><i>removeEmpty</i></dt>
220 <dd>
221 flag indicating to remove the alternate shortcut,
222 if it is empty (boolean)
223 </dd>
224 </dl><a NAME="E5Action.setIconText" ID="E5Action.setIconText"></a>
225 <h4>E5Action.setIconText</h4>
226 <b>setIconText</b>(<i>text</i>)
227 <p>
228 Public slot to set the icon text of the action.
229 </p><dl>
230 <dt><i>text</i></dt>
231 <dd>
232 new icon text (string)
233 </dd>
234 </dl><a NAME="E5Action.setShortcut" ID="E5Action.setShortcut"></a>
235 <h4>E5Action.setShortcut</h4>
236 <b>setShortcut</b>(<i>shortcut</i>)
237 <p>
238 Public slot to set the keyboard shortcut.
239 </p><dl>
240 <dt><i>shortcut</i></dt>
241 <dd>
242 the accelerator (QKeySequence)
243 </dd>
244 </dl><a NAME="E5Action.setShortcuts" ID="E5Action.setShortcuts"></a>
245 <h4>E5Action.setShortcuts</h4>
246 <b>setShortcuts</b>(<i>shortcuts</i>)
247 <p>
248 Public slot to set the list of keyboard shortcuts.
249 </p><dl>
250 <dt><i>shortcuts</i></dt>
251 <dd>
252 list of keyboard accelerators (list of QKeySequence)
253 or key for a platform dependent list of accelerators
254 (QKeySequence.StandardKey)
255 </dd>
256 </dl>
257 <div align="right"><a href="#top">Up</a></div>
258 <hr /><hr />
259 <a NAME="addActions" ID="addActions"></a>
260 <h2>addActions</h2>
261 <b>addActions</b>(<i>target, actions</i>)
262 <p>
263 Module function to add a list of actions to a widget.
264 </p><dl>
265 <dt><i>target</i></dt>
266 <dd>
267 reference to the target widget (QWidget)
268 </dd><dt><i>actions</i></dt>
269 <dd>
270 list of actions to be added to the target. A
271 None indicates a separator (list of QActions)
272 </dd>
273 </dl>
274 <div align="right"><a href="#top">Up</a></div>
275 <hr /><hr />
276 <a NAME="createActionGroup" ID="createActionGroup"></a>
277 <h2>createActionGroup</h2>
278 <b>createActionGroup</b>(<i>parent, name=None, exclusive=False</i>)
279 <p>
280 Module function to create an action group.
281 </p><dl>
282 <dt><i>parent</i></dt>
283 <dd>
284 parent object of the action group (QObject)
285 </dd><dt><i>name</i></dt>
286 <dd>
287 name of the action group object (string)
288 </dd><dt><i>exclusive</i></dt>
289 <dd>
290 flag indicating an exclusive action group (boolean)
291 </dd>
292 </dl><dl>
293 <dt>Returns:</dt>
294 <dd>
295 reference to the created action group (QActionGroup)
296 </dd>
297 </dl>
298 <div align="right"><a href="#top">Up</a></div>
299 <hr />
300 </body></html>

eric ide

mercurial