Changeset 1831 for trunk/GSASIIpwdGUI.py


Ignore:
Timestamp:
May 1, 2015 6:38:23 PM (7 years ago)
Author:
toby
Message:

move remaining generic controls to G2ctrls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r1827 r1831  
    704704    data['peaks'] = X
    705705    G2frame.PatternTree.SetItemPyData(G2frame.PickId,data)
    706     G2frame.PeakTable = G2gd.Table(data['peaks'],rowLabels=rowLabels,colLabels=colLabels,types=Types)
     706    G2frame.PeakTable = G2G.Table(data['peaks'],rowLabels=rowLabels,colLabels=colLabels,types=Types)
    707707    G2frame.dataFrame.SetLabel('Peak List')
    708     G2frame.dataDisplay = G2gd.GSGrid(parent=G2frame.dataFrame)
     708    G2frame.dataDisplay = G2G.GSGrid(parent=G2frame.dataFrame)
    709709    G2frame.dataDisplay.SetTable(G2frame.PeakTable, True)
    710710    setBackgroundColors()                         
     
    914914            wg.GRID_VALUE_FLOAT+':10,3',wg.GRID_VALUE_BOOL,
    915915            wg.GRID_VALUE_FLOAT+':10,5',wg.GRID_VALUE_BOOL]
    916             debyeTable = G2gd.Table(data[1]['debyeTerms'],rowLabels=rowLabels,colLabels=colLabels,types=Types)
    917             debyeGrid = G2gd.GSGrid(parent=G2frame.dataDisplay)
     916            debyeTable = G2G.Table(data[1]['debyeTerms'],rowLabels=rowLabels,colLabels=colLabels,types=Types)
     917            debyeGrid = G2G.GSGrid(parent=G2frame.dataDisplay)
    918918            debyeGrid.SetTable(debyeTable, True)
    919919            debyeGrid.Bind(wx.EVT_KEY_DOWN, KeyEditPeakGrid)
     
    974974            wg.GRID_VALUE_FLOAT+':10,3',wg.GRID_VALUE_BOOL,
    975975            wg.GRID_VALUE_FLOAT+':10,5',wg.GRID_VALUE_BOOL]
    976             peaksTable = G2gd.Table(data[1]['peaksList'],rowLabels=rowLabels,colLabels=colLabels,types=Types)
    977             peaksGrid = G2gd.GSGrid(parent=G2frame.dataDisplay)
     976            peaksTable = G2G.Table(data[1]['peaksList'],rowLabels=rowLabels,colLabels=colLabels,types=Types)
     977            peaksGrid = G2G.GSGrid(parent=G2frame.dataDisplay)
    978978            peaksGrid.SetTable(peaksTable, True)
    979979            peaksGrid.Bind(wx.EVT_KEY_DOWN, KeyEditPeakGrid)
     
    10711071        rowLabels.append('exclude')
    10721072    Types = 2*[wg.GRID_VALUE_FLOAT+':12,5',]
    1073     G2frame.LimitsTable = G2gd.Table(data,rowLabels=rowLabels,colLabels=colLabels,types=Types)
     1073    G2frame.LimitsTable = G2G.Table(data,rowLabels=rowLabels,colLabels=colLabels,types=Types)
    10741074    G2frame.dataFrame.SetLabel('Limits')
    10751075    G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.LimitMenu)
     
    10781078    G2frame.Bind(wx.EVT_MENU,OnLimitCopy,id=G2gd.wxID_LIMITCOPY)
    10791079    G2frame.Bind(wx.EVT_MENU,OnAddExcl,id=G2gd.wxID_ADDEXCLREGION)   
    1080     G2frame.dataDisplay = G2gd.GSGrid(parent=G2frame.dataFrame)
     1080    G2frame.dataDisplay = G2G.GSGrid(parent=G2frame.dataFrame)
    10811081    G2frame.dataDisplay.SetTable(G2frame.LimitsTable, True)   
    10821082    G2frame.dataDisplay.SetCellStyle(0,0,VERY_LIGHT_GREY,True)
     
    17171717            freeNames[Controls[name]] = name
    17181718            Names.append(Controls[name])
    1719         dlg = G2gd.G2ColumnIDDialog( G2frame,' Choose multihistogram metadata columns:',
     1719        dlg = G2G.G2ColumnIDDialog( G2frame,' Choose multihistogram metadata columns:',
    17201720            'Select columns',Comments,Names,np.array(newItems).T)
    17211721        try:
     
    20232023        else:
    20242024            choices = ['Debye-Scherrer','Bragg-Brentano',]
    2025         histoType = G2gd.G2ChoiceButton(G2frame.dataDisplay,choices,
     2025        histoType = G2G.G2ChoiceButton(G2frame.dataDisplay,choices,
    20262026                    strLoc=data,strKey='Type',
    20272027                    onChoice=OnHistoChange)
     
    22162216            4*[wg.GRID_VALUE_LONG,]+2*[wg.GRID_VALUE_FLOAT+':10,5',]
    22172217    G2frame.PatternTree.SetItemPyData(IndexId,data)
    2218     G2frame.IndexPeaksTable = G2gd.Table(data[0],rowLabels=rowLabels,colLabels=colLabels,types=Types)
     2218    G2frame.IndexPeaksTable = G2G.Table(data[0],rowLabels=rowLabels,colLabels=colLabels,types=Types)
    22192219    G2frame.dataFrame.SetLabel('Index Peak List')
    2220     G2frame.dataDisplay = G2gd.GSGrid(parent=G2frame.dataFrame)               
     2220    G2frame.dataDisplay = G2G.GSGrid(parent=G2frame.dataFrame)               
    22212221    G2frame.dataDisplay.SetTable(G2frame.IndexPeaksTable, True)
    22222222    XY = []
     
    29062906                    hkl.insert(4,G2lat.Dsp2pos(Inst,hkl[3])+controls[1])
    29072907            table.append(row)
    2908         UnitCellsTable = G2gd.Table(table,rowLabels=rowLabels,colLabels=colLabels,types=Types)
    2909         gridDisplay = G2gd.GSGrid(G2frame.dataDisplay)
     2908        UnitCellsTable = G2G.Table(table,rowLabels=rowLabels,colLabels=colLabels,types=Types)
     2909        gridDisplay = G2G.GSGrid(G2frame.dataDisplay)
    29102910        gridDisplay.SetTable(UnitCellsTable, True)
    29112911        G2frame.dataFrame.CopyCell.Enable(True)
     
    29832983       
    29842984    def MakeReflectionTable(phaseName):
    2985         '''Returns a wx.grid table (G2gd.Table) containing a list of all reflections
     2985        '''Returns a wx.grid table (G2G.Table) containing a list of all reflections
    29862986        for a phase.       
    29872987        '''
     
    30373037            if Super:
    30383038                colLabels.insert(3,'M')
    3039         return G2gd.Table(refs,rowLabels=rowLabels,colLabels=colLabels,types=Types)
     3039        return G2G.Table(refs,rowLabels=rowLabels,colLabels=colLabels,types=Types)
    30403040
    30413041    def ShowReflTable(phaseName):
     
    31433143        G2frame.dataFrame.SelectPhase.Enable(False)
    31443144           
    3145     G2frame.dataDisplay = G2gd.GSNoteBook(parent=G2frame.dataFrame,size=G2frame.dataFrame.GetClientSize())
     3145    G2frame.dataDisplay = G2G.GSNoteBook(parent=G2frame.dataFrame,size=G2frame.dataFrame.GetClientSize())
    31463146    G2frame.refTable = {}
    31473147    for tabnum,phase in enumerate(phases):
    3148         G2frame.refTable[phase] = G2gd.GSGrid(parent=G2frame.dataDisplay)
     3148        G2frame.refTable[phase] = G2G.GSGrid(parent=G2frame.dataDisplay)
    31493149        G2frame.dataDisplay.AddPage(G2frame.refTable[phase],phase)
    31503150    if phaseName not in G2frame.refTable:
     
    33653365            0,WACV)
    33663366        for name in data['Substances']:
    3367             G2gd.HorizontalLine(substSizer,G2frame.dataDisplay)   
     3367            G2G.HorizontalLine(substSizer,G2frame.dataDisplay)   
    33683368            substSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Data for '+name+':'),
    33693369                0,WACV)
     
    40304030        partSizer.Add(topSizer,0,)
    40314031        for ilev,level in enumerate(data['Particle']['Levels']):
    4032             G2gd.HorizontalLine(partSizer,G2frame.dataDisplay)
     4032            G2G.HorizontalLine(partSizer,G2frame.dataDisplay)
    40334033            topLevel = wx.BoxSizer(wx.HORIZONTAL)
    40344034            topLevel.Add(wx.StaticText(G2frame.dataDisplay,label=' Model component %d: '%(ilev)),0,WACV)
     
    41174117    topSizer.Add(esdScale,0,WACV)
    41184118    mainSizer.Add(topSizer)
    4119     G2gd.HorizontalLine(mainSizer,G2frame.dataDisplay)
     4119    G2G.HorizontalLine(mainSizer,G2frame.dataDisplay)
    41204120    if 'Size' in data['Current']:
    41214121        if 'MaxEnt' in data['Size']['Method']:
     
    41264126    elif 'Particle' in data['Current']:
    41274127        mainSizer.Add(PartSizer(),1,wx.ALIGN_LEFT|wx.EXPAND)
    4128     G2gd.HorizontalLine(mainSizer,G2frame.dataDisplay)   
     4128    G2G.HorizontalLine(mainSizer,G2frame.dataDisplay)   
    41294129    backSizer = wx.BoxSizer(wx.HORIZONTAL)
    41304130    backSizer.Add(wx.StaticText(G2frame.dataDisplay,label=' Background:'),0,WACV)
Note: See TracChangeset for help on using the changeset viewer.