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