source: sasview/src/sas/qtgui/MainWindow/GuiManager.py @ d48cc19

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalc
Last change on this file since d48cc19 was d48cc19, checked in by Piotr Rozyczko <rozyczko@…>, 7 years ago

Compute/Show? Plot button logic: SASVIEW-271
Unit tests for plotting in fitting: SASVIEW-501

  • Property mode set to 100644
File size: 24.5 KB
Line 
1import sys
2import os
3import subprocess
4import logging
5import json
6import webbrowser
7
8from PyQt4 import QtCore
9from PyQt4 import QtGui
10from PyQt4 import QtWebKit
11
12from twisted.internet import reactor
13# General SAS imports
14
15from sas.sasgui.guiframe.data_manager import DataManager
16from sas.sasgui.guiframe.proxy import Connection
17from sas.qtgui.Utilities.SasviewLogger import XStream
18from sas.qtgui.Utilities.IPythonWidget import IPythonWidget
19import sas.qtgui.Utilities.LocalConfig as LocalConfig
20import sas.qtgui.Utilities.GuiUtils as GuiUtils
21
22from sas.qtgui.MainWindow.UI.AcknowledgementsUI import Ui_Acknowledgements
23from sas.qtgui.MainWindow.AboutBox import AboutBox
24from sas.qtgui.MainWindow.WelcomePanel import WelcomePanel
25
26from sas.qtgui.Calculators.SldPanel import SldPanel
27from sas.qtgui.Calculators.DensityPanel import DensityPanel
28from sas.qtgui.Calculators.KiessigPanel import KiessigPanel
29from sas.qtgui.Calculators.SlitSizeCalculator import SlitSizeCalculator
30from sas.qtgui.Calculators.GenericScatteringCalculator import GenericScatteringCalculator
31
32# Perspectives
33import sas.qtgui.Perspectives as Perspectives
34from sas.qtgui.Perspectives.Fitting.FittingPerspective import FittingWindow
35from sas.qtgui.MainWindow.DataExplorer import DataExplorerWindow
36
37class Acknowledgements(QtGui.QDialog, Ui_Acknowledgements):
38    def __init__(self, parent=None):
39        QtGui.QDialog.__init__(self, parent)
40        self.setupUi(self)
41
42class GuiManager(object):
43    """
44    Main SasView window functionality
45    """
46    ## TODO: CHANGE FOR SHIPPED PATH IN RELEASE
47    HELP_DIRECTORY_LOCATION = "docs/sphinx-docs/build/html"
48
49    def __init__(self, parent=None):
50        """
51        Initialize the manager as a child of MainWindow.
52        """
53        self._workspace = parent
54        self._parent = parent
55
56        # Add signal callbacks
57        self.addCallbacks()
58
59        # Create the data manager
60        # TODO: pull out all required methods from DataManager and reimplement
61        self._data_manager = DataManager()
62
63        # Create action triggers
64        self.addTriggers()
65
66        # Populate menus with dynamic data
67        #
68        # Analysis/Perspectives - potentially
69        # Window/current windows
70        #
71        # Widgets
72        #
73        # Current displayed perspective
74        self._current_perspective = None
75
76        # Invoke the initial perspective
77        self.perspectiveChanged("Fitting")
78
79        self.addWidgets()
80
81        # Fork off logging messages to the Log Window
82        XStream.stdout().messageWritten.connect(self.listWidget.insertPlainText)
83        XStream.stderr().messageWritten.connect(self.listWidget.insertPlainText)
84
85        # Log the start of the session
86        logging.info(" --- SasView session started ---")
87        # Log the python version
88        logging.info("Python: %s" % sys.version)
89
90        # Set up the status bar
91        self.statusBarSetup()
92
93        # Show the Welcome panel
94        self.welcomePanel = WelcomePanel()
95        self._workspace.workspace.addWindow(self.welcomePanel)
96
97        # Current help file
98        self._helpView = QtWebKit.QWebView()
99        # Needs URL like path, so no path.join() here
100        self._helpLocation = self.HELP_DIRECTORY_LOCATION + "/index.html"
101
102        # Current tutorial location
103        self._tutorialLocation = os.path.abspath(os.path.join(self.HELP_DIRECTORY_LOCATION,
104                                              "_downloads",
105                                              "Tutorial.pdf"))
106    def addWidgets(self):
107        """
108        Populate the main window with widgets
109
110        TODO: overwrite close() on Log and DR widgets so they can be hidden/shown
111        on request
112        """
113        # Add FileDialog widget as docked
114        self.filesWidget = DataExplorerWindow(self._parent, self, manager=self._data_manager)
115
116        self.dockedFilesWidget = QtGui.QDockWidget("Data Explorer", self._workspace)
117        self.dockedFilesWidget.setWidget(self.filesWidget)
118
119        # Disable maximize/minimize and close buttons
120        self.dockedFilesWidget.setFeatures(QtGui.QDockWidget.NoDockWidgetFeatures)
121        self._workspace.addDockWidget(QtCore.Qt.LeftDockWidgetArea,
122                                      self.dockedFilesWidget)
123
124        # Add the console window as another docked widget
125        self.logDockWidget = QtGui.QDockWidget("Log Explorer", self._workspace)
126        self.logDockWidget.setObjectName("LogDockWidget")
127        self.listWidget = QtGui.QTextBrowser()
128        self.logDockWidget.setWidget(self.listWidget)
129        self._workspace.addDockWidget(QtCore.Qt.BottomDockWidgetArea,
130                                      self.logDockWidget)
131
132        # Add other, minor widgets
133        self.ackWidget = Acknowledgements()
134        self.aboutWidget = AboutBox()
135
136        # Add calculators - floating for usability
137        self.SLDCalculator = SldPanel(self)
138        self.DVCalculator = DensityPanel(self)
139        #self.KIESSIGCalculator = DensityPanel(self)#KiessigPanel(self)
140        self.KIESSIGCalculator = KiessigPanel(self)
141        self.SlitSizeCalculator = SlitSizeCalculator(self)
142        self.GENSASCalculator = GenericScatteringCalculator(self)
143
144    def statusBarSetup(self):
145        """
146        Define the status bar.
147        | <message label> .... | Progress Bar |
148
149        Progress bar invisible until explicitly shown
150        """
151        self.progress = QtGui.QProgressBar()
152        self._workspace.statusbar.setSizeGripEnabled(False)
153
154        self.statusLabel = QtGui.QLabel()
155        self.statusLabel.setText("Welcome to SasView")
156        self._workspace.statusbar.addPermanentWidget(self.statusLabel, 1)
157        self._workspace.statusbar.addPermanentWidget(self.progress, stretch=0)
158        self.progress.setRange(0, 100)
159        self.progress.setValue(0)
160        self.progress.setTextVisible(True)
161        self.progress.setVisible(False)
162
163    def fileWasRead(self, data):
164        """
165        Callback for fileDataReceivedSignal
166        """
167        pass
168
169    def workspace(self):
170        """
171        Accessor for the main window workspace
172        """
173        return self._workspace.workspace
174
175    def perspectiveChanged(self, perspective_name):
176        """
177        Respond to change of the perspective signal
178        """
179        # Close the previous perspective
180        if self._current_perspective:
181            self._current_perspective.setClosable()
182            self._current_perspective.close()
183        # Default perspective
184        self._current_perspective = Perspectives.PERSPECTIVES[str(perspective_name)](parent=self)
185
186        self._workspace.workspace.addWindow(self._current_perspective)
187        # Resize to the workspace height
188        workspace_height = self._workspace.workspace.sizeHint().height()
189        perspective_size = self._current_perspective.sizeHint()
190        if workspace_height < perspective_size.height:
191            perspective_width = perspective_size.width()
192            self._current_perspective.resize(perspective_width, workspace_height-10)
193        self._current_perspective.show()
194
195    def updatePerspective(self, data):
196        """
197        Update perspective with data sent.
198        """
199        assert isinstance(data, list)
200        if self._current_perspective is not None:
201            self._current_perspective.setData(data.values())
202        else:
203            msg = "No perspective is currently active."
204            logging.info(msg)
205
206    def communicator(self):
207        """ Accessor for the communicator """
208        return self.communicate
209
210    def perspective(self):
211        """ Accessor for the perspective """
212        return self._current_perspective
213
214    def updateProgressBar(self, value):
215        """
216        Update progress bar with the required value (0-100)
217        """
218        assert -1 <= value <= 100
219        if value == -1:
220            self.progress.setVisible(False)
221            return
222        if not self.progress.isVisible():
223            self.progress.setTextVisible(True)
224            self.progress.setVisible(True)
225
226        self.progress.setValue(value)
227
228    def updateStatusBar(self, text):
229        """
230        Set the status bar text
231        """
232        self.statusLabel.setText(text)
233
234    def createGuiData(self, item, p_file=None):
235        """
236        Access the Data1D -> plottable Data1D conversion
237        """
238        return self._data_manager.create_gui_data(item, p_file)
239
240    def setData(self, data):
241        """
242        Sends data to current perspective
243        """
244        if self._current_perspective is not None:
245            self._current_perspective.setData(data.values())
246        else:
247            msg = "Guiframe does not have a current perspective"
248            logging.info(msg)
249
250    def quitApplication(self):
251        """
252        Close the reactor and exit nicely.
253        """
254        # Display confirmation messagebox
255        quit_msg = "Are you sure you want to exit the application?"
256        reply = QtGui.QMessageBox.question(
257            self._parent,
258            'Information',
259            quit_msg,
260            QtGui.QMessageBox.Yes,
261            QtGui.QMessageBox.No)
262
263        # Exit if yes
264        if reply == QtGui.QMessageBox.Yes:
265            reactor.callFromThread(reactor.stop)
266            return True
267
268        return False
269
270    def checkUpdate(self):
271        """
272        Check with the deployment server whether a new version
273        of the application is available.
274        A thread is started for the connecting with the server. The thread calls
275        a call-back method when the current version number has been obtained.
276        """
277        version_info = {"version": "0.0.0"}
278        c = Connection(LocalConfig.__update_URL__, LocalConfig.UPDATE_TIMEOUT)
279        response = c.connect()
280        if response is None:
281            return
282        try:
283            content = response.read().strip()
284            logging.info("Connected to www.sasview.org. Latest version: %s"
285                            % (content))
286            version_info = json.loads(content)
287            self.processVersion(version_info)
288        except ValueError, ex:
289            logging.info("Failed to connect to www.sasview.org:", ex)
290
291    def processVersion(self, version_info):
292        """
293        Call-back method for the process of checking for updates.
294        This methods is called by a VersionThread object once the current
295        version number has been obtained. If the check is being done in the
296        background, the user will not be notified unless there's an update.
297
298        :param version: version string
299        """
300        try:
301            version = version_info["version"]
302            if version == "0.0.0":
303                msg = "Could not connect to the application server."
304                msg += " Please try again later."
305                self.communicate.statusBarUpdateSignal.emit(msg)
306
307            elif cmp(version, LocalConfig.__version__) > 0:
308                msg = "Version %s is available! " % str(version)
309                if "download_url" in version_info:
310                    webbrowser.open(version_info["download_url"])
311                else:
312                    webbrowser.open(LocalConfig.__download_page__)
313                self.communicate.statusBarUpdateSignal.emit(msg)
314            else:
315                msg = "You have the latest version"
316                msg += " of %s" % str(LocalConfig.__appname__)
317                self.communicate.statusBarUpdateSignal.emit(msg)
318        except:
319            msg = "guiframe: could not get latest application"
320            msg += " version number\n  %s" % sys.exc_value
321            logging.error(msg)
322            msg = "Could not connect to the application server."
323            msg += " Please try again later."
324            self.communicate.statusBarUpdateSignal.emit(msg)
325
326    def addCallbacks(self):
327        """
328        Method defining all signal connections for the gui manager
329        """
330        self.communicate = GuiUtils.Communicate()
331        self.communicate.fileDataReceivedSignal.connect(self.fileWasRead)
332        self.communicate.statusBarUpdateSignal.connect(self.updateStatusBar)
333        self.communicate.updatePerspectiveWithDataSignal.connect(self.updatePerspective)
334        self.communicate.progressBarUpdateSignal.connect(self.updateProgressBar)
335        self.communicate.perspectiveChangedSignal.connect(self.perspectiveChanged)
336        self.communicate.updateTheoryFromPerspectiveSignal.connect(self.updateTheoryFromPerspective)
337        self.communicate.plotRequestedSignal.connect(self.showPlot)
338
339    def addTriggers(self):
340        """
341        Trigger definitions for all menu/toolbar actions.
342        """
343        # File
344        self._workspace.actionLoadData.triggered.connect(self.actionLoadData)
345        self._workspace.actionLoad_Data_Folder.triggered.connect(self.actionLoad_Data_Folder)
346        self._workspace.actionOpen_Project.triggered.connect(self.actionOpen_Project)
347        self._workspace.actionOpen_Analysis.triggered.connect(self.actionOpen_Analysis)
348        self._workspace.actionSave.triggered.connect(self.actionSave)
349        self._workspace.actionSave_Analysis.triggered.connect(self.actionSave_Analysis)
350        self._workspace.actionQuit.triggered.connect(self.actionQuit)
351        # Edit
352        self._workspace.actionUndo.triggered.connect(self.actionUndo)
353        self._workspace.actionRedo.triggered.connect(self.actionRedo)
354        self._workspace.actionCopy.triggered.connect(self.actionCopy)
355        self._workspace.actionPaste.triggered.connect(self.actionPaste)
356        self._workspace.actionReport.triggered.connect(self.actionReport)
357        self._workspace.actionReset.triggered.connect(self.actionReset)
358        self._workspace.actionExcel.triggered.connect(self.actionExcel)
359        self._workspace.actionLatex.triggered.connect(self.actionLatex)
360
361        # View
362        self._workspace.actionShow_Grid_Window.triggered.connect(self.actionShow_Grid_Window)
363        self._workspace.actionHide_Toolbar.triggered.connect(self.actionHide_Toolbar)
364        self._workspace.actionStartup_Settings.triggered.connect(self.actionStartup_Settings)
365        self._workspace.actionCategry_Manager.triggered.connect(self.actionCategry_Manager)
366        # Tools
367        self._workspace.actionData_Operation.triggered.connect(self.actionData_Operation)
368        self._workspace.actionSLD_Calculator.triggered.connect(self.actionSLD_Calculator)
369        self._workspace.actionDensity_Volume_Calculator.triggered.connect(self.actionDensity_Volume_Calculator)
370        self._workspace.actionKeissig_Calculator.triggered.connect(self.actionKiessig_Calculator)
371        #self._workspace.actionKIESSING_Calculator.triggered.connect(self.actionKIESSING_Calculator)
372        self._workspace.actionSlit_Size_Calculator.triggered.connect(self.actionSlit_Size_Calculator)
373        self._workspace.actionSAS_Resolution_Estimator.triggered.connect(self.actionSAS_Resolution_Estimator)
374        self._workspace.actionGeneric_Scattering_Calculator.triggered.connect(self.actionGeneric_Scattering_Calculator)
375        self._workspace.actionPython_Shell_Editor.triggered.connect(self.actionPython_Shell_Editor)
376        self._workspace.actionImage_Viewer.triggered.connect(self.actionImage_Viewer)
377        # Fitting
378        self._workspace.actionNew_Fit_Page.triggered.connect(self.actionNew_Fit_Page)
379        self._workspace.actionConstrained_Fit.triggered.connect(self.actionConstrained_Fit)
380        self._workspace.actionCombine_Batch_Fit.triggered.connect(self.actionCombine_Batch_Fit)
381        self._workspace.actionFit_Options.triggered.connect(self.actionFit_Options)
382        self._workspace.actionFit_Results.triggered.connect(self.actionFit_Results)
383        self._workspace.actionChain_Fitting.triggered.connect(self.actionChain_Fitting)
384        self._workspace.actionEdit_Custom_Model.triggered.connect(self.actionEdit_Custom_Model)
385        # Window
386        self._workspace.actionCascade.triggered.connect(self.actionCascade)
387        self._workspace.actionTile.triggered.connect(self.actionTile)
388        self._workspace.actionArrange_Icons.triggered.connect(self.actionArrange_Icons)
389        self._workspace.actionNext.triggered.connect(self.actionNext)
390        self._workspace.actionPrevious.triggered.connect(self.actionPrevious)
391        # Analysis
392        self._workspace.actionFitting.triggered.connect(self.actionFitting)
393        self._workspace.actionInversion.triggered.connect(self.actionInversion)
394        self._workspace.actionInvariant.triggered.connect(self.actionInvariant)
395        # Help
396        self._workspace.actionDocumentation.triggered.connect(self.actionDocumentation)
397        self._workspace.actionTutorial.triggered.connect(self.actionTutorial)
398        self._workspace.actionAcknowledge.triggered.connect(self.actionAcknowledge)
399        self._workspace.actionAbout.triggered.connect(self.actionAbout)
400        self._workspace.actionCheck_for_update.triggered.connect(self.actionCheck_for_update)
401
402    #============ FILE =================
403    def actionLoadData(self):
404        """
405        Menu File/Load Data File(s)
406        """
407        self.filesWidget.loadFile()
408
409    def actionLoad_Data_Folder(self):
410        """
411        Menu File/Load Data Folder
412        """
413        self.filesWidget.loadFolder()
414
415    def actionOpen_Project(self):
416        """
417        Menu Open Project
418        """
419        self.filesWidget.loadProject()
420
421    def actionOpen_Analysis(self):
422        """
423        """
424        print("actionOpen_Analysis TRIGGERED")
425        pass
426
427    def actionSave(self):
428        """
429        Menu Save Project
430        """
431        self.filesWidget.saveProject()
432
433    def actionSave_Analysis(self):
434        """
435        """
436        print("actionSave_Analysis TRIGGERED")
437
438        pass
439
440    def actionQuit(self):
441        """
442        Close the reactor, exit the application.
443        """
444        self.quitApplication()
445
446    #============ EDIT =================
447    def actionUndo(self):
448        """
449        """
450        print("actionUndo TRIGGERED")
451        pass
452
453    def actionRedo(self):
454        """
455        """
456        print("actionRedo TRIGGERED")
457        pass
458
459    def actionCopy(self):
460        """
461        """
462        print("actionCopy TRIGGERED")
463        pass
464
465    def actionPaste(self):
466        """
467        """
468        print("actionPaste TRIGGERED")
469        pass
470
471    def actionReport(self):
472        """
473        """
474        print("actionReport TRIGGERED")
475        pass
476
477    def actionReset(self):
478        """
479        """
480        logging.warning(" *** actionOpen_Analysis logging *******")
481        print("actionReset print TRIGGERED")
482        sys.stderr.write("STDERR - TRIGGERED")
483        pass
484
485    def actionExcel(self):
486        """
487        """
488        print("actionExcel TRIGGERED")
489        pass
490
491    def actionLatex(self):
492        """
493        """
494        print("actionLatex TRIGGERED")
495        pass
496
497    #============ VIEW =================
498    def actionShow_Grid_Window(self):
499        """
500        """
501        print("actionShow_Grid_Window TRIGGERED")
502        pass
503
504    def actionHide_Toolbar(self):
505        """
506        Toggle toolbar vsibility
507        """
508        if self._workspace.toolBar.isVisible():
509            self._workspace.actionHide_Toolbar.setText("Show Toolbar")
510            self._workspace.toolBar.setVisible(False)
511        else:
512            self._workspace.actionHide_Toolbar.setText("Hide Toolbar")
513            self._workspace.toolBar.setVisible(True)
514        pass
515
516    def actionStartup_Settings(self):
517        """
518        """
519        print("actionStartup_Settings TRIGGERED")
520        pass
521
522    def actionCategry_Manager(self):
523        """
524        """
525        print("actionCategry_Manager TRIGGERED")
526        pass
527
528    #============ TOOLS =================
529    def actionData_Operation(self):
530        """
531        """
532        print("actionData_Operation TRIGGERED")
533        pass
534
535    def actionSLD_Calculator(self):
536        """
537        """
538        self.SLDCalculator.show()
539
540    def actionDensity_Volume_Calculator(self):
541        """
542        """
543        self.DVCalculator.show()
544
545    def actionKiessig_Calculator(self):
546        """
547        """
548        #self.DVCalculator.show()
549        self.KIESSIGCalculator.show()
550
551    def actionSlit_Size_Calculator(self):
552        """
553        """
554        self.SlitSizeCalculator.show()
555
556    def actionSAS_Resolution_Estimator(self):
557        """
558        """
559        print("actionSAS_Resolution_Estimator TRIGGERED")
560        pass
561
562    def actionGeneric_Scattering_Calculator(self):
563        """
564        """
565        self.GENSASCalculator.show()
566
567    def actionPython_Shell_Editor(self):
568        """
569        Display the Jupyter console as a docked widget.
570        """
571        terminal = IPythonWidget()
572
573        # Add the console window as another docked widget
574        self.ipDockWidget = QtGui.QDockWidget("IPython", self._workspace)
575        self.ipDockWidget.setObjectName("IPythonDockWidget")
576        self.ipDockWidget.setWidget(terminal)
577        self._workspace.addDockWidget(QtCore.Qt.RightDockWidgetArea,
578                                      self.ipDockWidget)
579
580    def actionImage_Viewer(self):
581        """
582        """
583        print("actionImage_Viewer TRIGGERED")
584        pass
585
586    #============ FITTING =================
587    def actionNew_Fit_Page(self):
588        """
589        Add a new, empty Fit page in the fitting perspective.
590        """
591        # Make sure the perspective is correct
592        per = self.perspective()
593        if not isinstance(per, FittingWindow):
594            return
595        per.addFit(None)
596
597    def actionConstrained_Fit(self):
598        """
599        """
600        print("actionConstrained_Fit TRIGGERED")
601        pass
602
603    def actionCombine_Batch_Fit(self):
604        """
605        """
606        print("actionCombine_Batch_Fit TRIGGERED")
607        pass
608
609    def actionFit_Options(self):
610        """
611        """
612        print("actionFit_Options TRIGGERED")
613        pass
614
615    def actionFit_Results(self):
616        """
617        """
618        print("actionFit_Results TRIGGERED")
619        pass
620
621    def actionChain_Fitting(self):
622        """
623        """
624        print("actionChain_Fitting TRIGGERED")
625        pass
626
627    def actionEdit_Custom_Model(self):
628        """
629        """
630        print("actionEdit_Custom_Model TRIGGERED")
631        pass
632
633    #============ ANALYSIS =================
634    def actionFitting(self):
635        """
636        """
637        print("actionFitting TRIGGERED")
638        pass
639
640    def actionInversion(self):
641        """
642        """
643        print("actionInversion TRIGGERED")
644        pass
645
646    def actionInvariant(self):
647        """
648        """
649        print("actionInvariant TRIGGERED")
650        pass
651
652    #============ WINDOW =================
653    def actionCascade(self):
654        """
655        Arranges all the child windows in a cascade pattern.
656        """
657        self._workspace.workspace.cascade()
658
659    def actionTile(self):
660        """
661        Tile workspace windows
662        """
663        self._workspace.workspace.tile()
664
665    def actionArrange_Icons(self):
666        """
667        Arranges all iconified windows at the bottom of the workspace
668        """
669        self._workspace.workspace.arrangeIcons()
670
671    def actionNext(self):
672        """
673        Gives the input focus to the next window in the list of child windows.
674        """
675        self._workspace.workspace.activateNextWindow()
676
677    def actionPrevious(self):
678        """
679        Gives the input focus to the previous window in the list of child windows.
680        """
681        self._workspace.workspace.activatePreviousWindow()
682
683    #============ HELP =================
684    def actionDocumentation(self):
685        """
686        Display the documentation
687
688        TODO: use QNetworkAccessManager to assure _helpLocation is valid
689        """
690        self._helpView.load(QtCore.QUrl(self._helpLocation))
691        self._helpView.show()
692
693    def actionTutorial(self):
694        """
695        Open the tutorial PDF file with default PDF renderer
696        """
697        # Not terribly safe here. Shell injection warning.
698        # isfile() helps but this probably needs a better solution.
699        if os.path.isfile(self._tutorialLocation):
700            result = subprocess.Popen([self._tutorialLocation], shell=True)
701
702    def actionAcknowledge(self):
703        """
704        Open the Acknowledgements widget
705        """
706        self.ackWidget.show()
707
708    def actionAbout(self):
709        """
710        Open the About box
711        """
712        # Update the about box with current version and stuff
713
714        # TODO: proper sizing
715        self.aboutWidget.show()
716
717    def actionCheck_for_update(self):
718        """
719        Menu Help/Check for Update
720        """
721        self.checkUpdate()
722
723    def updateTheoryFromPerspective(self, index):
724        """
725        Catch the theory update signal from a perspective
726        Send the request to the DataExplorer for updating the theory model.
727        """
728        self.filesWidget.updateTheoryFromPerspective(index)
729
730    def showPlot(self, plot):
731        """
732        Pass the show plot request to the data explorer
733        """
734        if hasattr(self, "filesWidget"):
735            self.filesWidget.displayData(plot)
736
Note: See TracBrowser for help on using the repository browser.