Changeset 8db20a9 in sasview for src/sas/qtgui/Utilities/GuiUtils.py
- Timestamp:
- Jan 21, 2019 6:15:40 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_sync_sascalc
- Children:
- d541324e
- Parents:
- 3ca645bb
- git-author:
- Piotr Rozyczko <piotr.rozyczko@…> (01/21/19 06:12:08)
- git-committer:
- Piotr Rozyczko <piotr.rozyczko@…> (01/21/19 06:15:40)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Utilities/GuiUtils.py
r10786bc2 r8db20a9 44 44 45 45 from sas.sascalc.dataloader.loader import Loader 46 from sas.sascalc.file_converter.nxcansas_writer import NXcanSASWriter 47 46 48 from sas.qtgui.Utilities import CustomDir 47 49 … … 793 795 794 796 wildcard = "Text files (*.txt);;"\ 795 "CanSAS 1D files(*.xml)" 797 "CanSAS 1D files(*.xml);;"\ 798 "NXcanSAS files (*.h5)" 796 799 kwargs = { 797 800 'caption' : 'Save As', … … 812 815 if os.path.splitext(filename)[1].lower() == ".txt": 813 816 onTXTSave(data, filename) 814 if os.path.splitext(filename)[1].lower() == ".xml":817 elif os.path.splitext(filename)[1].lower() == ".xml": 815 818 loader.save(filename, data, ".xml") 819 elif os.path.splitext(filename)[1].lower() == ".h5": 820 nxcansaswriter = NXcanSASWriter() 821 nxcansaswriter.write([data], filename) 816 822 817 823 def saveData2D(data): … … 824 830 default_name += "_out" + ext_format 825 831 826 wildcard = "IGOR/DAT 2D file in Q_map (*.dat)" 832 wildcard = "IGOR/DAT 2D file in Q_map (*.dat);;"\ 833 "NXcanSAS files (*.h5)" 827 834 kwargs = { 828 835 'caption' : 'Save As', … … 844 851 if os.path.splitext(filename)[1].lower() == ext_format: 845 852 loader.save(filename, data, ext_format) 853 elif os.path.splitext(filename)[1].lower() == ".h5": 854 nxcansaswriter = NXcanSASWriter() 855 nxcansaswriter.write([data], filename) 856 846 857 847 858 class FormulaValidator(QtGui.QValidator):
Note: See TracChangeset
for help on using the changeset viewer.