def activationHandler(self, event): # activate the grid if required self.styleSheet.grid = self.activatedCheckBox.GetValue() # repaint using the new parameters events.postStyleSheetUpdateEvent(self) # update number of columns self.nColumnsControl.SetValue(self.styleSheet.nColumnsInGrid)
def updateStyleSheet(self, event): self.styleSheet.styles = [ style for i, style in enumerate(self.styles) if self.styleCheckList.IsChecked(i) ] self.styleSheet.styles.reverse() # propagate the event to inform the gui that redrawing is in order events.postStyleSheetUpdateEvent(self)
def parameterHandler(self, event): # set the right parameter to build the grid self.styleSheet.gridRouteAttribute = \ self.parameterChoice.GetStringSelection() # also reset number of columns because grid size changes self.styleSheet.nColumnsInGrid = None # repaint using the new parameters events.postStyleSheetUpdateEvent(self) # update number of columns self.nColumnsControl.SetValue(self.styleSheet.nColumnsInGrid)
def modifyValue(self, event=None): self.styleToEdit.setParameter(self.parameterName, self.getValue()) # print('setting parameter', self.parameterName, # 'to value', self.getValue()) events.postStyleSheetUpdateEvent(self) events.postStyleUpdateEvent(self)
def aspectRatioCheckboxHandler(self, event): self.styleSheet.keepAspectRatio = event.IsChecked() # propagate the event to inform the gui that redrawing is in order events.postStyleSheetUpdateEvent(self)
def filterNodesTooHandler(self, event): # tell the stylesheet to filter nodes too self.styleSheet.filterNodesInGrid = self.filterNodesBox.GetValue() # repaint using the new parameters events.postStyleSheetUpdateEvent(self)
def cellTitleFormatHandler(self, event): # update displaying of cell title self.styleSheet.cellTitleFormat = self.cellTitleFormat.GetValue() # repaint using the new parameters events.postStyleSheetUpdateEvent(self)
def cellTitleActivationHandler(self, event): # update displaying of cell title self.styleSheet.displayCellTitle = self.cellTitleBox.GetValue() # repaint using the new parameters events.postStyleSheetUpdateEvent(self)
def decorationHandler(self, event): # update displaying of grid self.styleSheet.drawGridLines = self.drawGridLinesBox.GetValue() # repaint using the new parameters events.postStyleSheetUpdateEvent(self)
def geometryHandler(self, event): # adjust number of columns self.styleSheet.nColumnsInGrid = self.nColumnsControl.GetValue() self.styleSheet.nRowsInGrid = None # repaint using the new parameters events.postStyleSheetUpdateEvent(self)