Experimental -- need to test if this has worsened performance... automation frames and macros are now handled using objects to represent them. the idea being that this will ultimately lead to being able to add new recording streams easily

This commit is contained in:
Tristan Rowley
2020-02-11 23:15:26 +00:00
parent 0cad4d746e
commit f44d83ba7e
5 changed files with 324 additions and 221 deletions

View File

@@ -3,6 +3,7 @@ import os
import pkgutil
import re
from plugins.frame_manager import FrameManager, Frame
class Plugin(object):
"""Base class that each plugin must inherit from. within this class
@@ -210,16 +211,16 @@ class DisplayPlugin(Plugin):
def __init__(self, plugin_collection):
super().__init__(plugin_collection)
def is_handled(self, name):
def is_handled(self, name):
raise NotImplementedError
def get_display_modes(self):
def get_display_modes(self):
raise NotImplementedError
def show_plugin(self, display):
from tkinter import Text, END
#display_text.insert(END, 'test from DisplayPlugin')
display.display_text.insert(END, '{} \n'.format(display.body_title))
def show_plugin(self, display):
from tkinter import Text, END
#display_text.insert(END, 'test from DisplayPlugin')
display.display_text.insert(END, '{} \n'.format(display.body_title))
# adapted from https://github.com/gdiepen/python_plugin_example
@@ -251,6 +252,8 @@ class PluginCollection(object):
#self.actions = message_handler.actions
self.reload_plugins()
self.fm = FrameManager(self)
def read_json(self, file_name):
return self.data._read_plugin_json(file_name)
def update_json(self, file_name, data):