Changes in / [e2451f2:3c4f02e] in sasview
- Location:
- src/sas/qtgui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/GuiManager.py
r768387e0 r5b144c6 118 118 self.dockedFilesWidget.setWidget(self.filesWidget) 119 119 120 # Modify menu items on widget visibility change 121 self.dockedFilesWidget.visibilityChanged.connect(self.updateContextMenus) 122 120 # Disable maximize/minimize and close buttons 121 self.dockedFilesWidget.setFeatures(QDockWidget.NoDockWidgetFeatures) 122 123 #self._workspace.workspace.addDockWidget(Qt.LeftDockWidgetArea, self.dockedFilesWidget) 123 124 self._workspace.addDockWidget(Qt.LeftDockWidgetArea, self.dockedFilesWidget) 124 125 self._workspace.resizeDocks([self.dockedFilesWidget], [305], Qt.Horizontal) … … 163 164 logger.error("%s: could not load SasView models") 164 165 logger.error(traceback.format_exc()) 165 166 def updateContextMenus(self, visible=False):167 """168 Modify the View/Data Explorer menu item text on widget visibility169 """170 if visible:171 self._workspace.actionHide_DataExplorer.setText("Hide Data Explorer")172 else:173 self._workspace.actionHide_DataExplorer.setText("Show Data Explorer")174 166 175 167 def statusBarSetup(self): … … 435 427 self._workspace.actionStartup_Settings.triggered.connect(self.actionStartup_Settings) 436 428 self._workspace.actionCategory_Manager.triggered.connect(self.actionCategory_Manager) 437 self._workspace.actionHide_DataExplorer.triggered.connect(self.actionHide_DataExplorer)438 429 # Tools 439 430 self._workspace.actionData_Operation.triggered.connect(self.actionData_Operation) … … 626 617 pass 627 618 628 def actionHide_DataExplorer(self):629 """630 Toggle Data Explorer vsibility631 """632 if self.dockedFilesWidget.isVisible():633 #self._workspace.actionHide_DataExplorer.setText("Show Data Explorer")634 self.dockedFilesWidget.setVisible(False)635 else:636 #self._workspace.actionHide_DataExplorer.setText("Hide Data Explorer")637 self.dockedFilesWidget.setVisible(True)638 pass639 640 619 def actionStartup_Settings(self): 641 620 """ -
src/sas/qtgui/MainWindow/UI/MainWindowUI.ui
r768387e0 r33b3e4d 74 74 <addaction name="separator"/> 75 75 <addaction name="actionHide_Toolbar"/> 76 <addaction name="actionHide_DataExplorer"/>77 76 <addaction name="separator"/> 78 77 <addaction name="actionStartup_Settings"/> … … 553 552 </property> 554 553 </action> 555 <action name="actionHide_DataExplorer">556 <property name="text">557 <string>Hide Data Explorer</string>558 </property>559 </action>560 554 </widget> 561 555 <resources/> -
src/sas/qtgui/MainWindow/UnitTesting/GuiManagerTest.py
r768387e0 r144fe21 53 53 self.assertIsInstance(self.manager.dockedFilesWidget, QDockWidget) 54 54 self.assertIsInstance(self.manager.dockedFilesWidget.widget(), DataExplorerWindow) 55 self.assertEqual(self.manager.dockedFilesWidget.features(), QDockWidget.NoDockWidgetFeatures) 55 56 self.assertEqual(self.manager._workspace.dockWidgetArea(self.manager.dockedFilesWidget), Qt.LeftDockWidgetArea) 56 57 -
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
r86d3207 r557fc498 28 28 from sas.qtgui.Plotting.PlotterData import Data1D 29 29 from sas.qtgui.Plotting.PlotterData import Data2D 30 from sas.qtgui.Plotting.Plotter import PlotterWidget31 30 32 31 from sas.qtgui.Perspectives.Fitting.UI.FittingWidgetUI import Ui_FittingWidgetUI … … 2826 2825 item4 = QtGui.QStandardItem() 2827 2826 2828 # cell 4: SLD button 2829 item5 = QtGui.QStandardItem() 2830 button = QtWidgets.QPushButton() 2831 button.setText("Show SLD Profile") 2832 2833 self._model_model.appendRow([item1, item2, item3, item4, item5]) 2827 self._model_model.appendRow([item1, item2, item3, item4]) 2834 2828 2835 2829 # Beautify the row: span columns 2-4 2836 2830 shell_row = self._model_model.rowCount() 2837 2831 shell_index = self._model_model.index(shell_row-1, 1) 2838 button_index = self._model_model.index(shell_row-1, 4)2839 2832 2840 2833 self.lstParams.setIndexWidget(shell_index, func) 2841 self.lstParams.setIndexWidget(button_index, button)2842 2834 self._n_shells_row = shell_row - 1 2843 2835 … … 2866 2858 func.currentTextChanged.connect(self.modifyShellsInList) 2867 2859 2868 # Respond to button press2869 button.clicked.connect(self.onShowSLDProfile)2870 2871 2860 # Available range of shells displayed in the combobox 2872 2861 func.addItems([str(i) for i in range(shell_min, shell_max+1)]) … … 2888 2877 index = 0 2889 2878 logger.error("Multiplicity incorrect! Setting to 0") 2890 self.kernel_module.multiplicity = index 2879 2891 2880 if remove_rows > 1: 2892 2881 self._model_model.removeRows(first_row, remove_rows) … … 2914 2903 self.setPolyModel() 2915 2904 self.setMagneticModel() 2916 2917 def onShowSLDProfile(self):2918 """2919 Show a quick plot of SLD profile2920 """2921 # get profile data2922 x, y = self.kernel_module.getProfile()2923 y *= 1.0e62924 profile_data = Data1D(x=x, y=y)2925 profile_data.name = "SLD"2926 profile_data.scale = 'linear'2927 profile_data.symbol = 'Line'2928 profile_data.hide_error = True2929 profile_data._xaxis = "R(\AA)"2930 profile_data._yaxis = "SLD(10^{-6}\AA^{-2})"2931 2932 plotter = PlotterWidget(self, quickplot=True)2933 plotter.data = profile_data2934 plotter.showLegend = True2935 plotter.plot(hide_error=True, marker='-')2936 2937 self.plot_widget = QtWidgets.QWidget()2938 self.plot_widget.setWindowTitle("Scattering Length Density Profile")2939 layout = QtWidgets.QVBoxLayout()2940 layout.addWidget(plotter)2941 self.plot_widget.setLayout(layout)2942 self.plot_widget.show()2943 2905 2944 2906 def setInteractiveElements(self, enabled=True):
Note: See TracChangeset
for help on using the changeset viewer.