eric6/Documentation/Source/eric6.Preferences.ShortcutsFile.html

changeset 8049
af58c1d47e5e
equal deleted inserted replaced
8048:aa1a01274673 8049:af58c1d47e5e
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.Preferences.ShortcutsFile</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>
22 <a NAME="top" ID="top"></a>
23 <h1>eric6.Preferences.ShortcutsFile</h1>
24
25 <p>
26 Module implementing a class representing the shortcuts JSON file.
27 </p>
28 <h3>Global Attributes</h3>
29
30 <table>
31 <tr><td>HelpViewer</td></tr>
32 </table>
33 <h3>Classes</h3>
34
35 <table>
36
37 <tr>
38 <td><a href="#ShortcutsFile">ShortcutsFile</a></td>
39 <td>Class representing the shortcuts JSON file.</td>
40 </tr>
41 </table>
42 <h3>Functions</h3>
43
44 <table>
45 <tr><td>None</td></tr>
46 </table>
47 <hr />
48 <hr />
49 <a NAME="ShortcutsFile" ID="ShortcutsFile"></a>
50 <h2>ShortcutsFile</h2>
51
52 <p>
53 Class representing the shortcuts JSON file.
54 </p>
55 <h3>Derived from</h3>
56 QObject
57 <h3>Class Attributes</h3>
58
59 <table>
60 <tr><td>None</td></tr>
61 </table>
62 <h3>Class Methods</h3>
63
64 <table>
65 <tr><td>None</td></tr>
66 </table>
67 <h3>Methods</h3>
68
69 <table>
70
71 <tr>
72 <td><a href="#ShortcutsFile.__init__">ShortcutsFile</a></td>
73 <td>Constructor</td>
74 </tr>
75 <tr>
76 <td><a href="#ShortcutsFile.__addActionsToDict">__addActionsToDict</a></td>
77 <td>Private method to add a list of actions to the actions dictionary.</td>
78 </tr>
79 <tr>
80 <td><a href="#ShortcutsFile.readFile">readFile</a></td>
81 <td>Public method to read the shortcuts data from a shortcuts JSON file.</td>
82 </tr>
83 <tr>
84 <td><a href="#ShortcutsFile.writeFile">writeFile</a></td>
85 <td>Public method to write the shortcuts data to a shortcuts JSON file.</td>
86 </tr>
87 </table>
88 <h3>Static Methods</h3>
89
90 <table>
91 <tr><td>None</td></tr>
92 </table>
93
94 <a NAME="ShortcutsFile.__init__" ID="ShortcutsFile.__init__"></a>
95 <h4>ShortcutsFile (Constructor)</h4>
96 <b>ShortcutsFile</b>(<i>parent: QObject = None</i>)
97
98 <p>
99 Constructor
100 </p>
101 <dl>
102
103 <dt><i>parent</i> (QObject (optional))</dt>
104 <dd>
105 reference to the parent object (defaults to None)
106 </dd>
107 </dl>
108 <a NAME="ShortcutsFile.__addActionsToDict" ID="ShortcutsFile.__addActionsToDict"></a>
109 <h4>ShortcutsFile.__addActionsToDict</h4>
110 <b>__addActionsToDict</b>(<i>category: str, actions: list, actionsDict: dict</i>)
111
112 <p>
113 Private method to add a list of actions to the actions dictionary.
114 </p>
115 <dl>
116
117 <dt><i>category</i> (str)</dt>
118 <dd>
119 category of the actions
120 </dd>
121 <dt><i>actions</i> (list of QAction)</dt>
122 <dd>
123 list of actions
124 </dd>
125 <dt><i>actionsDict</i> (dict)</dt>
126 <dd>
127 reference to the actions dictionary to be modified
128 </dd>
129 </dl>
130 <a NAME="ShortcutsFile.readFile" ID="ShortcutsFile.readFile"></a>
131 <h4>ShortcutsFile.readFile</h4>
132 <b>readFile</b>(<i>filename: str</i>)
133
134 <p>
135 Public method to read the shortcuts data from a shortcuts JSON file.
136 </p>
137 <dl>
138
139 <dt><i>filename</i> (str)</dt>
140 <dd>
141 name of the shortcuts file
142 </dd>
143 </dl>
144 <dl>
145 <dt>Return:</dt>
146 <dd>
147 Dictionary of dictionaries of shortcuts. The keys of the
148 dictionary are the shortcuts categories, the values are
149 dictionaries. These dictionaries have the shortcut name as their
150 key and a tuple of accelerators as their value.
151 </dd>
152 </dl>
153 <dl>
154 <dt>Return Type:</dt>
155 <dd>
156 dict
157 </dd>
158 </dl>
159 <a NAME="ShortcutsFile.writeFile" ID="ShortcutsFile.writeFile"></a>
160 <h4>ShortcutsFile.writeFile</h4>
161 <b>writeFile</b>(<i>filename: str, helpViewer: HelpViewer = None</i>)
162
163 <p>
164 Public method to write the shortcuts data to a shortcuts JSON file.
165 </p>
166 <dl>
167
168 <dt><i>filename</i> (str)</dt>
169 <dd>
170 name of the shortcuts file
171 </dd>
172 <dt><i>helpViewer</i> (WebBrowserWindow)</dt>
173 <dd>
174 reference to the help window object
175 </dd>
176 </dl>
177 <dl>
178 <dt>Return:</dt>
179 <dd>
180 flag indicating a successful write
181 </dd>
182 </dl>
183 <dl>
184 <dt>Return Type:</dt>
185 <dd>
186 bool
187 </dd>
188 </dl>
189 <div align="right"><a href="#top">Up</a></div>
190 <hr />
191 </body></html>

eric ide

mercurial