Changeset 1eafef1 in sasview
- Timestamp:
- Oct 26, 2017 8:26:01 AM (7 years ago)
- Parents:
- ff2b961
- Location:
- src/sas/qtgui
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Calculators/DensityPanel.py
rb0c5e8c r1eafef1 8 8 from sas.qtgui.Utilities.GuiUtils import FormulaValidator 9 9 from sas.qtgui.UI import main_resources_rc 10 from sas.qtgui.Utilities.GuiUtils import HELP_DIRECTORY_LOCATION 10 from sas.qtgui.Utilities.GuiUtils import HELP_DIRECTORY_LOCATION, enum 11 11 12 12 # Local UI 13 13 from 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)18 14 19 15 MODEL = enum( -
src/sas/qtgui/Calculators/SldPanel.py
rb0c5e8c r1eafef1 14 14 from sas.qtgui.Calculators.UI.SldPanel import Ui_SldPanel 15 15 16 def enum(*sequential, **named): 17 enums = dict(zip(sequential, range(len(sequential))), **named) 18 return type('Enum', (), enums) 19 20 MODEL = enum( 16 MODEL = GuiUtils.enum( 21 17 'MOLECULAR_FORMULA', 22 18 'MASS_DENSITY', -
src/sas/qtgui/Perspectives/Corfunc/CorfuncUtils.py
r9634f86 r1eafef1 1 def enum(*sequential, **named): 2 enums = dict(zip(sequential, range(len(sequential))), **named) 3 return type('Enum', (), enums) 1 from sas.qtgui.Utilities.GuiUtils import enum 4 2 5 3 WIDGETS = enum( 'W_QMIN', -
src/sas/qtgui/Perspectives/Invariant/InvariantUtils.py
rf721030 r1eafef1 1 def enum(*sequential, **named): 2 enums = dict(zip(sequential, range(len(sequential))), **named) 3 return type('Enum', (), enums) 1 from sas.qtgui.Utilities.GuiUtils import enum 4 2 5 3 WIDGETS = enum( 'W_FILENAME', #0 -
src/sas/qtgui/Utilities/GuiUtils.py
r88e1f57 r1eafef1 806 806 else: 807 807 return name 808 809 def 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.