コード例 #1
0
 def Get(self, widget : QtGui.QGroupBox): # return val
     self.__CheckType(widget)
     count = 0
     for obj in widget.children():
         if not self.__IsRadioBtn(obj): continue
         val = self.radioGet(obj, count)
         count += 1
         if val != None: return val
コード例 #2
0
 def __CheckType(self, widget : QtGui.QGroupBox):
     oneChecked = False
     count = 0
     for obj in widget.children():
         if self.__IsRadioBtn(obj):
             count += 1
             if obj.isChecked(): oneChecked = True
     assert oneChecked
     self.checkCountFn(widget, count)
コード例 #3
0
 def Set(self, widget : QtGui.QGroupBox, val):
     self.__CheckType(widget)
     found = False
     count = 0
     for obj in widget.children():
         if not self.__IsRadioBtn(obj): continue
         wasSet = self.radioSet(obj, val, count)
         count += 1
         if not wasSet: continue
         found = True
         break 
     if not found: 
         raise GuiFieldUnknownMetaErr(val, widget, True)