Changeset a5701e6 in sasview for sansview/perspectives/fitting/basepage.py
- Timestamp:
- Mar 10, 2011 5:11:55 PM (14 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:
- c399004
- Parents:
- 7987962
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
r7987962 ra5701e6 1658 1658 enable2D=self.enable2D) 1659 1659 1660 def _set_model_sizer(self,sizer, box_sizer, title="", object=None):1661 """1662 Use lists to fill a sizer for model info1663 """1664 1665 sizer.Clear(True)1666 ##For MAC, this should defined here.1667 if box_sizer == None:1668 box_description= wx.StaticBox(self, -1,str(title))1669 boxsizer1 = wx.StaticBoxSizer(box_description, wx.VERTICAL)1670 else:1671 boxsizer1 = box_sizer1672 sizer_buttons = wx.BoxSizer(wx.HORIZONTAL)1673 #--------------------------------------------------------1674 self.shape_rbutton = wx.RadioButton(self, -1, 'Shapes', style=wx.RB_GROUP)1675 self.shape_indep_rbutton = wx.RadioButton(self, -1, "Shape-Independent")1676 self.struct_rbutton = wx.RadioButton(self, -1, "Structure Factor ")1677 self.plugin_rbutton = wx.RadioButton(self, -1, "Customized Models")1678 1679 self.Bind( wx.EVT_RADIOBUTTON, self._show_combox,1680 id= self.shape_rbutton.GetId() )1681 self.Bind( wx.EVT_RADIOBUTTON, self._show_combox,1682 id= self.shape_indep_rbutton.GetId() )1683 self.Bind( wx.EVT_RADIOBUTTON, self._show_combox,1684 id= self.struct_rbutton.GetId() )1685 self.Bind( wx.EVT_RADIOBUTTON, self._show_combox,1686 id= self.plugin_rbutton.GetId() )1687 #MAC needs SetValue1688 self.shape_rbutton.SetValue(True)1689 1690 sizer_radiobutton = wx.GridSizer(2, 2,5, 5)1691 sizer_radiobutton.Add(self.shape_rbutton)1692 sizer_radiobutton.Add(self.shape_indep_rbutton)1693 1694 sizer_radiobutton.Add(self.plugin_rbutton)1695 sizer_radiobutton.Add(self.struct_rbutton)1696 sizer_buttons.Add(sizer_radiobutton)1697 # detail button1698 if object !=None:1699 sizer_buttons.Add((50,0))1700 sizer_buttons.Add(object)1701 1702 sizer_selection = wx.BoxSizer(wx.HORIZONTAL)1703 mutifactor_selection = wx.BoxSizer(wx.HORIZONTAL)1704 1705 self.text1 = wx.StaticText( self,-1,"" )1706 self.text2 = wx.StaticText( self,-1,"P(Q)*S(Q)" )1707 self.mutifactor_text = wx.StaticText( self,-1,"No. of Shells: " )1708 self.mutifactor_text1 = wx.StaticText( self,-1,"" )1709 self.show_sld_button = wx.Button( self,-1,"Show SLD Profile" )1710 self.show_sld_button.Bind(wx.EVT_BUTTON,self._on_show_sld)1711 1712 self.formfactorbox = wx.ComboBox(self, -1,style=wx.CB_READONLY)1713 if self.model!= None:1714 self.formfactorbox.SetValue(self.model.name)1715 1716 self.structurebox = wx.ComboBox(self, -1,style=wx.CB_READONLY)1717 self.multifactorbox = wx.ComboBox(self, -1,style=wx.CB_READONLY)1718 self.initialize_combox()1719 1720 wx.EVT_COMBOBOX(self.formfactorbox,-1, self._on_select_model)1721 wx.EVT_COMBOBOX(self.structurebox,-1, self._on_select_model)1722 wx.EVT_COMBOBOX(self.multifactorbox,-1, self._on_select_model)1723 1724 ## check model type to show sizer1725 if self.model !=None:1726 self._set_model_sizer_selection( self.model )1727 1728 sizer_selection.Add(self.text1)1729 sizer_selection.Add((5,5))1730 sizer_selection.Add(self.formfactorbox)1731 sizer_selection.Add((5,5))1732 sizer_selection.Add(self.text2)1733 sizer_selection.Add((5,5))1734 sizer_selection.Add(self.structurebox)1735 #sizer_selection.Add((5,5))1736 mutifactor_selection.Add((10,5))1737 mutifactor_selection.Add(self.mutifactor_text)1738 mutifactor_selection.Add(self.multifactorbox)1739 mutifactor_selection.Add((5,5))1740 mutifactor_selection.Add(self.mutifactor_text1)1741 mutifactor_selection.Add((10,5))1742 mutifactor_selection.Add(self.show_sld_button)1743 1744 boxsizer1.Add( sizer_buttons )1745 boxsizer1.Add( (15,15))1746 boxsizer1.Add( sizer_selection )1747 boxsizer1.Add( (10,10))1748 boxsizer1.Add(mutifactor_selection)1749 1750 self._set_multfactor_combobox()1751 self.multifactorbox.SetSelection(1)1752 self.show_sld_button.Hide()1753 #--------------------------------------------------------1754 sizer.Add(boxsizer1,0, wx.EXPAND | wx.ALL, 10)1755 sizer.Layout()1756 1660 1757 1661 def _on_show_sld(self, event=None):
Note: See TracChangeset
for help on using the changeset viewer.