'Set the registry model.'

def setModel(self, model):

    if (self.__model is not None):
        self.__model.itemChanged.disconnect(self.__on_itemChanged)
        self.__model.rowsInserted.disconnect(self.__on_rowsInserted)
        self.__model.rowsRemoved.disconnect(self.__on_rowsRemoved)
        self.clear()
    self.__model = model
    if (self.__model is not None):
        self.__model.itemChanged.connect(self.__on_itemChanged)
        self.__model.rowsInserted.connect(self.__on_rowsInserted)
        self.__model.rowsRemoved.connect(self.__on_rowsRemoved)
        self.__initFromModel(model)
