Changeset da8f4c8 in sasview for sansguiframe/src/sans/guiframe
- Timestamp:
- Apr 18, 2012 10:06:31 AM (13 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:
- bc2db41
- Parents:
- 1a7207b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/local_perspectives/plotting/detector_dialog.py
r079072e rda8f4c8 1 #!/usr/bin/env python 2 3 # version 4 __id__ = "$Id: aboutdialog.py 1193 2007-05-03 17:29:59Z dmitriy $" 5 __revision__ = "$Revision: 1193 $" 6 1 """ 2 Widget to display a 2D map of the detector 3 """ 7 4 import wx 8 5 import sys 9 6 from sans.guiframe.utils import format_number 10 7 from sans.guiframe.events import StatusEvent 11 from sans.guiframe.events import NewPlotEvent12 13 import matplotlib14 8 from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as Canvas 15 from matplotlib import pyplot16 9 from matplotlib import mpl 17 10 from matplotlib import pylab … … 263 256 264 257 wx.EVT_COMBOBOX(self.cmap_selector, -1, self._on_select_cmap) 265 sizer_selection.Add(wx.StaticText(self, -1, "Select Cmap: "), 0,258 sizer_selection.Add(wx.StaticText(self, -1, "Select Cmap: "), 0, 266 259 wx.LEFT|wx.ADJUST_MINSIZE, 5) 267 260 sizer_selection.Add(self.cmap_selector, 0, wx.EXPAND|wx.ALL, 10) … … 295 288 norm=self.norm, orientation='horizontal') 296 289 self.canvas.draw() 297 298 299 # end of class DialogAbout300 301 ##### testing code ############################################################302 class MyApp(wx.App):303 def OnInit(self):304 wx.InitAllImageHandlers()305 dialog = DetectorDialog(None, -1, "")306 self.SetTopWindow(dialog)307 dialog.setContent(xnpts=128, ynpts=128, qmax=20,308 beam=20, zmin=2, zmax=60, sym=False)309 print dialog.ShowModal()310 evt = dialog.getContent()311 if hasattr(evt, "npts"):312 print "number of point: ", evt.npts313 if hasattr(evt,"qmax"):314 print "qmax: ", evt.qmax315 dialog.Destroy()316 return 1317 318 # end of class MyApp319 320 if __name__ == "__main__":321 app = MyApp(0)322 app.MainLoop()323
Note: See TracChangeset
for help on using the changeset viewer.