Added possibility to get index of qty
This commit is contained in:
parent
cf4156060e
commit
622dd1f319
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user