Changeset 0cd8612 in sasview for src/sas/qtgui/GuiManager.py
- Timestamp:
- Jul 8, 2016 10:13:41 AM (8 years ago)
- Branches:
- ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- a95260d
- Parents:
- e540cd2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/GuiManager.py
re540cd2 r0cd8612 1 1 import sys 2 import os 2 3 import subprocess 3 4 import logging … … 15 16 from sas.sasgui.guiframe.proxy import Connection 16 17 18 from SasviewLogger import XStream 19 17 20 import LocalConfig 18 from GuiUtils import * 21 import GuiUtils 19 22 from UI.AcknowledgementsUI import Acknowledgements 20 23 from AboutBox import AboutBox … … 34 37 """ 35 38 """ 36 37 39 self._workspace = mainWindow 38 40 self._parent = parent … … 58 60 # Widgets 59 61 # 60 # Add FileDialog widget as docked61 self.filesWidget = DataExplorerWindow(parent, self) 62 63 self.dockedFilesWidget = QtGui.QDockWidget("Data explorer", self._workspace)64 self.dockedFilesWidget.setWidget(self.filesWidget)65 self.dockedFilesWidget.setFeatures(QtGui.QDockWidget.NoDockWidgetFeatures) 66 self._workspace.addDockWidget(QtCore.Qt.DockWidgetArea(1), self.dockedFilesWidget)67 68 self.ackWidget = Acknowledgements()69 self.aboutWidget = AboutBox()62 self.addWidgets() 63 64 # Fork off logging messages to the Log Window 65 XStream.stdout().messageWritten.connect( self.listWidget.insertPlainText ) 66 XStream.stderr().messageWritten.connect( self.listWidget.insertPlainText ) 67 68 # Log the start of the session 69 logging.info(" --- SasView session started ---") 70 # Log the python version 71 logging.info("Python: %s" % sys.version) 70 72 71 73 # Set up the status bar … … 94 96 # Default perspective 95 97 self._current_perspective = self.invariantWidget 98 99 def addWidgets(self): 100 """ 101 Populate the main window with widgets 102 103 TODO: overwrite close() on Log and DR widgets so they can be hidden/shown 104 on request 105 """ 106 # Add FileDialog widget as docked 107 self.filesWidget = DataExplorerWindow(self._parent, self) 108 109 self.dockedFilesWidget = QtGui.QDockWidget("Data Explorer", self._workspace) 110 self.dockedFilesWidget.setWidget(self.filesWidget) 111 # Disable maximize/minimize and close buttons 112 self.dockedFilesWidget.setFeatures(QtGui.QDockWidget.NoDockWidgetFeatures) 113 self._workspace.addDockWidget(QtCore.Qt.LeftDockWidgetArea, 114 self.dockedFilesWidget) 115 116 # Add the console window as another docked widget 117 self.logDockWidget = QtGui.QDockWidget("Log Explorer", self._workspace) 118 self.logDockWidget.setObjectName("LogDockWidget") 119 self.listWidget = QtGui.QTextBrowser() 120 self.logDockWidget.setWidget(self.listWidget) 121 self._workspace.addDockWidget(QtCore.Qt.BottomDockWidgetArea, 122 self.logDockWidget) 123 124 # Add other, minor widgets 125 self.ackWidget = Acknowledgements() 126 self.aboutWidget = AboutBox() 96 127 97 128 def statusBarSetup(self): … … 266 297 Method defining all signal connections for the gui manager 267 298 """ 268 self.communicate = Communicate()299 self.communicate = GuiUtils.Communicate() 269 300 self.communicate.fileDataReceivedSignal.connect(self.fileRead) 270 301 self.communicate.statusBarUpdateSignal.connect(self.updateStatusBar) … … 411 442 """ 412 443 """ 413 print("actionReset TRIGGERED") 444 logging.warning(" *** actionOpen_Analysis logging *******") 445 print("actionReset print TRIGGERED") 446 sys.stderr.write("STDERR - TRIGGERED") 414 447 pass 415 448
Note: See TracChangeset
for help on using the changeset viewer.