Changeset 0b477f6 in sasview for fittingview/src/sans/perspectives/fitting/fitpage.py
- Timestamp:
- May 24, 2012 1:45:11 PM (12 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:
- 7b7ff27
- Parents:
- 0c24e98
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fittingview/src/sans/perspectives/fitting/fitpage.py
r940aca7 r0b477f6 554 554 self.sizer5.Layout() 555 555 556 def _fill_model_sizer(self, sizer):557 """558 fill sizer containing model info559 """560 ##Add model function Details button in fitpanel.561 ##The following 3 lines are for Mac. Let JHC know before modifying...562 title = "Model"563 self.formfactorbox = None564 self.multifactorbox = None565 self.mbox_description = wx.StaticBox(self, -1, str(title))566 boxsizer1 = wx.StaticBoxSizer(self.mbox_description, wx.VERTICAL)567 self.mbox_description.SetForegroundColour(wx.RED)568 id = wx.NewId()569 self.model_help = wx.Button(self, id, 'Details', size=(80, 23))570 self.model_help.Bind(wx.EVT_BUTTON, self.on_model_help_clicked, id=id)571 self.model_help.SetToolTipString("Model Function Help")572 id = wx.NewId()573 self.model_view = wx.Button(self, id, "Show 2D", size=(80, 23))574 self.model_view.Bind(wx.EVT_BUTTON, self._onModel2D, id=id)575 hint = "toggle view of model from 1D to 2D or 2D to 1D"576 self.model_view.SetToolTipString(hint)577 578 self.shape_rbutton = wx.RadioButton(self, -1, 'Shapes',579 style=wx.RB_GROUP)580 self.shape_indep_rbutton = wx.RadioButton(self, -1,581 "Shape-Independent")582 self.struct_rbutton = wx.RadioButton(self, -1, "Structure Factor ")583 self.plugin_rbutton = wx.RadioButton(self, -1, "Customized Models")584 585 self.Bind(wx.EVT_RADIOBUTTON, self._show_combox,586 id=self.shape_rbutton.GetId())587 self.Bind(wx.EVT_RADIOBUTTON, self._show_combox,588 id=self.shape_indep_rbutton.GetId())589 self.Bind(wx.EVT_RADIOBUTTON, self._show_combox,590 id=self.struct_rbutton.GetId())591 self.Bind(wx.EVT_RADIOBUTTON, self._show_combox,592 id=self.plugin_rbutton.GetId())593 #MAC needs SetValue594 self.shape_rbutton.SetValue(True)595 596 sizer_radiobutton = wx.GridSizer(2, 3, 5, 5)597 sizer_radiobutton.Add(self.shape_rbutton)598 sizer_radiobutton.Add(self.shape_indep_rbutton)599 sizer_radiobutton.Add(self.model_view, 1, wx.LEFT, 20)600 sizer_radiobutton.Add(self.plugin_rbutton)601 sizer_radiobutton.Add(self.struct_rbutton)602 sizer_radiobutton.Add(self.model_help, 1, wx.LEFT, 20)603 604 sizer_selection = wx.BoxSizer(wx.HORIZONTAL)605 mutifactor_selection = wx.BoxSizer(wx.HORIZONTAL)606 607 self.text1 = wx.StaticText(self, -1, "")608 self.text2 = wx.StaticText(self, -1, "P(Q)*S(Q)")609 self.mutifactor_text = wx.StaticText(self, -1, "No. of Shells: ")610 self.mutifactor_text1 = wx.StaticText(self, -1, "")611 self.show_sld_button = wx.Button(self, -1, "Show SLD Profile")612 self.show_sld_button.Bind(wx.EVT_BUTTON, self._on_show_sld)613 614 self.formfactorbox = wx.ComboBox(self, -1, style=wx.CB_READONLY)615 if self.model != None:616 self.formfactorbox.SetValue(self.model.name)617 self.structurebox = wx.ComboBox(self, -1, style=wx.CB_READONLY)618 self.multifactorbox = wx.ComboBox(self, -1, style=wx.CB_READONLY)619 self.initialize_combox()620 wx.EVT_COMBOBOX(self.formfactorbox, -1, self._on_select_model)621 622 wx.EVT_COMBOBOX(self.structurebox, -1, self._on_select_model)623 wx.EVT_COMBOBOX(self.multifactorbox, -1, self._on_select_model)624 ## check model type to show sizer625 if self.model != None:626 self._set_model_sizer_selection(self.model)627 628 sizer_selection.Add(self.text1)629 sizer_selection.Add((5, 5))630 sizer_selection.Add(self.formfactorbox)631 sizer_selection.Add((5, 5))632 sizer_selection.Add(self.text2)633 sizer_selection.Add((5, 5))634 sizer_selection.Add(self.structurebox)635 636 mutifactor_selection.Add((10, 5))637 mutifactor_selection.Add(self.mutifactor_text)638 mutifactor_selection.Add(self.multifactorbox)639 mutifactor_selection.Add((5, 5))640 mutifactor_selection.Add(self.mutifactor_text1)641 mutifactor_selection.Add((10, 5))642 mutifactor_selection.Add(self.show_sld_button)643 644 boxsizer1.Add(sizer_radiobutton)645 boxsizer1.Add((10, 10))646 boxsizer1.Add(sizer_selection)647 boxsizer1.Add((10, 10))648 boxsizer1.Add(mutifactor_selection)649 650 self._set_multfactor_combobox()651 self.multifactorbox.SetSelection(1)652 self.show_sld_button.Hide()653 sizer.Add(boxsizer1, 0, wx.EXPAND | wx.ALL, 10)654 sizer.Layout()655 556 656 557 def _set_sizer_dispersion(self):
Note: See TracChangeset
for help on using the changeset viewer.