Esempio n. 1
0
 def __init__(self, parent, recordlist, *args, **kwargs):
     wx.combo.ComboCtrl.__init__(self, parent, style=wx.CB_READONLY)                
     eventemitter.__init__ (self,  [ "current_record_changed", "keyboard_command" ] )
     self.recordlist = recordlist
     self.popup_ctrl = RecordsComboPopup( **kwargs )
     self.SetPopupControl ( self.popup_ctrl )
     self.popup_ctrl.Records = self.recordlist
     self.set_null()
     self.popup_ctrl.Bind (wx.EVT_LISTBOX, self.item_selected) 
     self.Bind (wx.EVT_KEY_UP, self.key_pressed )     
     
     self.search_function = self.regex_search
 def __init__(self, table, _filter="TRUE", select=['0'], order="objectid", **kkw):
     list.__init__(self)
     eventemitter.__init__(self, [ "record_list_reloaded", 
                                   "record_list_item_reloaded",
                                   "record_list_changed"] )
     self.table = table
     self.filter = _filter
     self.select = select
     self.order = order
     self.recordclass = kkw.get ("recordclass", None)
     self.filterfunc = kkw.get("filterfunc", lambda r: True)
     self.hash_id = {}
     self.hash_index = {}
Esempio n. 3
0
    def __init__(self, parent, recordlist, *args, **kwargs):
        wx.combo.ComboCtrl.__init__(self, parent, style=wx.CB_READONLY)
        eventemitter.__init__(self,
                              ["current_record_changed", "keyboard_command"])
        self.recordlist = recordlist
        self.popup_ctrl = RecordsComboPopup(**kwargs)
        self.SetPopupControl(self.popup_ctrl)
        self.popup_ctrl.Records = self.recordlist
        self.set_null()
        self.popup_ctrl.Bind(wx.EVT_LISTBOX, self.item_selected)
        self.Bind(wx.EVT_KEY_UP, self.key_pressed)

        self.search_function = self.regex_search
 def __init__(self, masterlist, predicate = lambda x: False):
     eventemitter.__init__(self, [ "record_list_reloaded", 
                                   "record_list_item_reloaded",
                                   "record_list_changed"] )
     self.master = masterlist
     self._predicate = None
     self.predicate = predicate
     self.cache = None
     self.ids_in_cache = None
     self.hash_index = None        
     self.hash_id = None
     
     self.reload_hook = self.master.listenForEvent ( "record_list_reloaded", self.master_reloaded )
     self.change_hook = self.master.listenForEvent ( "record_list_changed", self.master_changed )
     self.item_reload_hook = self.master.listenForEvent ( "record_list_item_reloaded", self.master_item_reloaded )
    def __init__(self, masterlist, predicate=lambda x: False):
        eventemitter.__init__(self, [
            "record_list_reloaded", "record_list_item_reloaded",
            "record_list_changed"
        ])
        self.master = masterlist
        self._predicate = None
        self.predicate = predicate
        self.cache = None
        self.ids_in_cache = None
        self.hash_index = None
        self.hash_id = None

        self.reload_hook = self.master.listenForEvent("record_list_reloaded",
                                                      self.master_reloaded)
        self.change_hook = self.master.listenForEvent("record_list_changed",
                                                      self.master_changed)
        self.item_reload_hook = self.master.listenForEvent(
            "record_list_item_reloaded", self.master_item_reloaded)
 def __init__(self,
              table,
              _filter="TRUE",
              select=['0'],
              order="objectid",
              **kkw):
     list.__init__(self)
     eventemitter.__init__(self, [
         "record_list_reloaded", "record_list_item_reloaded",
         "record_list_changed"
     ])
     self.table = table
     self.filter = _filter
     self.select = select
     self.order = order
     self.recordclass = kkw.get("recordclass", None)
     self.filterfunc = kkw.get("filterfunc", lambda r: True)
     self.hash_id = {}
     self.hash_index = {}
    def __init__(self, *args, **kwargs):
        """
        BaseNavigator ( 
   keywords: records : IRecordList (required), 
             oidname : str = 'objectid',
             displayname : str = '_astxt',
             current_index : int = None,             
         )           
        """
        eventemitter.__init__(self, ["navigate"])

        self.index_id_hash = {}
        self.oidname = kwargs.get("oidname", "objectid")
        self.displayname = kwargs.get("displayname", "_astxt")
        self.current_index = kwargs.get("current_index", None)
        self.records_count = 0
        self.__records = None
        self.records = kwargs.get("records", [])

        self.searchengine = kwargs.get("searchengine", None)

        self.previous_index = None
        self.new_record = False
    def __init__(self, *args, **kwargs):
        """
        BaseNavigator ( 
   keywords: records : IRecordList (required), 
             oidname : str = 'objectid',
             displayname : str = '_astxt',
             current_index : int = None,             
         )           
        """
        eventemitter.__init__ (self, [ "navigate" ] )
        
        self.index_id_hash = {}        
        self.oidname = kwargs.get ( "oidname", "objectid" )
        self.displayname = kwargs.get ( "displayname", "_astxt" )
        self.current_index = kwargs.get ( "current_index", None )
        self.records_count = 0
        self.__records = None
        self.records =  kwargs.get ( "records", [] )

        self.searchengine = kwargs.get ( "searchengine", None )        
        
        self.previous_index = None
        self.new_record = False