<s> __author__ = '<STR_LIT>' <EOL> import wx <EOL> from odmtools . controller . olvSeriesSelector import EVT_OVL_CHECK_EVENT <EOL> from odmtools . controller import olvSeriesSelector <EOL> from odmtools . odmservices import ServiceManager <EOL> [ wxID_PNLSERIESSELECTOR , wxID_PNLSERIESSELECTORCBSITES , wxID_PNLSERIESSELECTORCBVARIABLES , <EOL> wxID_PNLSERIESSELECTORCHECKSITE , wxID_PNLSERIESSELECTORCHECKVARIABLE , wxID_PNLSERIESSELECTORLBLSITE , <EOL> wxID_PNLSERIESSELECTORLBLVARIABLE , wxID_PNLSERIESSELECTORtableSeries , wxID_PNLSERIESSELECTORPANEL1 , <EOL> wxID_PNLSERIESSELECTORPANEL2 , wxID_PNLSIMPLE , wxID_PNLRADIO , wxID_FRAME1RBADVANCED , wxID_FRAME1RBALL , <EOL> wxID_FRAME1RBSIMPLE , wxID_FRAME1SPLITTER , wxID_PNLSPLITTER , wxID_PNLSERIESSELECTORtableSeriesTest , ] = [ <EOL> wx . NewId ( ) for _init_ctrls in range ( <NUM_LIT> ) ] <EOL> class ClsSeriesSelector ( wx . Panel ) : <EOL> def __init__ ( self , parent , dbservice ) : <EOL> self . parent = parent <EOL> wx . Panel . __init__ ( self , name = u'<STR_LIT>' , parent = parent , <EOL> size = wx . Size ( <NUM_LIT> , <NUM_LIT> ) , style = wx . TAB_TRAVERSAL ) <EOL> self . _init_ctrls ( ) <EOL> self . series_service = dbservice <EOL> self . initTableSeries ( ) <EOL> self . initSVBoxes ( ) <EOL> self . initPubSub ( ) <EOL> self . service_manager = ServiceManager ( ) <EOL> self . export_service = self . service_manager . get_export_service ( ) <EOL> self . selectedIndex = <NUM_LIT:0> <EOL> self . isEditing = False <EOL> def _init_coll_boxSizer3_Items ( self , parent ) : <EOL> parent . AddWindow ( self . cpnlSimple , <NUM_LIT:0> , flag = wx . RIGHT | wx . LEFT | wx . EXPAND ) <EOL> parent . AddWindow ( self . tblSeries , <NUM_LIT:100> , flag = wx . EXPAND ) <EOL> def _init_coll_boxSizer1_Items ( self , parent ) : <EOL> parent . AddSizer ( self . pnlRadio , <NUM_LIT:0> , border = <NUM_LIT:7> , flag = wx . LEFT | wx . RIGHT | wx . TOP ) <EOL> parent . AddWindow ( self . pnlData , <NUM_LIT:100> , border = <NUM_LIT:3> , flag = wx . LEFT | wx . RIGHT | wx . EXPAND ) <EOL> def _init_coll_boxSizer4_Items ( self , parent ) : <EOL> parent . AddWindow ( self . checkSite , <NUM_LIT:0> , border = <NUM_LIT:3> , flag = wx . LEFT | wx . RIGHT ) <EOL> parent . AddWindow ( self . lblSite , <NUM_LIT:0> , border = <NUM_LIT:3> , flag = wx . LEFT | wx . RIGHT ) <EOL> parent . AddWindow ( self . cbSites , <NUM_LIT> , border = <NUM_LIT:3> , flag = wx . LEFT | wx . RIGHT | wx . EXPAND ) <EOL> def _init_coll_boxSizer2_Items ( self , parent ) : <EOL> parent . AddWindow ( self . checkVariable , <NUM_LIT:0> , border = <NUM_LIT:3> , flag = wx . LEFT | wx . RIGHT ) <EOL> parent . AddWindow ( self . lblVariable , <NUM_LIT:0> , border = <NUM_LIT:3> , flag = wx . LEFT | wx . RIGHT ) <EOL> parent . AddWindow ( self . cbVariables , <NUM_LIT> , border = <NUM_LIT:3> , flag = wx . LEFT | wx . RIGHT | wx . EXPAND ) <EOL> def _init_coll_boxSizer6_Items ( self , parent ) : <EOL> parent . AddWindow ( self . pnlSite , <NUM_LIT:50> , flag = wx . EXPAND ) <EOL> parent . AddWindow ( self . pnlVar , <NUM_LIT:50> , flag = wx . EXPAND ) <EOL> def _init_sizers ( self ) : <EOL> self . boxSizer1 = wx . BoxSizer ( orient = wx . VERTICAL ) <EOL> self . boxSizer2 = wx . BoxSizer ( orient = wx . HORIZONTAL ) <EOL> self . boxSizer3 = wx . BoxSizer ( orient = wx . VERTICAL ) <EOL> self . boxSizer4 = wx . BoxSizer ( orient = wx . HORIZONTAL ) <EOL> self . boxSizer6 = wx . BoxSizer ( orient = wx . VERTICAL ) <EOL> self . _init_coll_boxSizer1_Items ( self . boxSizer1 ) <EOL> self . _init_coll_boxSizer2_Items ( self . boxSizer2 ) <EOL> self . _init_coll_boxSizer3_Items ( self . boxSizer3 ) <EOL> self . _init_coll_boxSizer4_Items ( self . boxSizer4 ) <EOL> self . _init_coll_boxSizer6_Items ( self . boxSizer6 ) <EOL> self . SetSizer ( self . boxSizer1 ) <EOL> self . cpnlSimple . SetSizer ( self . boxSizer6 ) <EOL> self . pnlData . SetSizer ( self . boxSizer3 ) <EOL> def _init_ctrls ( self ) : <EOL> self . SetClientSize ( wx . Size ( <NUM_LIT> , <NUM_LIT> ) ) <EOL> self . Enable ( True ) <EOL> self . pnlRadio = wx . Panel ( id = wxID_PNLRADIO , name = '<STR_LIT>' , parent = self , pos = wx . Point ( <NUM_LIT:3> , <NUM_LIT:3> ) , <EOL> size = wx . Size ( <NUM_LIT> , <NUM_LIT:20> ) , style = wx . TAB_TRAVERSAL ) <EOL> self . rbAll = wx . RadioButton ( id = wxID_FRAME1RBALL , label = u'<STR_LIT>' , name = u'<STR_LIT>' , parent = self . pnlRadio , <EOL> pos = wx . Point ( <NUM_LIT:0> , <NUM_LIT:0> ) , size = wx . Size ( <NUM_LIT> , <NUM_LIT:20> ) , style = <NUM_LIT:0> ) <EOL> self . rbSimple = wx . RadioButton ( id = wxID_FRAME1RBSIMPLE , label = u'<STR_LIT>' , name = u'<STR_LIT>' , <EOL> parent = self . pnlRadio , pos = wx . Point ( <NUM_LIT> , <NUM_LIT:0> ) , size = wx . Size ( <NUM_LIT> , <NUM_LIT:20> ) , style = <NUM_LIT:0> ) <EOL> self . rbAdvanced = wx . RadioButton ( id = wxID_FRAME1RBADVANCED , label = u'<STR_LIT>' , name = u'<STR_LIT>' , <EOL> parent = self . pnlRadio , pos = wx . Point ( <NUM_LIT> , <NUM_LIT:0> ) , size = wx . Size ( <NUM_LIT> , <NUM_LIT:20> ) , style = <NUM_LIT:0> ) <EOL> self . rbAll . SetValue ( True ) <EOL> self . rbAdvanced . Enable ( False ) <EOL> self . pnlData = wx . Panel ( id = wxID_PNLSPLITTER , name = '<STR_LIT>' , parent = self , pos = wx . Point ( <NUM_LIT:0> , - <NUM_LIT:10> ) , <EOL> size = wx . Size ( <NUM_LIT> , <NUM_LIT> ) , style = wx . TAB_TRAVERSAL ) <EOL> self . cpnlSimple = wx . CollapsiblePane ( self . pnlData , label = "<STR_LIT>" , style = wx . CP_DEFAULT_STYLE | wx . CP_NO_TLW_RESIZE ) <EOL> self . pnlSite = wx . Panel ( id = wxID_PNLSERIESSELECTORPANEL1 , name = '<STR_LIT>' , parent = self . cpnlSimple . GetPane ( ) , <EOL> pos = wx . Point ( <NUM_LIT:3> , <NUM_LIT:0> ) , size = wx . Size ( <NUM_LIT> , <NUM_LIT> ) , style = wx . TAB_TRAVERSAL ) <EOL> self . cbSites = wx . ComboBox ( choices = [ ] , id = wxID_PNLSERIESSELECTORCBSITES , name = u'<STR_LIT>' , parent = self . pnlSite , <EOL> pos = wx . Point ( <NUM_LIT:100> , <NUM_LIT:0> ) , size = wx . Size ( <NUM_LIT> , <NUM_LIT> ) , style = wx . CB_READONLY , value = u'<STR_LIT>' ) <EOL> self . checkSite = wx . CheckBox ( id = wxID_PNLSERIESSELECTORCHECKSITE , label = u'<STR_LIT>' , name = u'<STR_LIT>' , <EOL> parent = self . pnlSite , pos = wx . Point ( <NUM_LIT:3> , <NUM_LIT:0> ) , size = wx . Size ( <NUM_LIT> , <NUM_LIT> ) , style = <NUM_LIT:0> ) <EOL> self . lblSite = wx . StaticText ( id = wxID_PNLSERIESSELECTORLBLSITE , label = u'<STR_LIT>' , name = u'<STR_LIT>' , <EOL> parent = self . pnlSite , pos = wx . Point ( <NUM_LIT:30> , <NUM_LIT:0> ) , size = wx . Size ( <NUM_LIT> , <NUM_LIT> ) , style = <NUM_LIT:0> ) <EOL> self . lblSite . SetToolTipString ( u'<STR_LIT>' ) <EOL> self . cbSites . SetLabel ( u'<STR_LIT>' ) <EOL> self . pnlVar = wx . Panel ( id = wxID_PNLSERIESSELECTORPANEL2 , name = '<STR_LIT>' , parent = self . cpnlSimple . GetPane ( ) , <EOL> pos = wx . Point ( <NUM_LIT:3> , <NUM_LIT> ) , size = wx . Size ( <NUM_LIT> , <NUM_LIT> ) , style = wx . TAB_TRAVERSAL ) <EOL> self . lblVariable = wx . StaticText ( id = wxID_PNLSERIESSELECTORLBLVARIABLE , label = u'<STR_LIT>' , name = u'<STR_LIT>' , <EOL> parent = self . pnlVar , pos = wx . Point ( <NUM_LIT:30> , <NUM_LIT:0> ) , size = wx . Size ( <NUM_LIT> , <NUM_LIT> ) , style = <NUM_LIT:0> ) <EOL> self . checkVariable = wx . CheckBox ( id = wxID_PNLSERIESSELECTORCHECKVARIABLE , label = u'<STR_LIT>' , name = u'<STR_LIT>' , <EOL> parent = self . pnlVar , pos = wx . Point ( <NUM_LIT:3> , <NUM_LIT:0> ) , size = wx . Size ( <NUM_LIT> , <NUM_LIT> ) , style = <NUM_LIT:0> ) <EOL> self . cbVariables = wx . ComboBox ( choices = [ ] , id = wxID_PNLSERIESSELECTORCBVARIABLES , name = u'<STR_LIT>' , <EOL> parent = self . pnlVar , pos = wx . Point ( <NUM_LIT:100> , <NUM_LIT:0> ) , size = wx . Size ( <NUM_LIT> , <NUM_LIT> ) , style = wx . CB_READONLY , <EOL> value = '<STR_LIT>' ) <EOL> self . cbVariables . SetLabel ( u'<STR_LIT>' ) <EOL> self . cbVariables . Enable ( False ) <EOL> self . rbAll . Bind ( wx . EVT_RADIOBUTTON , self . onRbAllRadiobutton , id = wxID_FRAME1RBALL ) <EOL> self . rbSimple . Bind ( wx . EVT_RADIOBUTTON , self . onRbSimpleRadiobutton , id = wxID_FRAME1RBSIMPLE ) <EOL> self . rbAdvanced . Bind ( wx . EVT_RADIOBUTTON , self . onRbAdvancedRadiobutton , id = wxID_FRAME1RBADVANCED ) <EOL> self . Bind ( wx . EVT_COLLAPSIBLEPANE_CHANGED , self . onPaneChanged , self . cpnlSimple ) <EOL> self . checkSite . Bind ( wx . EVT_CHECKBOX , self . onCheck , id = wxID_PNLSERIESSELECTORCHECKSITE ) <EOL> self . checkVariable . Bind ( wx . EVT_CHECKBOX , self . onCheck , id = wxID_PNLSERIESSELECTORCHECKVARIABLE ) <EOL> self . cbSites . Bind ( wx . EVT_COMBOBOX , self . onCbSitesCombobox , id = wxID_PNLSERIESSELECTORCBSITES ) <EOL> self . cbVariables . Bind ( wx . EVT_COMBOBOX , self . onCbVariablesCombobox , id = wxID_PNLSERIESSELECTORCBVARIABLES ) <EOL> self . tblSeries = olvSeriesSelector . clsSeriesTable ( id = wxID_PNLSERIESSELECTORtableSeries , parent = self . pnlData , <EOL> name = u'<STR_LIT>' , size = wx . Size ( <NUM_LIT> , <NUM_LIT> ) , pos = wx . Point ( <NUM_LIT:5> , <NUM_LIT:5> ) , <EOL> style = wx . LC_REPORT | wx . LC_SINGLE_SEL | wx . LC_VIRTUAL ) <EOL> self . tblSeries . SetEmptyListMsg ( "<STR_LIT>" ) <EOL> self . tblSeries . Bind ( EVT_OVL_CHECK_EVENT , self . onReadyToPlot ) <EOL> self . tblSeries . Bind ( wx . EVT_LIST_ITEM_FOCUSED , self . getSelectedObject ) <EOL> self . tblSeries . Bind ( wx . EVT_LIST_ITEM_RIGHT_CLICK , self . OnTableRightDown , <EOL> id = wxID_PNLSERIESSELECTORtableSeries ) <EOL> self . tblSeries . handleStandardKeys = True <EOL> self . tblSeries . useAlternateBackColors = True <EOL> self . tblSeries . oddRowsBackColor = wx . Colour ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) <EOL> self . cpnlSimple . Collapse ( True ) <EOL> self . _init_sizers ( ) <EOL> def onReadyToPlot ( self , event ) : <EOL> event . Skip ( ) <EOL> def onReadyToEdit ( self , event ) : <EOL> event . Skip ( ) <EOL> def stopEdit ( self ) : <EOL> pass <EOL> def getSelectedObject ( self , event ) : <EOL> event . Skip ( ) <EOL> def resetDB ( self , dbservice ) : <EOL> pass <EOL> def initTableSeries ( self ) : <EOL> pass <EOL> def refreshTableSeries ( self , db ) : <EOL> pass <EOL> def refreshSeries ( self ) : <EOL> pass <EOL> def initSVBoxes ( self ) : <EOL> pass <EOL> def initPubSub ( self ) : <EOL> pass <EOL> def OnTableRightDown ( self , event ) : <EOL> event . Skip ( ) <EOL> def onPaneChanged ( self , event = None ) : <EOL> pass <EOL> def onRbAdvancedRadiobutton ( self , event ) : <EOL> event . Skip ( ) <EOL> def onRbAllRadiobutton ( self , event ) : <EOL> event . Skip ( ) <EOL> def onRbSimpleRadiobutton ( self , event ) : <EOL> event . Skip ( ) <EOL> def onRightPlot ( self , event ) : <EOL> event . Skip ( ) <EOL> def onRightEdit ( self , event ) : <EOL> event . Skip ( ) <EOL> def onRightRefresh ( self , event ) : <EOL> event . Skip ( ) <EOL> def onRightClearSelected ( self , event ) : <EOL> event . Skip ( ) <EOL> def onRightExData ( self , event ) : <EOL> event . Skip ( ) <EOL> def onRightExMeta ( self , event ) : <EOL> event . Skip ( ) <EOL> def onCbSitesCombobox ( self , event ) : <EOL> event . Skip ( ) <EOL> def onCbVariablesCombobox ( self , event ) : <EOL> event . Skip ( ) <EOL> def siteAndVariables ( self ) : <EOL> pass <EOL> def siteOnly ( self ) : <EOL> pass <EOL> def variableOnly ( self ) : <EOL> pass <EOL> def onCheck ( self , event ) : <EOL> event . Skip ( ) <EOL> def setFilter ( self , site_code = '<STR_LIT>' , var_code = '<STR_LIT>' , advfilter = '<STR_LIT>' ) : <EOL> pass <EOL> def isEditing ( self ) : <EOL> return self . isEditing <EOL> def _rowFormatter ( self , listItem , object ) : <EOL> pass </s>
