Added possibility to get index of qty

This commit is contained in:
Anne de Jong 2020-10-16 21:12:31 +02:00
parent cf4156060e
commit 622dd1f319

View File

@ -96,6 +96,13 @@ class SIQtys:
def getCurrent(cb):
return SIQtys.types[cb.currentIndex()]
@staticmethod
def getIndex(qty):
for i, qtyi in enumerate(SIQtys.types):
if qtyi == qty:
return i
return -1
@dataclass
class CalSetting:
name: str