示例#1
0
 def _setSliceInteraction(self, sliceName, interaction):
     if sliceName in self._sliceDirectionsDict:
         sd = self._sliceDirectionsDict[sliceName]
         if interaction:
             sd.enableInteraction()
         else:
             sd.disableInteraction()
             
         row = self._findGridRowByName(sliceName)
         if row >= 0:
             gen_utils.setGridCellYesNo(
                 self._grid, row, self._gridInteractionCol, interaction)
示例#2
0
 def _setSliceEnabled(self, sliceName, enabled):
     if sliceName in self._sliceDirectionsDict:
         sd = self._sliceDirectionsDict[sliceName]
         if enabled:
             sd.enable()
         else:
             sd.disable()
             
         row = self._findGridRowByName(sliceName)
         if row >= 0:
             gen_utils.setGridCellYesNo(
                 self._grid, row, self._gridEnabledCol, enabled)
示例#3
0
    def _setImplicitEnabled(self, implicitName, enabled):
        if implicitName in self._implicitsDict:
            ii = self._implicitsDict[implicitName]

            # in our internal list
            ii.enabled = bool(enabled)
            # the widget
            if ii.widget:
                ii.widget.SetEnabled(ii.enabled)

            # in the grid
            gridRow = self.findGridRowByName(implicitName)
            if gridRow >= 0:
                gen_utils.setGridCellYesNo(
                    self._grid, gridRow, self._gridEnabledCol, ii.enabled)