Changeset 8353d90 in sasview
- Timestamp:
- Dec 13, 2017 6:14:23 AM (7 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:
- e90988c
- Parents:
- 9387fe3
- Location:
- src/sas/qtgui/MainWindow
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/GuiManager.py
rd1955d67 r8353d90 86 86 # Set up the status bar 87 87 self.statusBarSetup() 88 # Show the Welcome panel89 self.welcomePanel = WelcomePanel()90 self._workspace.workspace.addSubWindow(self.welcomePanel)91 88 92 89 # Current help file … … 99 96 "_downloads", 100 97 "Tutorial.pdf")) 98 101 99 def addWidgets(self): 102 100 """ … … 131 129 self.ackWidget = Acknowledgements() 132 130 self.aboutWidget = AboutBox() 131 self.welcomePanel = WelcomePanel() 133 132 134 133 # Add calculators - floating for usability … … 334 333 msg += " Please try again later." 335 334 self.communicate.statusBarUpdateSignal.emit(msg) 335 336 def showWelcomeMessage(self): 337 """ Show the Welcome panel """ 338 self._workspace.workspace.addSubWindow(self.welcomePanel) 339 self.welcomePanel.show() 336 340 337 341 def addCallbacks(self): -
src/sas/qtgui/MainWindow/MainWindow.py
r53c771e r8353d90 1 1 # UNLESS EXEPTIONALLY REQUIRED TRY TO AVOID IMPORTING ANY MODULES HERE 2 2 # ESPECIALLY ANYTHING IN SAS, SASMODELS NAMESPACE 3 #from PyQt4 import QtGui 4 from PyQt5.QtWidgets import * 5 from PyQt5.QtGui import * 3 from PyQt5.QtWidgets import QMainWindow 4 from PyQt5.QtWidgets import QMdiArea 5 from PyQt5.QtWidgets import QSplashScreen 6 from PyQt5.QtWidgets import QApplication 7 from PyQt5.QtGui import QPixmap 6 8 7 9 # Local UI … … 71 73 # Show the main SV window 72 74 mainwindow = MainSasViewWindow() 73 mainwindow.show ()75 mainwindow.showMaximized() 74 76 75 77 # no more splash screen 76 78 splash.finish(mainwindow) 79 80 # Time for the welcome window 81 mainwindow.guiManager.showWelcomeMessage() 77 82 78 83 # No need to .exec_ - the reactor takes care of it. -
src/sas/qtgui/MainWindow/UnitTesting/GuiManagerTest.py
- Property mode changed from 100755 to 100644
r53c771e r8353d90 19 19 from sas.qtgui.MainWindow.AboutBox import AboutBox 20 20 from sas.qtgui.MainWindow.WelcomePanel import WelcomePanel 21 #from sas.qtgui.Utilities.IPythonWidget import IPythonWidget21 from sas.qtgui.Utilities.IPythonWidget import IPythonWidget 22 22 23 23 from sas.qtgui.MainWindow.GuiManager import Acknowledgements, GuiManager -
src/sas/qtgui/MainWindow/UnitTesting/MainWindowTest.py
r53c771e r8353d90 15 15 from sas.qtgui.MainWindow.MainWindow import SplashScreen 16 16 from sas.qtgui.MainWindow.GuiManager import GuiManager 17 from sas.qtgui.Perspectives.Fitting import FittingPerspective 17 18 18 19 if not QtWidgets.QApplication.instance(): … … 40 41 self.assertIsInstance(splash, QtWidgets.QSplashScreen) 41 42 43 def testWidgets(self): 44 """ Test enablement/disablement of widgets """ 45 # Open the main window 46 tmp_main = MainSasViewWindow(None) 47 tmp_main.showMaximized() 48 # See that only one subwindow is up 49 self.assertEqual(len(tmp_main.workspace.subWindowList()), 1) 50 # and that the subwindow is the fitting perspective 51 self.assertIsInstance(tmp_main.workspace.subWindowList()[0].widget(), 52 FittingPerspective.FittingWindow) 53 # Show the message widget 54 tmp_main.guiManager.showWelcomeMessage() 55 # Assure it is visible and a part of the MdiArea 56 self.assertTrue(tmp_main.guiManager.welcomePanel.isVisible()) 57 self.assertEqual(len(tmp_main.workspace.subWindowList()), 2) 58 59 tmp_main.close() 60 42 61 def testExit(self): 43 62 """
Note: See TracChangeset
for help on using the changeset viewer.