def __init__(self, index, parent=None): super(BuildActionProxyForm, self).__init__(parent=parent) self.index = QtCore.QPersistentModelIndex(index) self.hasVariantsUi = False self.setupUi(self) self.updateVariantFormList() self.index.model().dataChanged.connect(self.onModelDataChanged)
def __init__(self, index, parent=None): """ Args: index (QModelIndex): The index of the BuildStep """ super(BuildStepForm, self).__init__(parent=parent) self.index = QtCore.QPersistentModelIndex(index) self.setupUi(self) self.index.model().dataChanged.connect(self.onModelDataChanged)
def __init__(self, index, variantIndex=-1, parent=None): super(BuildActionDataForm, self).__init__(parent=parent) self.index = QtCore.QPersistentModelIndex(index) self.variantIndex = variantIndex self.setupUi(self) # the map of all attr forms, indexed by attr name self._attrForms = {} self.updateAttrFormList() self.index.model().dataChanged.connect(self.onModelDataChanged)
def __init__(self, index, attr, variantIndex, parent=None): super(ActionAttrForm, self).__init__(parent=parent) self.setObjectName('actionAttrForm') self.index = QtCore.QPersistentModelIndex(index) # the config data of the attribute being edited self.attr = attr self.variantIndex = variantIndex # the cached value of the attribute self.attrValue = self.getAttrValue() # build the ui self.setupUi(self) # update valid state, check both type and value here # because the current value may be of an invalid type self.isValueValid = self._isValueTypeValid( self.attrValue) and self._isValueValid(self.attrValue) self._setUiValidState(self.isValueValid) # listen to model change events self.index.model().dataChanged.connect(self.onModelDataChanged)
def __init__(self, index, attr, parent=None): super(BatchAttrForm, self).__init__(parent=parent) self.index = QtCore.QPersistentModelIndex(index) self.attr = attr self.setupUi(self)