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


Python _app.notify函数代码示例

本文整理汇总了Python中vistrails.gui.vistrails_window._app.notify函数的典型用法代码示例。如果您正苦于以下问题:Python notify函数的具体用法?Python notify怎么用?Python notify使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了notify函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: execute

    def execute(self):
        """ execute() -> None        
        Perform the exploration by collecting a list of actions
        corresponding to each dimension
        
        """
        # persist the parameter exploration
        pe = self.getParameterExploration()
        pe.action_id = self.controller.current_version

        # check if pe has changed
        changed = False
        if not self.controller.current_parameter_exploration or \
         pe != self.controller.current_parameter_exploration:
            changed = True
            pe.name = ''
            self.controller.current_parameter_exploration = pe
            self.controller.vistrail.add_paramexp(pe)
            self.controller.set_changed(True)
        else:
            pe = self.controller.current_parameter_exploration

        errors = self.controller.executeParameterExploration(pe,
                                     self.get_param_view().pipeline_view.scene())
        if errors:
            errors = '\n'.join(['Position %s: %s' % (error[0], error[1]) for error in errors])
            debug.critical("Parameter Exploration Execution had errors", errors)
        if changed:
            from vistrails.gui.vistrails_window import _app
            _app.notify('exploration_changed')
开发者ID:Nikea,项目名称:VisTrails,代码行数:30,代码来源:pe_view.py

示例2: notify_app

 def notify_app(self, wf_execution, execution):
     # make sure it is only called once
     if self.isUpdating:
         return
     self.isUpdating = True
     from vistrails.gui.vistrails_window import _app
     _app.notify("execution_changed", wf_execution, execution)
     self.isUpdating = False
开发者ID:cjh1,项目名称:VisTrails,代码行数:8,代码来源:vis_log.py

示例3: set_to_search_mode

    def set_to_search_mode(self):
        self.set_display_view(QQueryView.VISUAL_SEARCH_VIEW)
        self.query_box.backButton.setEnabled(False)
        self.query_box.editButton.setEnabled(False)
        self.set_reset_button(self.p_controller.current_pipeline)

        from vistrails.gui.vistrails_window import _app
        _app.notify('query_pipeline_changed', 
                    self.p_controller.current_pipeline)
开发者ID:lumig242,项目名称:VisTrailsRecommendation,代码行数:9,代码来源:query_view.py

示例4: updateVersion

    def updateVersion(self):
        self.pe = None
        if self.controller:
            # Check if version changed
            version_changed = False
            if self.controller.current_parameter_exploration and \
               self.controller.current_parameter_exploration.action_id !=\
                self.controller.current_version:
                # we need to remove it
                version_changed = True
                self.controller.current_parameter_exploration=None
            
            if not self.controller.current_parameter_exploration and \
                self.controller.vistrail.has_paramexp(
                                             self.controller.current_version):
                version_changed = True
                # load latest version
                self.controller.current_parameter_exploration = \
                            self.controller.vistrail.get_paramexp(
                                              self.controller.current_version)

            if version_changed:
                from vistrails.gui.vistrails_window import _app
                _app.notify('exploration_changed')
                return

            self.pe = self.controller.current_parameter_exploration
        if self.controller and self.pe:
            # get all pe for this action
            self.peDict = dict([(pe.id, pe) for pe in
                            self.controller.vistrail.parameter_explorations
                            if pe.action_id==self.pe.action_id])
            count = len(self.peDict)
            ids = self.peDict.keys()
            ids.sort()
            index = ids.index(self.pe.id) + 1
            
            text = 'Exploration: %s/%s' % (index, count)
            self.versionsLabel.setText(text)
            self.backAction.setEnabled(index>1)
            self.forwardAction.setEnabled(index<count)
            self.tagEdit.setEnabled(True)
            self.tagReset.setEnabled(True)
            self.tagEdit.setText(self.pe.name or "")
            self.userEdit.setText(self.pe.user or "")
            self.dateEdit.setText(self.pe.date.strftime('%Y-%m-%d %H:%M:%S')
                                  if self.pe.date else "")
        else:
            self.versionsLabel.setText('Exploration: 0/0')
            self.backAction.setEnabled(False)
            self.forwardAction.setEnabled(False)
            self.tagEdit.setEnabled(False)
            self.tagReset.setEnabled(False)
            self.tagEdit.setText('')
            self.userEdit.setText('')
            self.dateEdit.setText('')  
开发者ID:hjanime,项目名称:VisTrails,代码行数:56,代码来源:pe_inspector.py

示例5: goBack

 def goBack(self):
     """ Goes to the previous PE for this pipeline"""
     ids = self.peDict.keys()
     ids.sort()
     index = ids.index(self.pe.id)
     if index>0:
         pe = self.peDict[ids[index-1]]
         self.controller.current_parameter_exploration = pe
         from vistrails.gui.vistrails_window import _app
         _app.notify('exploration_changed')
开发者ID:tacaswell,项目名称:VisTrails,代码行数:10,代码来源:pe_inspector.py

示例6: set_to_result_mode

    def set_to_result_mode(self):
        self.set_display_view(self.current_result_view)
        self.query_box.backButton.setEnabled(True)
        if self.query_controller.level >= QueryController.LEVEL_VISTRAIL:
            self.query_box.editButton.setEnabled(True)
        self.query_box.setManualResetEnabled(True)

        from vistrails.gui.vistrails_window import _app
        _app.notify('query_pipeline_changed', 
                    self.p_controller.current_pipeline)
