本文整理汇总了Python中category.Category.categorizableAddedEventType方法的典型用法代码示例。如果您正苦于以下问题:Python Category.categorizableAddedEventType方法的具体用法?Python Category.categorizableAddedEventType怎么用?Python Category.categorizableAddedEventType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类category.Category
的用法示例。
在下文中一共展示了Category.categorizableAddedEventType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from category import Category [as 别名]
# 或者: from category.Category import categorizableAddedEventType [as 别名]
def __init__(self, *args, **kwargs):
self.__categories = kwargs.pop('categories')
self.__filterOnlyWhenAllCategoriesMatch = \
kwargs.pop('filterOnlyWhenAllCategoriesMatch', False)
for eventType in (self.__categories.addItemEventType(),
self.__categories.removeItemEventType()):
patterns.Publisher().registerObserver(self.onCategoryChanged,
eventType=eventType,
eventSource=self.__categories)
eventTypes = (Category.categorizableAddedEventType(),
Category.categorizableRemovedEventType(),
Category.filterChangedEventType())
for eventType in eventTypes:
patterns.Publisher().registerObserver(self.onCategoryChanged,
eventType=eventType)
pub.subscribe(self.onFilterMatchingChanged, 'settings.view.categoryfiltermatchall')
super(CategoryFilter, self).__init__(*args, **kwargs)