當前位置: 首頁>>代碼示例>>Python>>正文


Python QAnnotatedPipelineView.setScene方法代碼示例

本文整理匯總了Python中vistrails.gui.paramexplore.pe_pipeline.QAnnotatedPipelineView.setScene方法的典型用法代碼示例。如果您正苦於以下問題:Python QAnnotatedPipelineView.setScene方法的具體用法?Python QAnnotatedPipelineView.setScene怎麽用?Python QAnnotatedPipelineView.setScene使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在vistrails.gui.paramexplore.pe_pipeline.QAnnotatedPipelineView的用法示例。


在下文中一共展示了QAnnotatedPipelineView.setScene方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: QParameterView

# 需要導入模塊: from vistrails.gui.paramexplore.pe_pipeline import QAnnotatedPipelineView [as 別名]
# 或者: from vistrails.gui.paramexplore.pe_pipeline.QAnnotatedPipelineView import setScene [as 別名]
class QParameterView(QtGui.QWidget, QVistrailsPaletteInterface):
    """
    QParameterView contains the parameter exploration properties and the
    parameter palette
    
    """
    def __init__(self, controller=None, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.set_title('Pipeline Methods')
        
        self.controller = controller
        vLayout = QtGui.QVBoxLayout()
        vLayout.setMargin(0)
        vLayout.setSpacing(5)
        self.setLayout(vLayout)

        self.toggleUnsetParameters = QtGui.QCheckBox('Show Unset Parameters')
        vLayout.addWidget(self.toggleUnsetParameters, 0, QtCore.Qt.AlignRight)

        self.parameterWidget = QParameterWidget()
        vLayout.addWidget(self.parameterWidget)
        self.treeWidget = self.parameterWidget.treeWidget

        self.pipeline_view = QAnnotatedPipelineView()
        vLayout.addWidget(self.pipeline_view)

        vLayout.setStretch(0,0)
        vLayout.setStretch(1,1)
        vLayout.setStretch(2,0)

        self.connect(self.toggleUnsetParameters, QtCore.SIGNAL("toggled(bool)"),
                     self.parameterWidget.treeWidget.toggleUnsetParameters)

    def set_controller(self, controller):
        if self.controller == controller:
            return
        self.controller = controller
        if self.controller is not None:
            self.set_pipeline(self.controller.current_pipeline)
            self.pipeline_view.setScene(self.controller.current_pipeline_scene)
        else:
            self.set_pipeline(None)
            self.pipeline_view.setScene(None)

    def set_pipeline(self, pipeline):
        self.pipeline = pipeline
        self.parameterWidget.set_pipeline(pipeline, self.controller)
        self.pipeline_view.updateAnnotatedIds(pipeline)
開發者ID:alexmavr,項目名稱:VisTrails,代碼行數:50,代碼來源:param_view.py


注:本文中的vistrails.gui.paramexplore.pe_pipeline.QAnnotatedPipelineView.setScene方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。