def paintEvent(self, event):
     """ paintEvent(event: QPaintEvent) -> None
     Fit pipeline to view on first paint
     
     """
     if not self._shown:
         self._shown = True
         self.scene().fitToView(self)
     QPipelineView.paintEvent(self, event)
Exemplo n.º 2
0
 def paintEvent(self, event):
     """ paintEvent(event: QPaintEvent) -> None
     Fit pipeline to view on first paint
     
     """
     if not self._shown:
         self._shown = True
         self.scene().fitToView(self)
     QPipelineView.paintEvent(self, event)
Exemplo n.º 3
0
 def paintEvent(self, event):
     """ paintEvent(event: QPaintEvent) -> None
     Paint an overlay annotation on spreadsheet cell modules
     
     """
     QPipelineView.paintEvent(self, event)
     # super(QAnnotatedPipelineView, self).paintEvent(event)
     if self.scene():
         painter = QtGui.QPainter(self.viewport())
         for mId, annotatedId in \
                 self.inspector.annotated_modules.iteritems():
             item = self.scene().modules[mId]
             br = item.sceneBoundingRect()
             rect = QtCore.QRect(self.mapFromScene(br.topLeft()),
                                 self.mapFromScene(br.bottomRight()))
             QAnnotatedPipelineView.drawId(painter, rect, annotatedId)
         painter.end()
Exemplo n.º 4
0
 def paintEvent(self, event):
     """ paintEvent(event: QPaintEvent) -> None
     Paint an overlay annotation on spreadsheet cell modules
     
     """
     QPipelineView.paintEvent(self, event)
     # super(QAnnotatedPipelineView, self).paintEvent(event)
     if self.scene():
         painter = QtGui.QPainter(self.viewport())
         for mId, annotatedId in \
                 self.inspector.annotated_modules.iteritems():
             if mId not in self.scene().modules:
                 # faulty annotated_modules entry
                 continue
             item = self.scene().modules[mId]
             br = item.sceneBoundingRect()
             rect = QtCore.QRect(self.mapFromScene(br.topLeft()),
                                 self.mapFromScene(br.bottomRight()))
             QAnnotatedPipelineView.drawId(painter, rect, annotatedId)
         painter.end()