def __init__(self, component_id_combo, data_collection=None, data=None, visible=True, numeric=True, categorical=True, default_index=0): HubListener.__init__(self) self._visible = visible self._numeric = numeric self._categorical = categorical self._component_id_combo = component_id_combo if data is None: self._data = [] else: self._data = [data] self._data_collection = data_collection if data_collection is not None: if data_collection.hub is None: raise ValueError("Hub on data collection is not set") else: self.hub = data_collection.hub self.default_index = default_index if data is not None: self.refresh()
def __init__(self, session): HubListener.__init__(self) PropertySetMixin.__init__(self) self._session = session self._data = session.data_collection self._hub = None self._layer_artist_container = self._layer_artist_container_cls()
def __init__(self, data_collection, parent=None): QtCore.QAbstractItemModel.__init__(self, parent) HubListener.__init__(self) self.data_collection = data_collection self.root = DataCollectionItem(data_collection) self._items = {} # map hashes of Model pointers to model items # without this reference, PySide clobbers instance # data of model items self.register_to_hub(self.data_collection.hub)