Changeset 4d81bc7 in sasview


Ignore:
Timestamp:
Oct 27, 2017 9:38:04 AM (11 months ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI_corf
Parents:
749b715
Message:

Initial implementation of CorFunc? from Adam

Files:
7 added
6 edited

Legend:

Unmodified
Added
Removed
  • setup.py

    rf4a1433 r4d81bc7  
    368368    "src", "sas", "qtgui", "Perspectives") 
    369369packages.append("sas.qtgui.Perspectives") 
     370 
     371package_dir["sas.qtgui.Perspectives.Corfunc"] = os.path.join( 
     372    "src", "sas", "qtgui", "Perspectives", "Corfunc") 
     373package_dir["sas.qtgui.Perspectives.Corfunc.UI"] = os.path.join( 
     374    "src", "sas", "qtgui", "Perspectives", "Corfunc", "UI") 
     375packages.extend(["sas.qtgui.Perspectives.Corfunc", "sas.qtgui.Perspectives.Corfunc.UI"]) 
    370376 
    371377package_dir["sas.qtgui.Perspectives.Invariant"] = os.path.join( 
  • src/sas/qtgui/Calculators/DensityPanel.py

    rb0c5e8c r4d81bc7  
    88from sas.qtgui.Utilities.GuiUtils import FormulaValidator 
    99from sas.qtgui.UI import main_resources_rc 
    10 from sas.qtgui.Utilities.GuiUtils import HELP_DIRECTORY_LOCATION 
     10from sas.qtgui.Utilities.GuiUtils import HELP_DIRECTORY_LOCATION, enum 
    1111 
    1212# Local UI 
    1313from sas.qtgui.Calculators.UI.DensityPanel import Ui_DensityPanel 
    14  
    15 def enum(*sequential, **named): 
    16     enums = dict(zip(sequential, range(len(sequential))), **named) 
    17     return type('Enum', (), enums) 
    1814 
    1915MODEL = enum( 
  • src/sas/qtgui/Calculators/SldPanel.py

    rb0c5e8c r4d81bc7  
    1414from sas.qtgui.Calculators.UI.SldPanel import Ui_SldPanel 
    1515 
    16 def enum(*sequential, **named): 
    17     enums = dict(zip(sequential, range(len(sequential))), **named) 
    18     return type('Enum', (), enums) 
    19  
    20 MODEL = enum( 
     16MODEL = GuiUtils.enum( 
    2117    'MOLECULAR_FORMULA', 
    2218    'MASS_DENSITY', 
  • src/sas/qtgui/MainWindow/DataExplorer.py

    r88e1f57 r4d81bc7  
    159159            self.cbFitting.clear() 
    160160            self.cbFitting.addItems(available_perspectives) 
     161            for idx, p in enumerate(available_perspectives): 
     162                if p=="Fitting": 
     163                    self.cbFitting.setCurrentIndex(idx) 
    161164        self.cbFitting.currentIndexChanged.connect(self.updatePerspectiveCombo) 
    162165        # Set the index so we see the default (Fitting) 
  • src/sas/qtgui/Perspectives/__init__.py

    r7adc2a8 r4d81bc7  
    44from Fitting.FittingPerspective import FittingWindow 
    55from Invariant.InvariantPerspective import InvariantWindow 
     6from Corfunc.CorfuncPerspective import CorfuncWindow 
    67 
    78PERSPECTIVES = { 
    89    FittingWindow.name: FittingWindow, 
    910    InvariantWindow.name: InvariantWindow, 
     11    CorfuncWindow.name: CorfuncWindow, 
    1012} 
  • src/sas/qtgui/Utilities/GuiUtils.py

    r88e1f57 r4d81bc7  
    806806    else: 
    807807        return name 
     808 
     809def enum(*sequential, **named): 
     810    """Create an enumeration object from a list of strings""" 
     811    enums = dict(zip(sequential, range(len(sequential))), **named) 
     812    return type('Enum', (), enums) 
Note: See TracChangeset for help on using the changeset viewer.