Changeset e540cd2 in sasview for src/sas/qtgui/GuiManager.py
- Timestamp:
- Jul 7, 2016 4:54:18 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:
- 0cd8612
- Parents:
- f0f309d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/GuiManager.py
r481ff26 re540cd2 60 60 # Add FileDialog widget as docked 61 61 self.filesWidget = DataExplorerWindow(parent, self) 62 #flags = (QtCore.Qt.Window | QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowMinimizeButtonHint) 63 flags = (QtCore.Qt.CustomizeWindowHint | QtCore.Qt.WindowTitleHint | 64 QtCore.Qt.WindowMinMaxButtonsHint) 65 66 self.dockedFilesWidget = QtGui.QDockWidget("Data explorer", self._workspace, flags=flags) 62 63 self.dockedFilesWidget = QtGui.QDockWidget("Data explorer", self._workspace) 67 64 self.dockedFilesWidget.setWidget(self.filesWidget) 65 self.dockedFilesWidget.setFeatures(QtGui.QDockWidget.NoDockWidgetFeatures) 68 66 self._workspace.addDockWidget(QtCore.Qt.DockWidgetArea(1), self.dockedFilesWidget) 69 67 … … 71 69 self.aboutWidget = AboutBox() 72 70 73 # Disable the close button (?) 71 # Set up the status bar 72 self.statusBarSetup() 74 73 75 74 # Show the Welcome panel … … 95 94 # Default perspective 96 95 self._current_perspective = self.invariantWidget 96 97 def statusBarSetup(self): 98 """ 99 Define the status bar. 100 | <message label> .... | Progress Bar | 101 102 Progress bar invisible until explicitly shown 103 """ 104 self.progress = QtGui.QProgressBar() 105 self._workspace.statusbar.setSizeGripEnabled(False) 106 107 self.statusLabel = QtGui.QLabel() 108 self.statusLabel.setText("Welcome to SasView") 109 self._workspace.statusbar.addPermanentWidget(self.statusLabel,1) 110 self._workspace.statusbar.addPermanentWidget(self.progress, stretch=0) 111 self.progress.setRange(0,100) 112 self.progress.setValue(0) 113 self.progress.setTextVisible(True) 114 self.progress.setVisible(False) 97 115 98 116 def fileRead(self, data): … … 133 151 return self._current_perspective 134 152 153 def updateProgressBar(self, value): 154 """ 155 Update progress bar with the required value (0-100) 156 """ 157 assert(-1 <= value <= 100) 158 if value == -1: 159 self.progress.setVisible(False) 160 return 161 if not self.progress.isVisible(): 162 self.progress.setTextVisible(True) 163 self.progress.setVisible(True) 164 165 self.progress.setValue(value) 166 135 167 def updateStatusBar(self, text): 136 168 """ 137 169 """ 138 self._workspace.statusbar.showMessage(text) 170 #self._workspace.statusbar.showMessage(text) 171 self.statusLabel.setText(text) 139 172 140 173 def createGuiData(self, item, p_file=None): … … 237 270 self.communicate.statusBarUpdateSignal.connect(self.updateStatusBar) 238 271 self.communicate.updatePerspectiveWithDataSignal.connect(self.updatePerspective) 272 self.communicate.progressBarUpdateSignal.connect(self.updateProgressBar) 239 273 240 274 def addTriggers(self): … … 284 318 # Window 285 319 self._workspace.actionCascade.triggered.connect(self.actionCascade) 286 self._workspace.actionTile_Horizontally.triggered.connect(self.actionTile_Horizontally) 287 self._workspace.actionTile_Vertically.triggered.connect(self.actionTile_Vertically) 320 self._workspace.actionTile.triggered.connect(self.actionTile) 288 321 self._workspace.actionArrange_Icons.triggered.connect(self.actionArrange_Icons) 289 322 self._workspace.actionNext.triggered.connect(self.actionNext) … … 402 435 def actionHide_Toolbar(self): 403 436 """ 404 """ 405 print("actionHide_Toolbar TRIGGERED") 437 Toggle toolbar vsibility 438 """ 439 if self._workspace.toolBar.isVisible(): 440 self._workspace.actionHide_Toolbar.setText("Show Toolbar") 441 self._workspace.toolBar.setVisible(False) 442 else: 443 self._workspace.actionHide_Toolbar.setText("Hide Toolbar") 444 self._workspace.toolBar.setVisible(True) 406 445 pass 407 446 … … 532 571 def actionCascade(self): 533 572 """ 534 """ 535 print("actionCascade TRIGGERED") 536 pass 537 538 def actionTile_Horizontally(self): 539 """ 540 """ 541 print("actionTile_Horizontally TRIGGERED") 542 pass 543 544 def actionTile_Vertically(self): 545 """ 546 """ 547 print("actionTile_Vertically TRIGGERED") 548 pass 573 Arranges all the child windows in a cascade pattern. 574 """ 575 self._workspace.workspace.cascade() 576 577 def actionTile(self): 578 """ 579 Tile workspace windows 580 """ 581 self._workspace.workspace.tile() 549 582 550 583 def actionArrange_Icons(self): 551 584 """ 552 """553 print("actionArrange_Icons TRIGGERED")554 pass585 Arranges all iconified windows at the bottom of the workspace 586 """ 587 self._workspace.workspace.arrangeIcons() 555 588 556 589 def actionNext(self): 557 590 """ 558 """559 print("actionNext TRIGGERED")560 pass591 Gives the input focus to the next window in the list of child windows. 592 """ 593 self._workspace.workspace.activateNextWindow() 561 594 562 595 def actionPrevious(self): 563 596 """ 564 """565 print("actionPrevious TRIGGERED")566 pass597 Gives the input focus to the previous window in the list of child windows. 598 """ 599 self._workspace.workspace.activatePreviousWindow() 567 600 568 601 #============ HELP =================
Note: See TracChangeset
for help on using the changeset viewer.