source: sasview/src/sas/sasgui/perspectives/file_converter/frame_select_dialog.py @ eb8da5f

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since eb8da5f was eb8da5f, checked in by lewis, 8 years ago

Support loading BSL/OTOKO files with multiple frames

  • Property mode set to 100644
File size: 1.6 KB
Line 
1import wx
2
3class FrameSelectDialog(wx.Dialog):
4
5    def __init__(self, n_frames):
6        wx.Dialog.__init__(self, None, title="Select Frames")
7
8        sizer = wx.GridBagSizer(10, 10)
9
10        y = 0
11        instructions = ("The file you've selected has {} frames. "
12            "Please select a subset of frames to convert to CanSAS "
13            "format").format(n_frames)
14        instructions_label = wx.StaticText(self, -1, instructions)
15        instructions_label.Wrap(self.GetSize().width - 20)
16        sizer.Add(instructions_label, (y,0), (1,2), wx.ALL, 5)
17        y += 1
18
19        first_label = wx.StaticText(self, -1, "First Frame (0-{}): ".format(n_frames-1))
20        sizer.Add(first_label, (y,0), (1,1), wx.ALL, 5)
21
22        self.first_input = wx.TextCtrl(self, -1)
23        sizer.Add(self.first_input, (y,1), (1,1))
24        y += 1
25
26        last_label = wx.StaticText(self, -1, "Last Frame (0-{}): ".format(n_frames-1))
27        sizer.Add(last_label, (y,0), (1,1), wx.ALL, 5)
28
29        self.last_input = wx.TextCtrl(self, -1)
30        sizer.Add(self.last_input, (y,1), (1,1))
31        y += 1
32
33        increment_label = wx.StaticText(self, -1, "Increment: ")
34        sizer.Add(increment_label, (y,0), (1,1), wx.ALL, 5)
35
36        self.increment_input = wx.TextCtrl(self, -1)
37        sizer.Add(self.increment_input, (y,1), (1,1))
38        y += 1
39
40        done_btn = wx.Button(self, wx.ID_OK)
41        sizer.Add(done_btn, (y,0), (1,1), wx.LEFT | wx.TOP | wx.BOTTOM, 15)
42
43        cancel_btn = wx.Button(self, wx.ID_CANCEL)
44        sizer.Add(cancel_btn, (y,1), (1,1), wx.ALL, 15)
45
46        self.SetSizer(sizer)
Note: See TracBrowser for help on using the repository browser.