debug-viewer: initialize all features from tuples

Also add a first doc string about the plugin initialisation.
This commit is contained in:
Stefan Sauer 2016-09-28 21:19:29 +02:00
parent d783c9cf36
commit 9e4e2b5542
4 changed files with 8 additions and 3 deletions

View file

@ -62,4 +62,4 @@ class CategoryColorSentinel (object):
class Plugin (PluginBase):
features = [ColorizeLevels, ColorizeCategories]
features = (ColorizeLevels, ColorizeCategories)

View file

@ -491,4 +491,4 @@ class FindBarFeature (FeatureBase):
class Plugin (PluginBase):
features = [FindBarFeature]
features = (FindBarFeature,)

View file

@ -1101,7 +1101,7 @@ class TimelineState (Common.GUI.StateSection):
class Plugin (PluginBase):
features = [TimelineFeature]
features = (TimelineFeature,)
def __init__(self, app):

View file

@ -76,6 +76,11 @@ class FeatureBase (object):
class PluginBase (object):
"""
All plugins must implement a class called Plugin inheriting from PluginBase.
They should place a tuple of features they export into 'features'. Each
feature should be a subclass of FeatureBase.
"""
features = ()