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