Changeset 3477478 in sasview for src/sas/plottools/PropertyDialog.py
- Timestamp:
- Mar 5, 2015 12:38:29 PM (10 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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- b9dbd6b
- Parents:
- 2df0b74
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/plottools/PropertyDialog.py
r79492222 r3477478 8 8 def __init__(self, parent, id=-1, title="Select the scale of the graph"): 9 9 wx.Dialog.__init__(self, parent, id, title) 10 """11 for the properties window12 """13 10 self.parent = parent 14 11 vbox = wx.BoxSizer(wx.VERTICAL) 15 sizer = wx.GridBagSizer(5, 5)12 sizer = wx.GridBagSizer(5, 5) 16 13 17 14 x_size = 70 … … 28 25 self.xvalue = wx.ComboBox(self, -1) 29 26 x_size += self.xvalue.GetSize()[0] 30 sizer.Add(self.xvalue, (iy, ix), (1, 1), wx.EXPAND |wx.ADJUST_MINSIZE, 0)31 27 sizer.Add(self.xvalue, (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0) 28 32 29 ix += 2 33 30 self.yvalue = wx.ComboBox(self, -1) 34 31 x_size += self.yvalue.GetSize()[0] 35 sizer.Add(self.yvalue, (iy, ix), (1, 1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)36 32 sizer.Add(self.yvalue, (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0) 33 37 34 ix += 2 38 35 self.view = wx.ComboBox(self, -1) 39 36 x_size += self.view.GetSize()[0] 40 37 self.view.SetMinSize((160, 30)) 41 sizer.Add(self.view, (iy, ix), (1,1),42 wx.EXPAND |wx.RIGHT|wx.ADJUST_MINSIZE, 10)38 sizer.Add(self.view, (iy, ix), (1, 1), 39 wx.EXPAND | wx.RIGHT | wx.ADJUST_MINSIZE, 10) 43 40 self.SetMinSize((x_size, 50)) 44 vbox.Add(sizer, 0, wx.EXPAND |wx.ADJUST_MINSIZE, 0)45 46 btCancel = wx.Button(self, wx.ID_CANCEL,'Cancel')47 btOk= wx.Button(self, wx.ID_OK, "OK")41 vbox.Add(sizer, 0, wx.EXPAND | wx.ADJUST_MINSIZE, 0) 42 43 cancel_button = wx.Button(self, wx.ID_CANCEL, 'Cancel') 44 ok_button = wx.Button(self, wx.ID_OK, "OK") 48 45 sizer_button = wx.BoxSizer(wx.HORIZONTAL) 49 sizer_button.Add((20, 20), 1, wx.EXPAND |wx.ADJUST_MINSIZE, 0)50 sizer_button.Add( btOk, 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10)51 sizer_button.Add( btCancel, 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10)46 sizer_button.Add((20, 20), 1, wx.EXPAND | wx.ADJUST_MINSIZE, 0) 47 sizer_button.Add(ok_button, 0, wx.LEFT | wx.RIGHT | wx.ADJUST_MINSIZE, 10) 48 sizer_button.Add(cancel_button, 0, wx.LEFT | wx.RIGHT | wx.ADJUST_MINSIZE, 10) 52 49 vbox.Add(sizer_button, 0, 53 wx.EXPAND |wx.TOP|wx.BOTTOM|wx.ADJUST_MINSIZE, 10)50 wx.EXPAND | wx.TOP | wx.BOTTOM | wx.ADJUST_MINSIZE, 10) 54 51 # scale value for x 55 52 self.xvalue.SetValue("ln(x)") … … 60 57 self.xvalue.Insert("log10(x)", 4) 61 58 self.xvalue.Insert("log10(x^(4))", 5) 62 59 63 60 # scale value for y 64 61 self.yvalue.SetValue("ln(y)") … … 81 78 self.view.Insert("XS Guinier ln(y*x) vs x^(2)", 3) 82 79 self.view.Insert("Porod y*x^(4) vs x^(4)", 4) 83 self.view.Insert("Kratky y*x^(2) vs x", 5)80 self.view.Insert("Kratky y*x^(2) vs x", 5) 84 81 self.SetSizer(vbox) 85 82 self.Fit() 86 83 self.Centre() 87 84 88 85 def setValues(self, x, y, view): 89 86 """ 90 87 """ 91 return self.xvalue.SetValue(x), self.yvalue.SetValue(y), \88 return self.xvalue.SetValue(x), self.yvalue.SetValue(y), \ 92 89 self.view.SetValue(view) 93 90 94 91 def getValues(self): 95 92 """ 96 93 """ 97 return self.xvalue.GetValue(), self.yvalue.GetValue(), \94 return self.xvalue.GetValue(), self.yvalue.GetValue(), \ 98 95 self.view.GetValue()
Note: See TracChangeset
for help on using the changeset viewer.