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