E-Paper-Calendar/Calendar/PanelDesign.py

36 lines
1.2 KiB
Python
Raw Normal View History

from DesignEntity import DesignEntity
from TechnicalDataDesign import TechnicalDataDesign
from settings import print_technical_data
from datetime import datetime
2019-02-27 17:20:15 +01:00
class PanelDesign (DesignEntity):
"""Defined general interface for panel designs."""
def __init__ (self, size):
super(PanelDesign, self).__init__(size)
self.start_timestamp = datetime.now()
2019-02-27 17:20:15 +01:00
def add_weather (self, weather):
2019-05-19 22:25:59 +02:00
raise NotImplementedError("Function needs to be implemented")
2019-02-27 17:20:15 +01:00
def add_calendar (self, calendar):
2019-05-19 22:25:59 +02:00
raise NotImplementedError("Function needs to be implemented")
2019-02-27 17:20:15 +01:00
def add_rssfeed (self, rss):
2019-05-19 22:25:59 +02:00
raise NotImplementedError("Function needs to be implemented")
2019-03-03 16:39:47 +01:00
2019-05-19 22:25:59 +02:00
def add_tasks (self, tasks):
raise NotImplementedError("Function needs to be implemented")
def add_crypto (self, crypto):
raise NotImplementedError("Function needs to be implemented")
def __finish_panel__(self):
pass
def __finish_image__(self):
self.__finish_panel__()
if print_technical_data:
td = TechnicalDataDesign(self.size, self.start_timestamp, datetime.now())
td.mask = True
self.draw_design(td)