本文整理汇总了Python中vistrails.gui.pipeline_view.QPipelineView.paintEvent方法的典型用法代码示例。如果您正苦于以下问题:Python QPipelineView.paintEvent方法的具体用法?Python QPipelineView.paintEvent怎么用?Python QPipelineView.paintEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vistrails.gui.pipeline_view.QPipelineView
的用法示例。
在下文中一共展示了QPipelineView.paintEvent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: paintEvent
# 需要导入模块: from vistrails.gui.pipeline_view import QPipelineView [as 别名]
# 或者: from vistrails.gui.pipeline_view.QPipelineView import paintEvent [as 别名]
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)
示例2: paintEvent
# 需要导入模块: from vistrails.gui.pipeline_view import QPipelineView [as 别名]
# 或者: from vistrails.gui.pipeline_view.QPipelineView import paintEvent [as 别名]
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()