Changeset 239214f in sasview for src/sas


Ignore:
Timestamp:
Jan 13, 2017 9:23:38 AM (8 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:
0f3c22d
Parents:
2e3e959
Message:

Remove graph properties - MPL dialog is enough.
Minor fix in Plot Properties (WP review)

Location:
src/sas
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/PlotProperties.py

    rdb5cd8d r239214f  
    3434            self.cbColor.setCurrentIndex(self._color) 
    3535        else: 
     36            # Need the Custom entry here. "Custom" is always last. 
     37            self.cbColor.addItems([COLORS.keys()[-1]]) 
    3638            self.cbColor.setCurrentIndex(COLORS.keys().index("Custom")) 
    3739 
  • src/sas/qtgui/PlotUtilities.py

    r87cc73a r239214f  
    33from collections import OrderedDict 
    44 
     5# MPL shapes dictionary with some extra styles rendered internally. 
     6# Ordered for consistent display in combo boxes 
    57SHAPES = OrderedDict([ 
    68        ('Circle' , 'o'), 
     
    2729]) 
    2830 
     31# MPL Colors dictionary. Ordered for consistent display 
    2932COLORS = OrderedDict([ 
    3033        ('Blue', 'b'), 
  • src/sas/qtgui/Plotter.py

    r87cc73a r239214f  
    166166        # Additional menu items 
    167167        self.contextMenu.addSeparator() 
    168         self.actionModifyGraphAppearance =\ 
    169             self.contextMenu.addAction("Modify Graph Appearance") 
    170         self.contextMenu.addSeparator() 
    171168        self.actionAddText = self.contextMenu.addAction("Add Text") 
    172169        self.actionRemoveText = self.contextMenu.addAction("Remove Text") 
     
    183180 
    184181        # Define the callbacks 
    185         self.actionModifyGraphAppearance.triggered.connect(self.onModifyGraph) 
    186182        self.actionAddText.triggered.connect(self.onAddText) 
    187183        self.actionRemoveText.triggered.connect(self.onRemoveText) 
     
    264260            self.xLogLabel, self.yLogLabel = self.properties.getValues() 
    265261            self.xyTransform(self.xLogLabel, self.yLogLabel) 
    266  
    267     def onModifyGraph(self): 
    268         """ 
    269         Show a dialog allowing chart manipulations 
    270         """ 
    271         print ("onModifyGraph") 
    272         pass 
    273262 
    274263    def onAddText(self): 
  • src/sas/qtgui/UnitTesting/PlotPropertiesTest.py

    rdb5cd8d r239214f  
    1818        '''Create the PlotProperties''' 
    1919 
    20         self.widget = PlotProperties(None,  
     20        self.widget = PlotProperties(None, 
    2121                         color=1, 
    2222                         marker=3, 
     
    3636        # Check the combo boxes 
    3737        self.assertEqual(self.widget.cbColor.currentText(), "Green") 
     38        self.assertEqual(self.widget.cbColor.count(), 7) 
    3839        self.assertEqual(self.widget.cbShape.currentText(), "Triangle Down") 
    3940        self.assertEqual(self.widget.txtLegend.text(), "LL") 
    4041        self.assertEqual(self.widget.sbSize.value(), 10) 
     42 
     43    def testDefaultsWithCustomColor(self): 
     44        '''Test the GUI when called with custom color''' 
     45        widget = PlotProperties(None, 
     46                         color="#FF00FF", 
     47                         marker=7, 
     48                         marker_size=10, 
     49                         legend="LL") 
     50 
     51        self.assertEqual(widget.cbColor.currentText(), "Custom") 
     52        self.assertEqual(widget.cbColor.count(), 8) 
    4153         
    4254    def testOnColorChange(self): 
  • src/sas/sasgui/plottools/config.py

    rcad617b r239214f  
    3030__all__ = [] 
    3131 
    32 plot_version = "0.98" 
     32#plot_version = "0.98" 
    3333#plot_backend = "WXAgg" 
    3434plot_backend = "Qt4Agg" 
     
    6060matplotlib.rcParams[param] = 0.05 
    6161matplotlib.rcParams['legend.numpoints'] = 1 
     62#matplotlib.rcParams['interactive'] = True 
     63 
    6264 
    6365# this should happen after initial matplotlib configuration 
Note: See TracChangeset for help on using the changeset viewer.