Changeset 9714ff5 in sasview for calculatorview/src
- Timestamp:
- Dec 18, 2012 6:01:40 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:
- aaaf9b4
- Parents:
- 87f8971
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/src/sans/perspectives/calculator/gen_scatter_panel.py
r318b5bbb r9714ff5 733 733 self._status_info(msg, status_type) 734 734 735 cal_out = CalcGen(input=[self.data.qx_data, self.data.qy_data,i_out], 736 completefn=self.complete, updatefn=self._update) 735 cal_out = CalcGen(input=[self.data.qx_data, 736 self.data.qy_data,i_out], 737 completefn=self.complete, 738 updatefn=self._update) 737 739 cal_out.queue() 738 740 … … 1510 1512 """ 1511 1513 def __init__(self, parent=None, title="Generic Scattering Calculator", 1512 size=(PANEL_WIDTH * 1.3, PANEL_HEIGHT * 1.5 ), *args, **kwds):1514 size=(PANEL_WIDTH * 1.3, PANEL_HEIGHT * 1.55), *args, **kwds): 1513 1515 """ 1514 1516 Init … … 1525 1527 self.sld_data = None 1526 1528 self._default_save_location = os.getcwd() 1529 1527 1530 self._mgr = aui.AuiManager(self) 1528 1531 self._mgr.SetDockSizeConstraint(0.5, 0.5) … … 1530 1533 self.scale2d = 'log_{10}' 1531 1534 1532 #self.plot_frame = PlotFrame(self, -1, 'testView')1535 self._build_toolbar() 1533 1536 self._build_menubar() 1534 1537 … … 1537 1540 self.Show(True) 1538 1541 1542 def _build_toolbar(self): 1543 """ 1544 Build toolbar 1545 """ 1546 tsize = (20, 20) 1547 tb = self.CreateToolBar(wx.TB_HORIZONTAL | wx.TB_FLAT) 1548 open_bmp = wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN, wx.ART_TOOLBAR, 1549 tsize) 1550 save_bmp = wx.ArtProvider.GetBitmap(wx.ART_FILE_SAVE_AS, wx.ART_TOOLBAR, 1551 tsize) 1552 close_bmp= wx.ArtProvider.GetBitmap(wx.ART_QUIT, wx.ART_TOOLBAR, 1553 tsize) 1554 help_bmp= wx.ArtProvider.GetBitmap(wx.ART_HELP, wx.ART_TOOLBAR, 1555 (17, 20)) 1556 1557 id = wx.NewId() 1558 tb.AddLabelTool(id, "Open", open_bmp, shortHelp="Open", 1559 longHelp="Open sld/omf file") 1560 self.Bind(wx.EVT_TOOL, self.on_open_file, id=id) 1561 1562 id = wx.NewId() 1563 tb.AddSimpleTool(id, save_bmp, "Save", "Save as sld file") 1564 self.Bind(wx.EVT_TOOL, self.on_save_file, id=id) 1565 1566 tb.AddSeparator() 1567 id = wx.NewId() 1568 tb.AddSimpleTool(id, close_bmp, "Quit", "Quit") 1569 self.Bind(wx.EVT_TOOL, self.on_close, id=id) 1570 1571 tb.AddSeparator() 1572 id = wx.NewId() 1573 tb.AddSimpleTool(id, help_bmp, "Help", "Help") 1574 self.Bind(wx.EVT_TOOL, self.on_help, id=id) 1575 1576 tb.Realize() 1577 1539 1578 def _build_menubar(self): 1540 1579 """ 1541 Menu bar 1542 """ 1580 Build menubar 1581 """ 1582 tsize = (13, 13) 1583 open_bmp = wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN, wx.ART_TOOLBAR, 1584 tsize) 1585 save_bmp = wx.ArtProvider.GetBitmap(wx.ART_FILE_SAVE_AS, wx.ART_TOOLBAR, 1586 tsize) 1587 quit_bmp= wx.ArtProvider.GetBitmap(wx.ART_QUIT, wx.ART_TOOLBAR, 1588 tsize) 1589 help_bmp= wx.ArtProvider.GetBitmap(wx.ART_HELP, wx.ART_TOOLBAR, 1590 (13, 15)) 1591 1543 1592 menu_bar = wx.MenuBar() 1544 1593 1545 1594 menu = wx.Menu() 1546 1595 id = wx.NewId() 1547 menu.Append(id, "&Open sld/omf file") 1596 item = wx.MenuItem(menu, id, "&Open sld/omf file") 1597 item.SetBitmap(open_bmp) 1598 menu.AppendItem(item) 1548 1599 wx.EVT_MENU(self, id, self.on_open_file) 1600 1549 1601 id = wx.NewId() 1550 menu.Append(id, "&Save as sld file") 1602 item = wx.MenuItem(menu, id, "&Save as sld file") 1603 item.SetBitmap(save_bmp) 1604 menu.AppendItem(item) 1551 1605 wx.EVT_MENU(self, id, self.on_save_file) 1606 1607 menu.AppendSeparator() 1552 1608 id = wx.NewId() 1553 menu.Append(id, "&Quit") 1554 menu_bar.Append(menu, "File") 1609 item = wx.MenuItem(menu, id, "&Quit") 1610 item.SetBitmap(quit_bmp) 1611 menu.AppendItem(item) 1612 1613 menu_bar.Append(menu, "&File") 1555 1614 wx.EVT_MENU(self, id, self.on_close) 1556 1615 1557 1616 menu_help = wx.Menu() 1558 1617 id = wx.NewId() 1559 menu_help.Append(id, "&Theory and GUI") 1618 item = wx.MenuItem(menu_help, id, "&Theory and GUI") 1619 item.SetBitmap(help_bmp) 1620 menu_help.AppendItem(item) 1560 1621 wx.EVT_MENU(self, id, self.on_help) 1622 1561 1623 menu_bar.Append(menu_help, "&Help") 1562 1624 … … 1571 1633 self._mgr.AddPane(self.panel, aui.AuiPaneInfo(). 1572 1634 Name(self.panel.window_name). 1573 #Caption(self.panel.window_caption).1574 1635 CenterPane(). 1575 1636 # This is where we set the size of … … 1581 1642 Name(self.omfpanel.window_name). 1582 1643 Caption(self.omfpanel.window_caption). 1583 #MinimizeButton(True).1584 1644 CloseButton(False). 1585 1645 Right().
Note: See TracChangeset
for help on using the changeset viewer.