Example #1
0
 def onPropertyControlChanged(self, *args):
     '''slot called whenever one of the controls is changed '''
     shownprop = self.getShownProperties()
     data = self.model().data
     setData = self.model().setData
     for index in self.selectionModel().partiallySelectedRows():
         prop = data(index, PROPS_ROLE)
         if prop.conflictsWith(shownprop):
             updatedprop = CurveAppearanceProperties.merge(
                 [prop, shownprop], conflict=CurveAppearanceProperties.inConflict_update_a)
             setData(index, updatedprop, PROPS_ROLE)
Example #2
0
 def onPropertyControlChanged(self, *args):
     '''slot called whenever one of the controls is changed '''
     shownprop = self.getShownProperties()
     data = self.model().data
     setData = self.model().setData
     for index in self.selectionModel().partiallySelectedRows():
         prop = data(index, PROPS_ROLE)
         if prop.conflictsWith(shownprop):
             updatedprop = CurveAppearanceProperties.merge(
                 [prop, shownprop],
                 conflict=CurveAppearanceProperties.inConflict_update_a)
             setData(index, updatedprop, PROPS_ROLE)
Example #3
0
 def updateControls(self):
     '''Updates the state of the properties controls to reflect the selection
     '''
     selectedCurves = self.selectionModel().partiallySelectedRows()
     self.showProperties(self._emptyProps)
     if len(selectedCurves) < 1:
         return
     modeldata = self.model().data
     props = [modeldata(index, PROPS_ROLE) for index in selectedCurves]
     mergedprop = CurveAppearanceProperties.merge(
         props, conflict=CurveAppearanceProperties.inConflict_none)
     self.showProperties(mergedprop)
Example #4
0
 def updateControls(self):
     '''Updates the state of the properties controls to reflect the selection
     '''
     selectedCurves = self.selectionModel().partiallySelectedRows()
     self.showProperties(self._emptyProps)
     if len(selectedCurves) < 1:
         return
     modeldata = self.model().data
     props = [modeldata(index, PROPS_ROLE) for index in selectedCurves]
     mergedprop = CurveAppearanceProperties.merge(
         props, conflict=CurveAppearanceProperties.inConflict_none)
     self.showProperties(mergedprop)