Changeset 1115 for trunk/GSASII.py


Ignore:
Timestamp:
Oct 18, 2013 4:00:32 PM (9 years ago)
Author:
toby
Message:

rework exports for new types

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r1106 r1115  
    3030import wx
    3131import matplotlib as mpl
    32 import wx.lib.inspection as wxeye
    3332try:
    3433    import OpenGL as ogl
     
    11541153            singlemenu, help='Export single crystal histogram(s)')
    11551154
     1155        imagemenu = wx.Menu()
     1156        item = menu.AppendMenu(
     1157            wx.ID_ANY, 'Images as',
     1158            imagemenu, help='Export powder image(s)')
     1159
     1160        mapmenu = wx.Menu()
     1161        item = menu.AppendMenu(
     1162            wx.ID_ANY, 'Maps as',
     1163            mapmenu, help='Export density map(s)')
     1164
     1165        # pdfmenu = wx.Menu()
     1166        # item = menu.AppendMenu(
     1167        #     wx.ID_ANY, 'PDFs as',
     1168        #     pdfmenu, help='Export pair distribution function(s)')
     1169
    11561170        # find all the exporter files
    11571171        pathlist = sys.path
     
    12021216                elif typ == "single":
    12031217                    submenu = singlemenu
     1218                elif typ == "image":
     1219                    submenu = imagemenu
     1220                elif typ == "map":
     1221                    submenu = mapmenu
     1222                # elif typ == "pdf":
     1223                #     submenu = pdfmenu
    12041224                else:
    12051225                    print("Error, unknown type in "+str(obj))
     
    12141234        #code to debug an Exporter. much is hard-coded below, but code is reloaded before
    12151235        # each use allowing faster development
    1216         # def DebugText(event):
     1236        # def DebugExport(event):
    12171237        #     reload(G2IO)
    1218         #     import dev_export_example
    1219         #     reload(dev_export_example)
    1220         #     dev_export_example.ExportSingleText(self).Exporter(event)
     1238        #     #import dev_export as dev
     1239        #     import G2export_csv as dev
     1240        #     reload(dev)
     1241        #     #dev.ExportTest(self).Exporter(event)
     1242        #     dev.ExportPowderCSV(self).Exporter(event)
     1243        #     dev.ExportPowderReflCSV(self).Exporter(event)
    12211244        # item = menu.Append(
    12221245        #     wx.ID_ANY,kind=wx.ITEM_NORMAL,
    1223         #     help="debug text",text="test Export")
    1224         # self.Bind(wx.EVT_MENU, DebugText, id=item.GetId())
    1225         # self.ExportLookup[item.GetId()] = 'single'
     1246        #     help="debug exporter",text="test Export")
     1247        # self.Bind(wx.EVT_MENU, DebugExport, id=item.GetId())
     1248        # #self.ExportLookup[item.GetId()] = 'image'
     1249        # self.ExportLookup[item.GetId()] = 'powder'
    12261250           
    12271251    def _Add_ExportMenuItems(self,parent):
     
    27332757    # may want to do this if we can
    27342758    application = GSASIImain(0)
    2735     if wxInspector: wxeye.InspectionTool().Show()
     2759    if wxInspector:
     2760        import wx.lib.inspection as wxeye
     2761        wxeye.InspectionTool().Show()
    27362762
    27372763    #application.main.OnRefine(None)
Note: See TracChangeset for help on using the changeset viewer.