当前位置: 首页>>代码示例>>Python>>正文


Python QPipelineView.paintEvent方法代码示例

本文整理汇总了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)
开发者ID:cjh1,项目名称:VisTrails,代码行数:11,代码来源:pipeline_view_select.py

示例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()
开发者ID:alexmavr,项目名称:VisTrails,代码行数:22,代码来源:pe_pipeline.py


注:本文中的vistrails.gui.pipeline_view.QPipelineView.paintEvent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。