diff -r e28b89693f37 -r 299802979277 src/eric7/EricWidgets/EricModelToolBar.py --- a/src/eric7/EricWidgets/EricModelToolBar.py Tue Dec 19 11:04:03 2023 +0100 +++ b/src/eric7/EricWidgets/EricModelToolBar.py Tue Dec 19 19:57:08 2023 +0100 @@ -25,8 +25,10 @@ """ Constructor - @param title title for the tool bar (string) - @param parent reference to the parent widget (QWidget) + @param title title for the tool bar + @type str + @param parent reference to the parent widget + @type QWidget """ if title is not None: super().__init__(title, parent) @@ -52,7 +54,8 @@ """ Public method to set the model for the tool bar. - @param model reference to the model (QAbstractItemModel) + @param model reference to the model + @type QAbstractItemModel """ if self.__model is not None: self.__model.modelReset.disconnect(self._build) @@ -72,7 +75,8 @@ """ Public method to get a reference to the model. - @return reference to the model (QAbstractItemModel) + @return reference to the model + @rtype QAbstractItemModel """ return self.__model @@ -80,7 +84,8 @@ """ Public method to set the root index. - @param idx index to be set as the root index (QModelIndex) + @param idx index to be set as the root index + @type QModelIndex """ self.__root = idx @@ -88,7 +93,8 @@ """ Public method to get the root index. - @return root index (QModelIndex) + @return root index + @rtype QModelIndex """ return self.__root @@ -128,8 +134,10 @@ """ Public method to get the index of an action. - @param action reference to the action to get the index for (QAction) - @return index of the action (QModelIndex) + @param action reference to the action to get the index for + @type QAction + @return index of the action + @rtype QModelIndex """ if action is None: return QModelIndex() @@ -147,7 +155,8 @@ """ Protected method to create the menu for a tool bar action. - @return menu for a tool bar action (EricModelMenu) + @return menu for a tool bar action + @rtype EricModelMenu """ from .EricModelMenu import EricModelMenu @@ -157,9 +166,12 @@ """ Public method to handle event for other objects. - @param obj reference to the object (QObject) - @param evt reference to the event (QEvent) - @return flag indicating that the event should be filtered out (boolean) + @param obj reference to the object + @type QObject + @param evt reference to the event + @type QEvent + @return flag indicating that the event should be filtered out + @rtype bool """ if evt.type() == QEvent.Type.MouseButtonRelease: self._mouseButton = evt.button() @@ -182,7 +194,8 @@ """ Protected method to handle drag enter events. - @param evt reference to the event (QDragEnterEvent) + @param evt reference to the event + @type QDragEnterEvent """ if self.__model is not None: mimeTypes = self.__model.mimeTypes() @@ -196,7 +209,8 @@ """ Protected method to handle drop events. - @param evt reference to the event (QDropEvent) + @param evt reference to the event + @type QDropEvent @exception RuntimeError raised to indicate an invalid model index """ if self.__model is not None: @@ -226,7 +240,8 @@ """ Protected method to handle mouse move events. - @param evt reference to the event (QMouseEvent) + @param evt reference to the event + @type QMouseEvent @exception RuntimeError raised to indicate an invalid model index """ if self.__model is None: @@ -268,7 +283,8 @@ """ Protected method to handle hide events. - @param evt reference to the hide event (QHideEvent) + @param evt reference to the hide event + @type QHideEvent """ self.clear() super().hideEvent(evt) @@ -277,7 +293,8 @@ """ Protected method to handle show events. - @param evt reference to the hide event (QHideEvent) + @param evt reference to the hide event + @type QHideEvent """ if len(self.actions()) == 0: self._build()