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.EricWidgets.EricToolBarDialog</title> <meta charset="UTF-8"> <link rel="stylesheet" href="styles.css"> </head> <body> <a NAME="top" ID="top"></a> <h1>eric7.EricWidgets.EricToolBarDialog</h1> <p> Module implementing a toolbar configuration dialog. </p> <h3>Global Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> <table> <tr> <td><a href="#EricToolBarDialog">EricToolBarDialog</a></td> <td>Class implementing a toolbar configuration dialog.</td> </tr> <tr> <td><a href="#EricToolBarItem">EricToolBarItem</a></td> <td>Class storing data belonging to a toolbar entry of the toolbar dialog.</td> </tr> </table> <h3>Functions</h3> <table> <tr><td>None</td></tr> </table> <hr /> <hr /> <a NAME="EricToolBarDialog" ID="EricToolBarDialog"></a> <h2>EricToolBarDialog</h2> <p> Class implementing a toolbar configuration dialog. </p> <h3>Derived from</h3> QDialog, Ui_EricToolBarDialog <h3>Class Attributes</h3> <table> <tr><td>ActionIdRole</td></tr> <tr><td>WidgetActionRole</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#EricToolBarDialog.__init__">EricToolBarDialog</a></td> <td>Constructor</td> </tr> <tr> <td><a href="#EricToolBarDialog.__resetCurrentToolbar">__resetCurrentToolbar</a></td> <td>Private method to revert all changes made to the current toolbar.</td> </tr> <tr> <td><a href="#EricToolBarDialog.__restoreCurrentToolbar">__restoreCurrentToolbar</a></td> <td>Private methdo to restore the current toolbar to the given list of actions.</td> </tr> <tr> <td><a href="#EricToolBarDialog.__restoreCurrentToolbarToDefault">__restoreCurrentToolbarToDefault</a></td> <td>Private method to set the current toolbar to its default configuration.</td> </tr> <tr> <td><a href="#EricToolBarDialog.__saveToolBars">__saveToolBars</a></td> <td>Private method to save the configured toolbars.</td> </tr> <tr> <td><a href="#EricToolBarDialog.__setupButtons">__setupButtons</a></td> <td>Private slot to set the buttons state.</td> </tr> <tr> <td><a href="#EricToolBarDialog.__toolbarComboBox_currentIndexChanged">__toolbarComboBox_currentIndexChanged</a></td> <td>Private slot called upon a selection of the current toolbar.</td> </tr> <tr> <td><a href="#EricToolBarDialog.on_actionsTree_currentItemChanged">on_actionsTree_currentItemChanged</a></td> <td>Private slot called, when the currently selected action changes.</td> </tr> <tr> <td><a href="#EricToolBarDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> <td>Private slot called, when a button of the button box was clicked.</td> </tr> <tr> <td><a href="#EricToolBarDialog.on_downButton_clicked">on_downButton_clicked</a></td> <td>Private slot used to move an action down in the list.</td> </tr> <tr> <td><a href="#EricToolBarDialog.on_leftButton_clicked">on_leftButton_clicked</a></td> <td>Private slot to delete an action from the list.</td> </tr> <tr> <td><a href="#EricToolBarDialog.on_newButton_clicked">on_newButton_clicked</a></td> <td>Private slot to create a new toolbar.</td> </tr> <tr> <td><a href="#EricToolBarDialog.on_removeButton_clicked">on_removeButton_clicked</a></td> <td>Private slot to remove a custom toolbar.</td> </tr> <tr> <td><a href="#EricToolBarDialog.on_renameButton_clicked">on_renameButton_clicked</a></td> <td>Private slot to rename a custom toolbar.</td> </tr> <tr> <td><a href="#EricToolBarDialog.on_rightButton_clicked">on_rightButton_clicked</a></td> <td>Private slot to add an action to the list.</td> </tr> <tr> <td><a href="#EricToolBarDialog.on_toolbarActionsList_currentItemChanged">on_toolbarActionsList_currentItemChanged</a></td> <td>Private slot to handle a change of the current item.</td> </tr> <tr> <td><a href="#EricToolBarDialog.on_upButton_clicked">on_upButton_clicked</a></td> <td>Private slot used to move an action up in the list.</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="EricToolBarDialog.__init__" ID="EricToolBarDialog.__init__"></a> <h4>EricToolBarDialog (Constructor)</h4> <b>EricToolBarDialog</b>(<i>toolBarManager, parent=None</i>) <p> Constructor </p> <dl> <dt><i>toolBarManager</i> (EricToolBarManager)</dt> <dd> reference to a toolbar manager object </dd> <dt><i>parent</i> (QWidget)</dt> <dd> reference to the parent widget </dd> </dl> <a NAME="EricToolBarDialog.__resetCurrentToolbar" ID="EricToolBarDialog.__resetCurrentToolbar"></a> <h4>EricToolBarDialog.__resetCurrentToolbar</h4> <b>__resetCurrentToolbar</b>(<i></i>) <p> Private method to revert all changes made to the current toolbar. </p> <a NAME="EricToolBarDialog.__restoreCurrentToolbar" ID="EricToolBarDialog.__restoreCurrentToolbar"></a> <h4>EricToolBarDialog.__restoreCurrentToolbar</h4> <b>__restoreCurrentToolbar</b>(<i>actions</i>) <p> Private methdo to restore the current toolbar to the given list of actions. </p> <dl> <dt><i>actions</i> (list of QAction)</dt> <dd> list of actions to set for the current toolbar </dd> </dl> <a NAME="EricToolBarDialog.__restoreCurrentToolbarToDefault" ID="EricToolBarDialog.__restoreCurrentToolbarToDefault"></a> <h4>EricToolBarDialog.__restoreCurrentToolbarToDefault</h4> <b>__restoreCurrentToolbarToDefault</b>(<i></i>) <p> Private method to set the current toolbar to its default configuration. </p> <a NAME="EricToolBarDialog.__saveToolBars" ID="EricToolBarDialog.__saveToolBars"></a> <h4>EricToolBarDialog.__saveToolBars</h4> <b>__saveToolBars</b>(<i></i>) <p> Private method to save the configured toolbars. </p> <dl> <dt>Raises <b>RuntimeError</b>:</dt> <dd> raised to indicate an invalid action </dd> </dl> <a NAME="EricToolBarDialog.__setupButtons" ID="EricToolBarDialog.__setupButtons"></a> <h4>EricToolBarDialog.__setupButtons</h4> <b>__setupButtons</b>(<i></i>) <p> Private slot to set the buttons state. </p> <a NAME="EricToolBarDialog.__toolbarComboBox_currentIndexChanged" ID="EricToolBarDialog.__toolbarComboBox_currentIndexChanged"></a> <h4>EricToolBarDialog.__toolbarComboBox_currentIndexChanged</h4> <b>__toolbarComboBox_currentIndexChanged</b>(<i>index</i>) <p> Private slot called upon a selection of the current toolbar. </p> <dl> <dt><i>index</i> (int)</dt> <dd> index of the new current toolbar </dd> </dl> <a NAME="EricToolBarDialog.on_actionsTree_currentItemChanged" ID="EricToolBarDialog.on_actionsTree_currentItemChanged"></a> <h4>EricToolBarDialog.on_actionsTree_currentItemChanged</h4> <b>on_actionsTree_currentItemChanged</b>(<i>_current, _previous</i>) <p> Private slot called, when the currently selected action changes. </p> <dl> <dt><i>_current</i> (QTreeWidgetItem)</dt> <dd> reference to the current item (unused) </dd> <dt><i>_previous</i> (QTreeWidgetItem)</dt> <dd> reference to the previous current item (unused) </dd> </dl> <a NAME="EricToolBarDialog.on_buttonBox_clicked" ID="EricToolBarDialog.on_buttonBox_clicked"></a> <h4>EricToolBarDialog.on_buttonBox_clicked</h4> <b>on_buttonBox_clicked</b>(<i>button</i>) <p> Private slot called, when a button of the button box was clicked. </p> <dl> <dt><i>button</i> (QAbstractButton)</dt> <dd> reference to the button clicked </dd> </dl> <a NAME="EricToolBarDialog.on_downButton_clicked" ID="EricToolBarDialog.on_downButton_clicked"></a> <h4>EricToolBarDialog.on_downButton_clicked</h4> <b>on_downButton_clicked</b>(<i></i>) <p> Private slot used to move an action down in the list. </p> <a NAME="EricToolBarDialog.on_leftButton_clicked" ID="EricToolBarDialog.on_leftButton_clicked"></a> <h4>EricToolBarDialog.on_leftButton_clicked</h4> <b>on_leftButton_clicked</b>(<i></i>) <p> Private slot to delete an action from the list. </p> <a NAME="EricToolBarDialog.on_newButton_clicked" ID="EricToolBarDialog.on_newButton_clicked"></a> <h4>EricToolBarDialog.on_newButton_clicked</h4> <b>on_newButton_clicked</b>(<i></i>) <p> Private slot to create a new toolbar. </p> <a NAME="EricToolBarDialog.on_removeButton_clicked" ID="EricToolBarDialog.on_removeButton_clicked"></a> <h4>EricToolBarDialog.on_removeButton_clicked</h4> <b>on_removeButton_clicked</b>(<i></i>) <p> Private slot to remove a custom toolbar. </p> <a NAME="EricToolBarDialog.on_renameButton_clicked" ID="EricToolBarDialog.on_renameButton_clicked"></a> <h4>EricToolBarDialog.on_renameButton_clicked</h4> <b>on_renameButton_clicked</b>(<i></i>) <p> Private slot to rename a custom toolbar. </p> <a NAME="EricToolBarDialog.on_rightButton_clicked" ID="EricToolBarDialog.on_rightButton_clicked"></a> <h4>EricToolBarDialog.on_rightButton_clicked</h4> <b>on_rightButton_clicked</b>(<i></i>) <p> Private slot to add an action to the list. </p> <a NAME="EricToolBarDialog.on_toolbarActionsList_currentItemChanged" ID="EricToolBarDialog.on_toolbarActionsList_currentItemChanged"></a> <h4>EricToolBarDialog.on_toolbarActionsList_currentItemChanged</h4> <b>on_toolbarActionsList_currentItemChanged</b>(<i>_current, _previous</i>) <p> Private slot to handle a change of the current item. </p> <dl> <dt><i>_current</i> (QListWidgetItem)</dt> <dd> reference to the current item (unused) </dd> <dt><i>_previous</i> (QListWidgetItem)</dt> <dd> reference to the previous current item (unused) </dd> </dl> <a NAME="EricToolBarDialog.on_upButton_clicked" ID="EricToolBarDialog.on_upButton_clicked"></a> <h4>EricToolBarDialog.on_upButton_clicked</h4> <b>on_upButton_clicked</b>(<i></i>) <p> Private slot used to move an action up in the list. </p> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="EricToolBarItem" ID="EricToolBarItem"></a> <h2>EricToolBarItem</h2> <p> Class storing data belonging to a toolbar entry of the toolbar dialog. </p> <h3>Derived from</h3> None <h3>Class Attributes</h3> <table> <tr><td>actionIDs</td></tr> <tr><td>isChanged</td></tr> <tr><td>isDefault</td></tr> <tr><td>title</td></tr> <tr><td>toolBarId</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>