Changeset 7969b9c in sasview for src/sas/qtgui/Plotting


Ignore:
Timestamp:
Nov 9, 2017 8:43:07 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
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:
fbfc488
Parents:
4992ff2
git-author:
Piotr Rozyczko <rozyczko@…> (10/31/17 10:00:59)
git-committer:
Piotr Rozyczko <rozyczko@…> (11/09/17 08:43:07)
Message:

More functionality conversion

Location:
src/sas/qtgui/Plotting
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Plotting/LinearFit.py

    r4992ff2 r7969b9c  
    1919 
    2020class LinearFit(QtWidgets.QDialog, Ui_LinearFitUI): 
     21    updatePlot = QtCore.pyqtSignal(tuple) 
    2122    def __init__(self, parent=None, 
    2223                 data=None, 
     
    178179        self.txtChi2.setText(formatNumber(self.Chivalue)) 
    179180 
    180         #self.parent.updatePlot.emit((tempx, tempy)) 
    181         self.parent.emit(QtCore.SIGNAL('updatePlot'), (tempx, tempy)) 
     181        self.updatePlot.emit((tempx, tempy)) 
    182182 
    183183    def origData(self): 
  • src/sas/qtgui/Plotting/Plotter.py

    r4992ff2 r7969b9c  
    2121    1D Plot widget for use with a QDialog 
    2222    """ 
    23     updatePlot = QtCore.pyqtSignal(tuple) 
    2423    def __init__(self, parent=None, manager=None, quickplot=False): 
    2524        super(PlotterWidget, self).__init__(parent, manager=manager, quickplot=quickplot) 
     
    4140        self.fit_result.symbol = 13 
    4241        self.fit_result.name = "Fit" 
    43  
    44         # Add a slot for receiving update signal from LinearFit 
    45         # NEW style signals 
    46         self.updatePlot.connect(self.onFitDisplay) 
    47         # OLD style signals 
    48         # QtCore.QObject.connect(self, QtCore.SIGNAL('updatePlot'), self.onFitDisplay) 
    4942 
    5043    @property 
     
    368361                    xlabel=self.xLogLabel, 
    369362                    ylabel=self.yLogLabel) 
     363        fit_dialog.updatePlot.connect(self.onFitDisplay) 
    370364        if fit_dialog.exec_() == QtWidgets.QDialog.Accepted: 
    371365            return 
  • src/sas/qtgui/Plotting/Plotter2D.py

    r4992ff2 r7969b9c  
    243243        self.slicer_widget.close_signal.connect(slicer_closed) 
    244244        # Add the plot to the workspace 
    245         self.manager.parent.workspace().addWindow(self.slicer_widget) 
     245        self.manager.parent.workspace().addSubWindow(self.slicer_widget) 
    246246 
    247247        self.slicer_widget.show() 
     
    344344        self.boxwidget = BoxSum(self, model=self.box_sum_model) 
    345345        # Add the plot to the workspace 
    346         self.manager.parent.workspace().addWindow(self.boxwidget) 
     346        self.manager.parent.workspace().addSubWindow(self.boxwidget) 
    347347        self.boxwidget.show() 
    348348 
  • src/sas/qtgui/Plotting/PlotterBase.py

    r4992ff2 r7969b9c  
    317317        Copy MPL widget area to buffer 
    318318        """ 
    319         bmp = QtGui.QApplication.clipboard() 
     319        bmp = QtWidgets.QApplication.clipboard() 
    320320        pixmap = QtGui.QPixmap.grabWidget(self.canvas) 
    321321        bmp.setPixmap(pixmap) 
     
    374374        # Move the slider all the way up, if present 
    375375        vertical_scroll_bar = self.txt_widget.verticalScrollBar() 
    376         vertical_scroll_bar.triggerAction(QtGui.QScrollBar.SliderToMinimum) 
     376        vertical_scroll_bar.triggerAction(QtWidgets.QScrollBar.SliderToMinimum) 
    377377 
    378378    def onSavePoints(self, plot_data): 
  • src/sas/qtgui/Plotting/rangeSlider.py

    r4992ff2 r7969b9c  
    8989 
    9090        painter = QtGui.QPainter(self) 
    91         style = QtGui.QApplication.style()  
     91        style = QtWidgets.QApplication.style() 
    9292 
    9393        for i, value in enumerate([self._low, self._high]): 
     
    173173        event.accept() 
    174174         
    175         style = QtGui.QApplication.style() 
     175        style = QtWidgets.QApplication.style() 
    176176        button = event.button() 
    177177         
     
    264264            self.setHighValue( new_pos ) 
    265265 
    266         if self.hasTracking(): 
    267             self.emit(QtCore.SIGNAL('sliderMoved(int)'), new_pos) 
    268  
    269266             
    270267    def __pick(self, pt): 
     
    278275        opt = QtWidgets.QStyleOptionSlider() 
    279276        self.initStyleOption(opt) 
    280         style = QtGui.QApplication.style() 
     277        style = QtWidgets.QApplication.style() 
    281278         
    282279        gr = style.subControlRect(style.CC_Slider, opt, style.SC_SliderGroove, self) 
Note: See TracChangeset for help on using the changeset viewer.