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