Exemple #1
0
    def load_study(self, dir):
        """
        Loads a specified study into the file browser and the SVDview.
        """
        self.set_study_dir(dir)
        self.ui.show_info("<h3>Loading...</h3>")
        try:
            with progress_reporter(self, 'Loading study %s' % dir,
                                   7) as progress:
                progress.set_text('Loading.')
                self.study = self.study_dir.get_study()
                self.study.step.connect(progress.tick)
                progress.set_text('Loading analysis.')
                results = self.study_dir.get_existing_analysis()
                progress.tick('Updating view.')
                self.update_svdview(results)
                progress.tick('Updating options.')
                self.update_options()
                self.study.step.disconnect(progress.tick)

            self.results = results
            self.show_info()
            self.study_loaded()  # TODO: Make it a slot.
        except StudyLoadError:
            self.ui.show_info("%s is not a valid study directory." % dir)
Exemple #2
0
    def analyze(self):
        """
        Called when the Analyze button is clicked.

        This is meant to be used as a slot, but someone could also type
        `self.analyze()` from the console if they wanted.
        """
        logger.info('Start analysis')
        self.ui.svdview_panel.deactivate()
        self.ui.show_info("<h3>Analyzing...</h3><p>(this may take a few minutes)</p>")
        
        with progress_reporter(self, 'Analyzing...', 8) as progress:
            self.study.step.connect(progress.tick)
            results = self.study_dir.analyze()
            logger.info('Analysis finished.')
            progress.tick('Updating view')
            self.update_svdview(results)
            self.results = results
            self.show_info()
            self.study.step.disconnect(progress.tick)
Exemple #3
0
    def analyze(self):
        """
        Called when the Analyze button is clicked.

        This is meant to be used as a slot, but someone could also type
        `self.analyze()` from the console if they wanted.
        """
        logger.info('Start analysis')
        self.ui.svdview_panel.deactivate()
        self.ui.show_info(
            "<h3>Analyzing...</h3><p>(this may take a few minutes)</p>")

        with progress_reporter(self, 'Analyzing...', 8) as progress:
            self.study.step.connect(progress.tick)
            results = self.study_dir.analyze()
            logger.info('Analysis finished.')
            progress.tick('Updating view')
            self.update_svdview(results)
            self.results = results
            self.show_info()
            self.study.step.disconnect(progress.tick)
Exemple #4
0
    def load_study(self, dir):
        """
        Loads a specified study into the file browser and the SVDview.
        """
        self.set_study_dir(dir)
        self.ui.show_info("<h3>Loading...</h3>")

        with progress_reporter(self, 'Loading study %s' % dir, 7) as progress:
            progress.set_text('Loading.')
            self.study = self.study_dir.get_study()
            self.connect(self.study, QtCore.SIGNAL('step(QString)'), progress.tick)
            progress.set_text('Loading analysis.')
            results = self.study_dir.get_existing_analysis()
            progress.tick('Updating view.')
            self.update_svdview(results)
            progress.tick('Updating options.')
            self.update_options()
            self.disconnect(self.study, QtCore.SIGNAL('step(QString)'), progress.tick)

        self.results = results
        self.show_info()
        self.study_loaded() # TODO: Make it a slot.
Exemple #5
0
    def load_study(self, dir):
        """
        Loads a specified study into the file browser and the SVDview.
        """
        self.set_study_dir(dir)
        self.ui.show_info("<h3>Loading...</h3>")
        try:
            with progress_reporter(self, 'Loading study %s' % dir, 7) as progress:
                progress.set_text('Loading.')
                self.study = self.study_dir.get_study()
                self.study.step.connect(progress.tick)
                progress.set_text('Loading analysis.')
                results = self.study_dir.get_existing_analysis()
                progress.tick('Updating view.')
                self.update_svdview(results)
                progress.tick('Updating options.')
                self.update_options()
                self.study.step.disconnect(progress.tick)

            self.results = results
            self.show_info()
            self.study_loaded() # TODO: Make it a slot.
        except StudyLoadError:
            self.ui.show_info("%s is not a valid study directory." % dir)