diff -r e28b89693f37 -r 299802979277 src/eric7/EricWidgets/EricTextSpinBox.py --- a/src/eric7/EricWidgets/EricTextSpinBox.py Tue Dec 19 11:04:03 2023 +0100 +++ b/src/eric7/EricWidgets/EricTextSpinBox.py Tue Dec 19 19:57:08 2023 +0100 @@ -19,7 +19,8 @@ """ Constructor - @param parent reference to the parent widget (QWidget) + @param parent reference to the parent widget + @type QWidget """ super().__init__(parent) @@ -32,8 +33,10 @@ """ Public method to add an item with item data. - @param txt text to be shown (string) + @param txt text to be shown + @type str @param data associated data + @type Any """ self.__items.append((txt, data)) self.setMaximum(len(self.__items) - 1) @@ -42,8 +45,10 @@ """ Public method to retrieve the data associated with an item. - @param index index of the item (integer) + @param index index of the item + @type int @return associated data + @rtype Any """ try: return self.__items[index][1] @@ -54,7 +59,8 @@ """ Public method to retrieve the current index. - @return current index (integer) + @return current index + @rtype int """ return self.value() @@ -62,8 +68,10 @@ """ Public method to convert a value to text. - @param value value to be converted (integer) - @return text for the given value (string) + @param value value to be converted + @type int + @return text for the given value + @rtype str """ try: return self.__items[value][0] @@ -74,8 +82,10 @@ """ Public method to convert a text to a value. - @param txt text to be converted (string) - @return value for the given text (integer) + @param txt text to be converted + @type str + @return value for the given text + @rtype int """ for index in range(len(self.__items)): if self.__items[index][0] == txt: