src/eric7/UI/NumbersWidget.py

branch
eric7
changeset 10692
9becf9ca115c
parent 10683
779cda568acb
child 11090
f5f5f5803935
equal deleted inserted replaced
10691:d1a603a70f83 10692:9becf9ca115c
381 Private slot to send a binary number. 381 Private slot to send a binary number.
382 """ 382 """
383 self.insertNumber.emit(self.binEdit.text()) 383 self.insertNumber.emit(self.binEdit.text())
384 384
385 @pyqtSlot(QModelIndex, QModelIndex) 385 @pyqtSlot(QModelIndex, QModelIndex)
386 def __binModelDataChanged(self, start, end): 386 def __binModelDataChanged(self, _start, _end):
387 """ 387 """
388 Private slot to handle a change of the binary model value by the user. 388 Private slot to handle a change of the binary model value by the user.
389 389
390 @param start start index 390 @param _start start index (unused)
391 @type QModelIndex 391 @type QModelIndex
392 @param end end index 392 @param _end end index (unused)
393 @type QModelIndex 393 @type QModelIndex
394 """ 394 """
395 val = self.__model.getValue() 395 val = self.__model.getValue()
396 bytesIn = self.sizeBox.itemData(self.sizeBox.currentIndex()) // 8 396 bytesIn = self.sizeBox.itemData(self.sizeBox.currentIndex()) // 8
397 num = "{0:0{1}b}".format(val, bytesIn * 8) 397 num = "{0:0{1}b}".format(val, bytesIn * 8)

eric ide

mercurial