|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.Preferences.Shortcuts</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.Preferences.Shortcuts</h1> |
|
23 <p> |
|
24 Module implementing functions dealing with keyboard shortcuts. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr><td>None</td></tr> |
|
33 </table> |
|
34 <h3>Functions</h3> |
|
35 <table> |
|
36 <tr> |
|
37 <td><a href="#__readShortcut">__readShortcut</a></td> |
|
38 <td>Private function to read a single keyboard shortcut from the settings.</td> |
|
39 </tr><tr> |
|
40 <td><a href="#__saveShortcut">__saveShortcut</a></td> |
|
41 <td>Private function to write a single keyboard shortcut to the settings.</td> |
|
42 </tr><tr> |
|
43 <td><a href="#__setAction">__setAction</a></td> |
|
44 <td>Private function to write a single keyboard shortcut to the settings.</td> |
|
45 </tr><tr> |
|
46 <td><a href="#exportShortcuts">exportShortcuts</a></td> |
|
47 <td>Module function to export the keyboard shortcuts for the defined QActions.</td> |
|
48 </tr><tr> |
|
49 <td><a href="#importShortcuts">importShortcuts</a></td> |
|
50 <td>Module function to import the keyboard shortcuts for the defined E5Actions.</td> |
|
51 </tr><tr> |
|
52 <td><a href="#readShortcuts">readShortcuts</a></td> |
|
53 <td>Module function to read the keyboard shortcuts for the defined QActions.</td> |
|
54 </tr><tr> |
|
55 <td><a href="#saveShortcuts">saveShortcuts</a></td> |
|
56 <td>Module function to write the keyboard shortcuts for the defined QActions.</td> |
|
57 </tr><tr> |
|
58 <td><a href="#setActions">setActions</a></td> |
|
59 <td>Module function to set actions based on new format shortcuts file.</td> |
|
60 </tr> |
|
61 </table> |
|
62 <hr /><hr /> |
|
63 <a NAME="__readShortcut" ID="__readShortcut"></a> |
|
64 <h2>__readShortcut</h2> |
|
65 <b>__readShortcut</b>(<i>act, category, prefClass</i>) |
|
66 <p> |
|
67 Private function to read a single keyboard shortcut from the settings. |
|
68 </p><dl> |
|
69 <dt><i>act</i></dt> |
|
70 <dd> |
|
71 reference to the action object (E5Action) |
|
72 </dd><dt><i>category</i></dt> |
|
73 <dd> |
|
74 category the action belongs to (string) |
|
75 </dd><dt><i>prefClass</i></dt> |
|
76 <dd> |
|
77 preferences class used as the storage area |
|
78 </dd> |
|
79 </dl> |
|
80 <div align="right"><a href="#top">Up</a></div> |
|
81 <hr /><hr /> |
|
82 <a NAME="__saveShortcut" ID="__saveShortcut"></a> |
|
83 <h2>__saveShortcut</h2> |
|
84 <b>__saveShortcut</b>(<i>act, category, prefClass</i>) |
|
85 <p> |
|
86 Private function to write a single keyboard shortcut to the settings. |
|
87 </p><dl> |
|
88 <dt><i>act</i></dt> |
|
89 <dd> |
|
90 reference to the action object (E5Action) |
|
91 </dd><dt><i>category</i></dt> |
|
92 <dd> |
|
93 category the action belongs to (string) |
|
94 </dd><dt><i>prefClass</i></dt> |
|
95 <dd> |
|
96 preferences class used as the storage area |
|
97 </dd> |
|
98 </dl> |
|
99 <div align="right"><a href="#top">Up</a></div> |
|
100 <hr /><hr /> |
|
101 <a NAME="__setAction" ID="__setAction"></a> |
|
102 <h2>__setAction</h2> |
|
103 <b>__setAction</b>(<i>actions, sdict</i>) |
|
104 <p> |
|
105 Private function to write a single keyboard shortcut to the settings. |
|
106 </p><dl> |
|
107 <dt><i>actions</i></dt> |
|
108 <dd> |
|
109 list of actions to set (list of E5Action) |
|
110 </dd><dt><i>sdict</i></dt> |
|
111 <dd> |
|
112 dictionary containg accelerator information for one category |
|
113 </dd> |
|
114 </dl> |
|
115 <div align="right"><a href="#top">Up</a></div> |
|
116 <hr /><hr /> |
|
117 <a NAME="exportShortcuts" ID="exportShortcuts"></a> |
|
118 <h2>exportShortcuts</h2> |
|
119 <b>exportShortcuts</b>(<i>fn, helpViewer=None</i>) |
|
120 <p> |
|
121 Module function to export the keyboard shortcuts for the defined QActions. |
|
122 </p><dl> |
|
123 <dt><i>fn</i></dt> |
|
124 <dd> |
|
125 filename of the export file (string) |
|
126 </dd><dt><i>helpViewer</i></dt> |
|
127 <dd> |
|
128 reference to the help window object |
|
129 </dd> |
|
130 </dl> |
|
131 <div align="right"><a href="#top">Up</a></div> |
|
132 <hr /><hr /> |
|
133 <a NAME="importShortcuts" ID="importShortcuts"></a> |
|
134 <h2>importShortcuts</h2> |
|
135 <b>importShortcuts</b>(<i>fn, helpViewer=None</i>) |
|
136 <p> |
|
137 Module function to import the keyboard shortcuts for the defined E5Actions. |
|
138 </p><dl> |
|
139 <dt><i>fn</i></dt> |
|
140 <dd> |
|
141 filename of the import file (string) |
|
142 </dd><dt><i>helpViewer</i></dt> |
|
143 <dd> |
|
144 reference to the help window object |
|
145 </dd> |
|
146 </dl> |
|
147 <div align="right"><a href="#top">Up</a></div> |
|
148 <hr /><hr /> |
|
149 <a NAME="readShortcuts" ID="readShortcuts"></a> |
|
150 <h2>readShortcuts</h2> |
|
151 <b>readShortcuts</b>(<i>prefClass=Prefs, helpViewer=None, pluginName=None</i>) |
|
152 <p> |
|
153 Module function to read the keyboard shortcuts for the defined QActions. |
|
154 </p><dl> |
|
155 <dt><i>prefClass=</i></dt> |
|
156 <dd> |
|
157 preferences class used as the storage area |
|
158 </dd><dt><i>helpViewer=</i></dt> |
|
159 <dd> |
|
160 reference to the help window object |
|
161 </dd><dt><i>pluginName=</i></dt> |
|
162 <dd> |
|
163 name of the plugin for which to load shortcuts |
|
164 (string) |
|
165 </dd> |
|
166 </dl> |
|
167 <div align="right"><a href="#top">Up</a></div> |
|
168 <hr /><hr /> |
|
169 <a NAME="saveShortcuts" ID="saveShortcuts"></a> |
|
170 <h2>saveShortcuts</h2> |
|
171 <b>saveShortcuts</b>(<i>prefClass=Prefs, helpViewer=None</i>) |
|
172 <p> |
|
173 Module function to write the keyboard shortcuts for the defined QActions. |
|
174 </p><dl> |
|
175 <dt><i>prefClass</i></dt> |
|
176 <dd> |
|
177 preferences class used as the storage area |
|
178 </dd><dt><i>helpViewer=</i></dt> |
|
179 <dd> |
|
180 reference to the help window object |
|
181 </dd> |
|
182 </dl> |
|
183 <div align="right"><a href="#top">Up</a></div> |
|
184 <hr /><hr /> |
|
185 <a NAME="setActions" ID="setActions"></a> |
|
186 <h2>setActions</h2> |
|
187 <b>setActions</b>(<i>shortcuts, helpViewer=None</i>) |
|
188 <p> |
|
189 Module function to set actions based on new format shortcuts file. |
|
190 </p><dl> |
|
191 <dt><i>shortcuts</i></dt> |
|
192 <dd> |
|
193 dictionary containing the accelerator information |
|
194 read from a XML file |
|
195 </dd><dt><i>helpViewer</i></dt> |
|
196 <dd> |
|
197 reference to the help window object |
|
198 </dd> |
|
199 </dl> |
|
200 <div align="right"><a href="#top">Up</a></div> |
|
201 <hr /> |
|
202 </body></html> |