Example #1
0
    def set_vistrail_view(self, vistrail, locator, abstraction_files=None,
                          thumbnail_files=None, version=None):
        """set_vistrail_view(vistrail: Vistrail,
                             locator: VistrailLocator,
                             abstraction_files: list(str),
                             thumbnail_files: list(str),
                             version=None)
                          -> QVistrailView
        Sets a new vistrail view for the vistrail object for the given version
        if version is None, use the latest version
        """

        if type(version) == type(""):
            try:
                version = vistrail.get_version_number(version)
            except:
                version = None

        vistrailView = QVistrailView()
        vistrailView.set_vistrail(vistrail, locator, abstraction_files,
                                  thumbnail_files)
        self.add_vistrail_view(vistrailView)
        self.setCurrentWidget(vistrailView)
        vistrailView.setup_view(version)
        vistrailView.setPIPMode(self.pip_mode)
        self.versionSelectionChange(vistrailView.controller.current_version)
        return vistrailView
 def set_vistrail_view(self, vistrail,locator, version=None):
     """set_vistrail_view(vistrail: Vistrail,
                          locator: VistrailLocator,
                          version=None)
                       -> QVistrailView
     Sets a new vistrail view for the vistrail object for the given version
     if version is None, use the latest version
     """
     vistrailView = QVistrailView()
     vistrailView.set_vistrail(vistrail, locator)
     self.add_vistrail_view(vistrailView)
     self.setCurrentWidget(vistrailView)
     vistrailView.controller.inspectAndImportModules()
     if version is None:
         version = vistrail.get_latest_version()
     vistrailView.setup_view(version)
     self.versionSelectionChange(version)
     vistrailView.versionTab.vistrailChanged()
     return vistrailView