def paintEvent(self, event): super(FlowBoardEditor, self).paintEvent(event) ptr = FlowBoardPainter(self) ptr.drawGrid(self._grid) ptr.drawBoardFeatures(self._grid, self._board) if self._lastMoveCell: cell = self._lastMoveCell if self.selectedTool.canApply(self._board, cell): self._drawToolPreview(ptr, self.selectedTool, cell) else: for c in self.selectedTool.conflictCells(self._board, cell): ptr.drawConflict(self._grid.cellRect(c))
def paintEvent(self, event): super(FlowSolverWidget, self).paintEvent(event) ptr = FlowBoardPainter(self) ptr.fillBackground() if self._board: if self._solver and self._solver.solved: ptr.drawFlowHighlights(self._grid, self._solver) ptr.drawGrid(self._grid) ptr.drawBoardFeatures(self._grid, self._board) if self._solver: ptr.drawFlows(self._grid, self._solver) ptr.end()