<s> import wx <EOL> import wx . xrc <EOL> import wx . combo <EOL> import wx . lib . masked <EOL> import wx . lib . agw . buttonpanel as BP <EOL> from odmtools . controller . olvAddPoint import OLVAddPoint , EVT_OVL_CHECK_EVENT <EOL> from odmtools . lib . ObjectListView import EVT_CELL_EDIT_STARTING , EVT_CELL_EDIT_FINISHING <EOL> from odmtools . common . icons . icons4addpoint import * <EOL> class AddPoints ( wx . Dialog ) : <EOL> def __init__ ( self , parent , ** kwargs ) : <EOL> wx . Dialog . __init__ ( self , parent , id = wx . ID_ANY , title = "<STR_LIT>" , <EOL> size = ( <NUM_LIT> , <NUM_LIT> ) , style = wx . DEFAULT_FRAME_STYLE | wx . TAB_TRAVERSAL ) <EOL> mainPanel = wx . Panel ( self , - <NUM_LIT:1> ) <EOL> vSizer = wx . BoxSizer ( wx . VERTICAL ) <EOL> mainPanel . SetSizer ( vSizer ) <EOL> self . olv = None <EOL> self . titleBar = None <EOL> self . selectedObject = None <EOL> self . buildButtonPanel ( mainPanel ) <EOL> self . initiateObjectListView ( mainPanel , ** kwargs ) <EOL> vSizer . Add ( self . titleBar , <NUM_LIT:0> , wx . EXPAND | wx . ALL ) <EOL> vSizer . Add ( self . olv , <NUM_LIT:1> , wx . EXPAND | wx . ALL , <NUM_LIT:5> ) <EOL> self . titleBar . DoLayout ( ) <EOL> vSizer . Layout ( ) <EOL> def buildButtonPanel ( self , mainPanel ) : <EOL> """<STR_LIT>""" <EOL> self . titleBar = BP . ButtonPanel ( mainPanel , - <NUM_LIT:1> , "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" , <EOL> alignment = BP . BP_ALIGN_LEFT ) <EOL> self . addRowBtn = BP . ButtonInfo ( self . titleBar , wx . NewId ( ) , plus_6_64 . GetBitmap ( ) , text = "<STR_LIT>" ) <EOL> self . deleteRowBtn = BP . ButtonInfo ( self . titleBar , wx . NewId ( ) , minus_6_64 . GetBitmap ( ) , text = "<STR_LIT>" ) <EOL> self . clearRowsBtn = BP . ButtonInfo ( self . titleBar , wx . NewId ( ) , delete_64 . GetBitmap ( ) , text = "<STR_LIT>" ) <EOL> self . csvUploadBtn = BP . ButtonInfo ( self . titleBar , wx . NewId ( ) , csv_64 . GetBitmap ( ) , text = "<STR_LIT>" ) <EOL> self . infoBtn = BP . ButtonInfo ( self . titleBar , wx . NewId ( ) , info_5_32 . GetBitmap ( ) , text = "<STR_LIT>" ) <EOL> self . finishedBtn = BP . ButtonInfo ( self . titleBar , wx . NewId ( ) , exit_64 . GetBitmap ( ) , text = "<STR_LIT>" ) <EOL> self . titleBar . AddButton ( self . addRowBtn ) <EOL> self . titleBar . AddButton ( self . deleteRowBtn ) <EOL> self . titleBar . AddButton ( self . clearRowsBtn ) <EOL> self . titleBar . AddButton ( self . csvUploadBtn ) <EOL> self . titleBar . AddButton ( self . infoBtn ) <EOL> self . titleBar . AddButton ( self . finishedBtn ) <EOL> self . Bind ( wx . EVT_BUTTON , self . onAddBtn , self . addRowBtn ) <EOL> self . Bind ( wx . EVT_BUTTON , self . onDeleteBtn , self . deleteRowBtn ) <EOL> self . Bind ( wx . EVT_BUTTON , self . onClearAllBtn , self . clearRowsBtn ) <EOL> self . Bind ( wx . EVT_BUTTON , self . onUploadBtn , self . csvUploadBtn ) <EOL> self . Bind ( wx . EVT_BUTTON , self . onInfoBtn , self . infoBtn ) <EOL> self . Bind ( wx . EVT_BUTTON , self . onFinishedBtn , self . finishedBtn ) <EOL> def initiateObjectListView ( self , mainPanel , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> self . olv = OLVAddPoint ( parent = mainPanel , id = wx . ID_ANY , style = wx . LC_REPORT , ** kwargs ) <EOL> self . olv . Bind ( EVT_CELL_EDIT_STARTING , self . onEdit ) <EOL> self . olv . Bind ( EVT_CELL_EDIT_FINISHING , self . onEditFinish ) <EOL> self . olv . Bind ( wx . EVT_LIST_COL_CLICK , self . onColClick ) <EOL> self . olv . Bind ( wx . EVT_LIST_ITEM_SELECTED , self . onSelected ) <EOL> self . olv . Bind ( EVT_OVL_CHECK_EVENT , self . onCheck ) <EOL> def onAddBtn ( self , event ) : <EOL> event . Skip ( ) <EOL> def onClearAllBtn ( self , event ) : <EOL> event . Skip ( ) <EOL> def onDeleteBtn ( self , event ) : <EOL> event . Skip ( ) <EOL> def onUploadBtn ( self , event ) : <EOL> event . Skip ( ) <EOL> def onFinishedBtn ( self , event ) : <EOL> event . Skip ( ) <EOL> def onInfoBtn ( self , event ) : <EOL> event . Skip ( ) <EOL> def onSelected ( self , event ) : <EOL> event . Skip ( ) <EOL> def onTooltip ( self , event ) : <EOL> event . Skip ( ) <EOL> def onChar ( self , event ) : <EOL> pass <EOL> def onCheck ( self , event ) : <EOL> event . Skip ( ) <EOL> def onEdit ( self , event ) : <EOL> if self . olv . cellEditor : <EOL> self . olv . FinishCellEdit ( ) <EOL> def onEditFinish ( self , event ) : <EOL> self . olv . RefreshItem ( event . subItemIndex ) <EOL> def onColClick ( self , event ) : <EOL> pass <EOL> def __del__ ( self ) : <EOL> pass </s>
