Changeset 55bc56bc in sasview for src/sas/sasgui/perspectives/file_converter/converter_panel.py
- Timestamp:
- Jul 19, 2016 11:08:42 AM (8 years ago)
- Branches:
- master, 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- bf23693
- Parents:
- a027549
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/file_converter/converter_panel.py
ra027549 r55bc56bc 13 13 from sas.sasgui.perspectives.file_converter.meta_panels import DetectorPanel 14 14 from sas.sasgui.perspectives.file_converter.meta_panels import SamplePanel 15 from sas.sasgui.perspectives.file_converter.meta_panels import SourcePanel 15 16 from sas.sasgui.guiframe.events import StatusEvent 16 17 from sas.sasgui.guiframe.dataFitting import Data1D … … 20 21 from sas.sascalc.dataloader.data_info import Detector 21 22 from sas.sascalc.dataloader.data_info import Sample 23 from sas.sascalc.dataloader.data_info import Source 22 24 from sas.sascalc.dataloader.data_info import Vector 23 25 … … 59 61 'instrument': None, 60 62 'detector': [Detector()], 61 'sample': Sample() 63 'sample': Sample(), 64 'source': Source() 62 65 } 63 66 … … 186 189 sample_frame.Show(True) 187 190 191 def show_source_window(self, event): 192 if self.meta_frames != []: 193 for frame in self.meta_frames: 194 frame.panel.on_close() 195 source_frame = MetadataWindow(SourcePanel, 196 parent=self.parent.manager.parent, manager=self, 197 metadata=self.metadata['source'], title="Source Metadata") 198 self.meta_frames.append(source_frame) 199 self.parent.manager.put_icon(source_frame) 200 source_frame.Show(True) 201 188 202 def on_collapsible_pane(self, event): 189 203 self.Freeze() … … 289 303 290 304 y = 0 305 windows = ['detector', 'sample', 'source'] 291 306 for item in self.metadata.keys(): 292 if item == 'detector' or item == 'sample': continue307 if item in windows: continue 293 308 label_txt = item.replace('_', ' ').capitalize() 294 309 label = wx.StaticText(metadata_pane, -1, label_txt, … … 317 332 y += 1 318 333 334 source_label = wx.StaticText(metadata_pane, -1, "Source: ") 335 metadata_grid.Add(source_label, (y,0), (1,1), wx.ALL | wx.EXPAND, 5) 336 source_btn = wx.Button(metadata_pane, -1, "Enter Source Metadata") 337 source_btn.Bind(wx.EVT_BUTTON, self.show_source_window) 338 metadata_grid.Add(source_btn, (y,1), (1,1), wx.ALL | wx.EXPAND, 5) 339 y += 1 340 319 341 metadata_pane.SetSizer(metadata_grid) 320 342
Note: See TracChangeset
for help on using the changeset viewer.