Sat, 26 Apr 2025 12:34:32 +0200
MicroPython
- Added a configuration option to disable the support for the no longer produced Pimoroni Pico Wireless Pack.
<!DOCTYPE html> <html><head> <title>eric7.Preferences.ShortcutsFile</title> <meta charset="UTF-8"> <link rel="stylesheet" href="styles.css"> </head> <body> <a NAME="top" ID="top"></a> <h1>eric7.Preferences.ShortcutsFile</h1> <p> Module implementing a class representing the shortcuts JSON file. </p> <h3>Global Attributes</h3> <table> <tr><td>HelpViewer</td></tr> </table> <h3>Classes</h3> <table> <tr> <td><a href="#ShortcutsFile">ShortcutsFile</a></td> <td>Class representing the shortcuts JSON file.</td> </tr> </table> <h3>Functions</h3> <table> <tr><td>None</td></tr> </table> <hr /> <hr /> <a NAME="ShortcutsFile" ID="ShortcutsFile"></a> <h2>ShortcutsFile</h2> <p> Class representing the shortcuts JSON file. </p> <h3>Derived from</h3> QObject <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#ShortcutsFile.__init__">ShortcutsFile</a></td> <td>Constructor</td> </tr> <tr> <td><a href="#ShortcutsFile.__addActionsToDict">__addActionsToDict</a></td> <td>Private method to add a list of actions to the actions dictionary.</td> </tr> <tr> <td><a href="#ShortcutsFile.readFile">readFile</a></td> <td>Public method to read the shortcuts data from a shortcuts JSON file.</td> </tr> <tr> <td><a href="#ShortcutsFile.writeFile">writeFile</a></td> <td>Public method to write the shortcuts data to a shortcuts JSON file.</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="ShortcutsFile.__init__" ID="ShortcutsFile.__init__"></a> <h4>ShortcutsFile (Constructor)</h4> <b>ShortcutsFile</b>(<i>parent: QObject = None</i>) <p> Constructor </p> <dl> <dt><i>parent</i> (QObject (optional))</dt> <dd> reference to the parent object (defaults to None) </dd> </dl> <a NAME="ShortcutsFile.__addActionsToDict" ID="ShortcutsFile.__addActionsToDict"></a> <h4>ShortcutsFile.__addActionsToDict</h4> <b>__addActionsToDict</b>(<i>category: str, actions: list, actionsDict: dict</i>) <p> Private method to add a list of actions to the actions dictionary. </p> <dl> <dt><i>category</i> (str)</dt> <dd> category of the actions </dd> <dt><i>actions</i> (list of QAction)</dt> <dd> list of actions </dd> <dt><i>actionsDict</i> (dict)</dt> <dd> reference to the actions dictionary to be modified </dd> </dl> <a NAME="ShortcutsFile.readFile" ID="ShortcutsFile.readFile"></a> <h4>ShortcutsFile.readFile</h4> <b>readFile</b>(<i>filename: str</i>) <p> Public method to read the shortcuts data from a shortcuts JSON file. </p> <dl> <dt><i>filename</i> (str)</dt> <dd> name of the shortcuts file </dd> </dl> <dl> <dt>Return:</dt> <dd> Dictionary of dictionaries of shortcuts. The keys of the dictionary are the shortcuts categories, the values are dictionaries. These dictionaries have the shortcut name as their key and a tuple of accelerators as their value. </dd> </dl> <dl> <dt>Return Type:</dt> <dd> dict </dd> </dl> <a NAME="ShortcutsFile.writeFile" ID="ShortcutsFile.writeFile"></a> <h4>ShortcutsFile.writeFile</h4> <b>writeFile</b>(<i>filename: str, helpViewer: HelpViewer = None</i>) <p> Public method to write the shortcuts data to a shortcuts JSON file. </p> <dl> <dt><i>filename</i> (str)</dt> <dd> name of the shortcuts file </dd> <dt><i>helpViewer</i> (WebBrowserWindow)</dt> <dd> reference to the help window object </dd> </dl> <dl> <dt>Return:</dt> <dd> flag indicating a successful write </dd> </dl> <dl> <dt>Return Type:</dt> <dd> bool </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>