src/eric7/Documentation/Source/eric7.Preferences.Shortcuts.html

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8596
d64760b2da50
child 10428
a071d4065202
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.Preferences.Shortcuts</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.Preferences.Shortcuts</h1>
10
11 <p>
12 Module implementing functions dealing with keyboard shortcuts.
13 </p>
14 <h3>Global Attributes</h3>
15
16 <table>
17 <tr><td>None</td></tr>
18 </table>
19 <h3>Classes</h3>
20
21 <table>
22 <tr><td>None</td></tr>
23 </table>
24 <h3>Functions</h3>
25
26 <table>
27
28 <tr>
29 <td><a href="#__readShortcut">__readShortcut</a></td>
30 <td>Private function to read a single keyboard shortcut from the settings.</td>
31 </tr>
32 <tr>
33 <td><a href="#__saveShortcut">__saveShortcut</a></td>
34 <td>Private function to write a single keyboard shortcut to the settings.</td>
35 </tr>
36 <tr>
37 <td><a href="#__setAction">__setAction</a></td>
38 <td>Private function to set a single keyboard shortcut category shortcuts.</td>
39 </tr>
40 <tr>
41 <td><a href="#exportShortcuts">exportShortcuts</a></td>
42 <td>Module function to export the keyboard shortcuts for the defined QActions.</td>
43 </tr>
44 <tr>
45 <td><a href="#importShortcuts">importShortcuts</a></td>
46 <td>Module function to import the keyboard shortcuts for the defined actions.</td>
47 </tr>
48 <tr>
49 <td><a href="#readShortcuts">readShortcuts</a></td>
50 <td>Module function to read the keyboard shortcuts for the defined QActions.</td>
51 </tr>
52 <tr>
53 <td><a href="#saveShortcuts">saveShortcuts</a></td>
54 <td>Module function to write the keyboard shortcuts for the defined QActions.</td>
55 </tr>
56 <tr>
57 <td><a href="#setActions">setActions</a></td>
58 <td>Module function to set actions based on the imported shortcuts file.</td>
59 </tr>
60 </table>
61 <hr />
62 <hr />
63 <a NAME="__readShortcut" ID="__readShortcut"></a>
64 <h2>__readShortcut</h2>
65 <b>__readShortcut</b>(<i>act, category, prefClass</i>)
66
67 <p>
68 Private function to read a single keyboard shortcut from the settings.
69 </p>
70 <dl>
71
72 <dt><i>act</i></dt>
73 <dd>
74 reference to the action object (EricAction)
75 </dd>
76 <dt><i>category</i></dt>
77 <dd>
78 category the action belongs to (string)
79 </dd>
80 <dt><i>prefClass</i></dt>
81 <dd>
82 preferences class used as the storage area
83 </dd>
84 </dl>
85 <div align="right"><a href="#top">Up</a></div>
86 <hr />
87 <hr />
88 <a NAME="__saveShortcut" ID="__saveShortcut"></a>
89 <h2>__saveShortcut</h2>
90 <b>__saveShortcut</b>(<i>act, category, prefClass</i>)
91
92 <p>
93 Private function to write a single keyboard shortcut to the settings.
94 </p>
95 <dl>
96
97 <dt><i>act</i></dt>
98 <dd>
99 reference to the action object (EricAction)
100 </dd>
101 <dt><i>category</i></dt>
102 <dd>
103 category the action belongs to (string)
104 </dd>
105 <dt><i>prefClass</i></dt>
106 <dd>
107 preferences class used as the storage area
108 </dd>
109 </dl>
110 <div align="right"><a href="#top">Up</a></div>
111 <hr />
112 <hr />
113 <a NAME="__setAction" ID="__setAction"></a>
114 <h2>__setAction</h2>
115 <b>__setAction</b>(<i>actions, shortcutsDict</i>)
116
117 <p>
118 Private function to set a single keyboard shortcut category shortcuts.
119 </p>
120 <dl>
121
122 <dt><i>actions</i> (list of EricAction)</dt>
123 <dd>
124 list of actions to set
125 </dd>
126 <dt><i>shortcutsDict</i> (dict)</dt>
127 <dd>
128 dictionary containing accelerator information for
129 one category
130 </dd>
131 </dl>
132 <div align="right"><a href="#top">Up</a></div>
133 <hr />
134 <hr />
135 <a NAME="exportShortcuts" ID="exportShortcuts"></a>
136 <h2>exportShortcuts</h2>
137 <b>exportShortcuts</b>(<i>fn, helpViewer=None</i>)
138
139 <p>
140 Module function to export the keyboard shortcuts for the defined QActions.
141 </p>
142 <dl>
143
144 <dt><i>fn</i> (str)</dt>
145 <dd>
146 filename of the export file
147 </dd>
148 <dt><i>helpViewer</i> (WebBrowserWindow)</dt>
149 <dd>
150 reference to the help window object
151 </dd>
152 </dl>
153 <div align="right"><a href="#top">Up</a></div>
154 <hr />
155 <hr />
156 <a NAME="importShortcuts" ID="importShortcuts"></a>
157 <h2>importShortcuts</h2>
158 <b>importShortcuts</b>(<i>fn, helpViewer=None</i>)
159
160 <p>
161 Module function to import the keyboard shortcuts for the defined actions.
162 </p>
163 <dl>
164
165 <dt><i>fn</i> (str)</dt>
166 <dd>
167 filename of the import file
168 </dd>
169 <dt><i>helpViewer</i> (WebBrowserWindow)</dt>
170 <dd>
171 reference to the help window object
172 </dd>
173 </dl>
174 <div align="right"><a href="#top">Up</a></div>
175 <hr />
176 <hr />
177 <a NAME="readShortcuts" ID="readShortcuts"></a>
178 <h2>readShortcuts</h2>
179 <b>readShortcuts</b>(<i>prefClass=Prefs, helpViewer=None, pluginName=None</i>)
180
181 <p>
182 Module function to read the keyboard shortcuts for the defined QActions.
183 </p>
184 <dl>
185
186 <dt><i>prefClass</i></dt>
187 <dd>
188 preferences class used as the storage area
189 </dd>
190 <dt><i>helpViewer</i></dt>
191 <dd>
192 reference to the help window object
193 </dd>
194 <dt><i>pluginName</i></dt>
195 <dd>
196 name of the plugin for which to load shortcuts
197 (string)
198 </dd>
199 </dl>
200 <div align="right"><a href="#top">Up</a></div>
201 <hr />
202 <hr />
203 <a NAME="saveShortcuts" ID="saveShortcuts"></a>
204 <h2>saveShortcuts</h2>
205 <b>saveShortcuts</b>(<i>prefClass=Prefs, helpViewer=None</i>)
206
207 <p>
208 Module function to write the keyboard shortcuts for the defined QActions.
209 </p>
210 <dl>
211
212 <dt><i>prefClass</i></dt>
213 <dd>
214 preferences class used as the storage area
215 </dd>
216 <dt><i>helpViewer</i></dt>
217 <dd>
218 reference to the help window object
219 </dd>
220 </dl>
221 <div align="right"><a href="#top">Up</a></div>
222 <hr />
223 <hr />
224 <a NAME="setActions" ID="setActions"></a>
225 <h2>setActions</h2>
226 <b>setActions</b>(<i>shortcuts, helpViewer=None</i>)
227
228 <p>
229 Module function to set actions based on the imported shortcuts file.
230 </p>
231 <dl>
232
233 <dt><i>shortcuts</i> (dict)</dt>
234 <dd>
235 dictionary containing the accelerator information
236 read from a JSON or XML file
237 </dd>
238 <dt><i>helpViewer</i> (WebBrowserWindow)</dt>
239 <dd>
240 reference to the help window object
241 </dd>
242 </dl>
243 <div align="right"><a href="#top">Up</a></div>
244 <hr />
245 </body></html>

eric ide

mercurial