src/eric7/UI/NumbersWidget.py

branch
eric7
changeset 10433
328f3ec4b77a
parent 10069
435cc5875135
child 10439
21c28b0f9e41
--- a/src/eric7/UI/NumbersWidget.py	Thu Dec 21 15:46:22 2023 +0100
+++ b/src/eric7/UI/NumbersWidget.py	Thu Dec 21 19:50:01 2023 +0100
@@ -25,7 +25,8 @@
         """
         Constructor
 
-        @param parent reference to the parent widget (QWidget)
+        @param parent reference to the parent widget
+        @type QWidget
         """
         super().__init__(parent)
 
@@ -36,8 +37,10 @@
         """
         Public method to get the number of rows of the model.
 
-        @param parent parent index (QModelIndex)
-        @return number of columns (integer)
+        @param parent parent index
+        @type QModelIndex
+        @return number of columns
+        @rtype int
         """
         return 1
 
@@ -45,8 +48,10 @@
         """
         Public method to get the number of columns of the model.
 
-        @param parent parent index (QModelIndex)
-        @return number of columns (integer)
+        @param parent parent index
+        @type QModelIndex
+        @return number of columns
+        @rtype int
         """
         return self.__bits
 
@@ -54,9 +59,12 @@
         """
         Public method to get data from the model.
 
-        @param index index to get data for (QModelIndex)
-        @param role role of the data to retrieve (integer)
+        @param index index to get data for
+        @type QModelIndex
+        @param role role of the data to retrieve
+        @type int
         @return requested data
+        @rtype Any
         """
         if role == Qt.ItemDataRole.CheckStateRole:
             if (self.__value >> (self.__bits - index.column() - 1)) & 1:
@@ -73,8 +81,10 @@
         """
         Public method to get flags from the model.
 
-        @param index index to get flags for (QModelIndex)
-        @return flags (Qt.ItemFlags)
+        @param index index to get flags for
+        @type QModelIndex
+        @return flags
+        @rtype Qt.ItemFlags
         """
         return (
             Qt.ItemFlag.ItemIsUserCheckable
@@ -86,10 +96,14 @@
         """
         Public method to get header data from the model.
 
-        @param section section number (integer)
-        @param orientation orientation (Qt.Orientation)
-        @param role role of the data to retrieve (Qt.ItemDataRole)
+        @param section section number
+        @type int
+        @param orientation orientation
+        @type Qt.Orientation
+        @param role role of the data to retrieve
+        @type Qt.ItemDataRole
         @return requested data
+        @rtype Any
         """
         if (
             orientation == Qt.Orientation.Horizontal
@@ -103,7 +117,8 @@
         """
         Public slot to set the number of bits.
 
-        @param bits number of bits to show (integer)
+        @param bits number of bits to show
+        @type int
         """
         self.beginResetModel()
         self.__bits = bits
@@ -113,7 +128,8 @@
         """
         Public slot to set the value to show.
 
-        @param value value to show (integer)
+        @param value value to show
+        @type int
         """
         self.beginResetModel()
         self.__value = value
@@ -123,8 +139,10 @@
         """
         Public slot to set the number of bits and the value to show.
 
-        @param bits number of bits to show (integer)
-        @param value value to show (integer)
+        @param bits number of bits to show
+        @type int
+        @param value value to show
+        @type int
         """
         self.__bits = bits
         self.__value = value
@@ -135,7 +153,8 @@
         """
         Public slot to get the current value.
 
-        @return current value of the model (integer)
+        @return current value of the model
+        @rtype int
         """
         return self.__value
 
@@ -143,10 +162,14 @@
         """
         Public method to set the data of a node cell.
 
-        @param index index of the node cell (QModelIndex)
+        @param index index of the node cell
+        @type QModelIndex
         @param value value to be set
-        @param role role of the data (integer)
-        @return flag indicating success (boolean)
+        @type Any
+        @param role role of the data
+        @type int
+        @return flag indicating success
+        @rtype boolean)
         """
         if role == Qt.ItemDataRole.CheckStateRole:
             if Qt.CheckState(value) == Qt.CheckState.Checked:
@@ -173,7 +196,8 @@
         """
         Constructor
 
-        @param parent reference to the parent widget (QWidget)
+        @param parent reference to the parent widget
+        @type QWidget
         """
         super().__init__(parent)
         self.setupUi(self)
@@ -222,7 +246,8 @@
         """
         Private method to format the various number inputs.
 
-        @param numberFormat number format indicator (integer)
+        @param numberFormat number format indicator
+        @type int
         """
         self.__block(True)
 
@@ -281,7 +306,8 @@
         """
         Private slot to block some signals.
 
-        @param b flah indicating the blocking state (boolean)
+        @param b flah indicating the blocking state
+        @type bool
         """
         self.hexEdit.blockSignals(b)
         self.decEdit.blockSignals(b)
@@ -294,7 +320,8 @@
         """
         Private slot handling a change of the bit size.
 
-        @param value selected bit size (integer)
+        @param value selected bit size
+        @type int
         """
         self.__formatNumbers(10)
 
@@ -334,7 +361,8 @@
         """
         Private slot to handle input of a binary number.
 
-        @param txt text entered (string)
+        @param txt text entered
+        @type str
         """
         try:
             self.__input = int(txt, 2)
@@ -359,8 +387,10 @@
         """
         Private slot to handle a change of the binary model value by the user.
 
-        @param start start index (QModelIndex)
-        @param end end index (QModelIndex)
+        @param start start index
+        @type QModelIndex
+        @param end end index
+        @type QModelIndex
         """
         val = self.__model.getValue()
         bytesIn = self.sizeBox.itemData(self.sizeBox.currentIndex()) // 8
@@ -384,7 +414,8 @@
         """
         Private slot to handle input of an octal number.
 
-        @param txt text entered (string)
+        @param txt text entered
+        @type str
         """
         try:
             self.__input = int(txt, 8)
@@ -421,7 +452,8 @@
         """
         Private slot to handle input of a decimal number.
 
-        @param txt text entered (string)
+        @param txt text entered
+        @type str
         """
         try:
             self.__input = int(txt, 10)
@@ -458,7 +490,8 @@
         """
         Private slot to handle input of a hexadecimal number.
 
-        @param txt text entered (string)
+        @param txt text entered
+        @type str
         """
         try:
             self.__input = int(txt, 16)

eric ide

mercurial