plugins/canfestival/canfestival.py
changeset 23 e007d9d466d7
parent 22 9a0c535c3272
child 24 585d5b387b6a
equal deleted inserted replaced
22:9a0c535c3272 23:e007d9d466d7
    25     </xsd:schema>
    25     </xsd:schema>
    26     """
    26     """
    27 
    27 
    28     def __init__(self):
    28     def __init__(self):
    29         manager = NodeManager()
    29         manager = NodeManager()
    30         NodeList.__init__(self, manager)
    30         # TODO change netname when name change
       
    31         NodeList.__init__(self, manager, self.BaseParams.getName())
    31         self.LoadProject(self.PlugPath())
    32         self.LoadProject(self.PlugPath())
    32 
    33 
    33     _View = None
    34     _View = None
    34     def _OpenView(self, logger):
    35     def _OpenView(self, logger):
    35         if not self._View:
    36         if not self._View:
    36             def _onclose():
    37             def _onclose():
    37                 self.View = None
    38                 self.View = None
    38             self._View = _NetworkEdit()
    39             self._View = _NetworkEdit(self.GetPlugRoot().AppFrame, self)
       
    40             # TODO redefine BusId when IEC channel change
       
    41             self._View.SetBusId(self.GetCurrentLocation())
    39             self._View._onclose = _onclose
    42             self._View._onclose = _onclose
    40         return self.View
    43             self._View.Show()
       
    44 
    41     PluginMethods = [("NetworkEdit",_OpenView)]
    45     PluginMethods = [("NetworkEdit",_OpenView)]
    42 
    46 
    43     def OnPlugClose(self):
    47     def OnPlugClose(self):
    44         if self._View:
    48         if self._View:
    45             self._View.Close()
    49             self._View.Close()
    86     </xsd:schema>
    90     </xsd:schema>
    87     """
    91     """
    88 
    92 
    89     PlugChildsTypes = [("CanOpenNode",_NodeListPlug)]
    93     PlugChildsTypes = [("CanOpenNode",_NodeListPlug)]
    90     
    94     
    91     def PlugGenerate_C(self, buildpath, current_location, locations):
    95     def PlugGenerate_C(self, buildpath, current_location, locations, logger):
    92         return [],""
    96         return [],""
    93 
    97 
    94 
    98