开发者ID:lumig242,项目名称:VisTrailsRecommendation,代码行数:10,代码来源:query_view.py

示例7: goForward

 def goForward(self):
     """ Goes to the next PE for this pipeline"""
     count = len(self.peDict)
     ids = self.peDict.keys()
     ids.sort()
     index = ids.index(self.pe.id)
     if index<count-1:
         pe = self.peDict[ids[index+1]]
         self.controller.current_parameter_exploration = pe
         from vistrails.gui.vistrails_window import _app
         _app.notify('exploration_changed')
开发者ID:tacaswell,项目名称:VisTrails,代码行数:11,代码来源:pe_inspector.py

示例8: reset_search

    def reset_search(self):
        self.search = None
        self.search_pipeline = None
        self.query_view.pipeline_view.controller.change_selected_version(0)
        self.query_view.pipeline_view.scene().setupScene(
            self.query_view.pipeline_view.controller.current_pipeline)
        self.query_view.set_to_search_mode()
        self.query_view.query_box.searchBox.clearSearch()
        self.query_view.vistrailChanged()

        from vistrails.gui.vistrails_window import _app
        _app.notify("search_changed", None, None)
开发者ID:lumig242,项目名称:VisTrailsRecommendation,代码行数:12,代码来源:query_view.py

示例9: configureDone

 def configureDone(self):
     from vistrails.gui.vistrails_window import _app
     self.emit(QtCore.SIGNAL('doneConfigure'), self.module.id)  
     _app.notify('module_done_configure', self.module.id)
开发者ID:lumig242,项目名称:VisTrailsRecommendation,代码行数:4,代码来源:module_configuration.py

示例10: exploreChange

 def exploreChange(self, on):
     from vistrails.gui.vistrails_window import _app
     _app.notify('explore_changed', on)
开发者ID:Nikea,项目名称:VisTrails,代码行数:3,代码来源:pe_view.py

示例11: execute

 def execute(self, params):
     from vistrails.gui.vistrails_window import _app
     result = BaseController.execute(self, params)
     _app.notify('execution_updated')
     return result
开发者ID:cjh1,项目名称:VisTrails,代码行数:5,代码来源:controller.py

示例12: execute

 def execute(self):
     res = self.controller.execute_user_workflow()
     from vistrails.gui.vistrails_window import _app
     if len(res[0][0].errors) > 0:
         _app.qactions['pipeline'].trigger()
     _app.notify('execution_updated')
开发者ID:hjanime,项目名称:VisTrails,代码行数:6,代码来源:version_view.py

示例13: run_search

    def run_search(self, search_str=None):
        """ set_search(search_str: str) -> None
        Change the currrent version tree search statement
        
        """
        search_pipeline = \
            self.query_view.pipeline_view.scene().current_pipeline
        if search_str is None:
            search_str = self.query_view.query_box.getCurrentText()
        self.query_view.update_controller()
        if self.search is None or \
                self.search.search_str != search_str or \
                self.search.queryPipeline != search_pipeline or \
                self.query_view.p_controller.changed or \
                self.search_level > self.level:
            self.search_str = search_str
            self.search_pipeline = search_pipeline
            self.search_level = self.level
            # reset changed here
            self.query_view.p_controller.set_changed(False)
            vt_controller = self.query_view.vt_controller
            current_vistrail = self.vt_controller.vistrail

            def do_search(only_current_vistrail=False, 
                          only_current_workflow=False):
                entities_to_check = {}
                open_col = Collection.getInstance()
                
                for entity in open_col.get_current_entities():
                    if entity.type_id == VistrailEntity.type_id and \
                            entity.is_open:
                        controller = entity._window.controller
                        if only_current_vistrail and \
                                controller.vistrail != vt_controller.vistrail:
                            continue
                        if only_current_workflow:
                            versions_to_check = controller.current_version
                        else:
                            graph = controller._current_terse_graph
                            versions_to_check = set(graph.vertices.iterkeys())
                        entities_to_check[entity] = versions_to_check
                self.set_search(MultipleSearch(search_str, search_pipeline,
                                               entities_to_check))
                self.search.run()
                return self.search.getResultEntities()
                
            if self.level == QueryController.LEVEL_VISTRAIL:
                result_entities = do_search(True)                
                self.show_vistrail_matches()
            elif self.level == QueryController.LEVEL_WORKFLOW:
                self.search_level = QueryController.LEVEL_VISTRAIL
                result_entities = do_search(True)
                self.update_version_tree()
                self.show_workflow_matches()
            elif self.level == QueryController.LEVEL_ALL:
                result_entities = do_search()
                self.show_global_matches()

            from vistrails.gui.vistrails_window import _app
            _app.notify("search_changed", self.search, result_entities)
        else:
            self.query_view.set_to_result_mode()
开发者ID:lumig242,项目名称:VisTrailsRecommendation,代码行数:62,代码来源:query_view.py

示例14: vistrailChanged

 def vistrailChanged(self):
     from vistrails.gui.vistrails_window import _app
     self.p_controller.current_pipeline.ensure_connection_specs()
     _app.notify('query_pipeline_changed', self.p_controller.current_pipeline)
开发者ID:lumig242,项目名称:VisTrailsRecommendation,代码行数:4,代码来源:query_view.py


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