Implemented DayView design canvas and options

This commit is contained in:
Maximilian Giller 2019-03-17 12:12:58 +01:00
parent 5f3ef1091b
commit c99bb1538b
3 changed files with 34 additions and 2 deletions

30
Calendar/DayViewPanel.py Normal file
View file

@ -0,0 +1,30 @@
from PanelDesign import PanelDesign
from datetime import datetime, timedelta, date
class DayViewPanel (PanelDesign):
"""Overview that focuses on the current day and
shows a timeline split into hours."""
def __init__ (self, size):
super(DayViewPanel, self).__init__(size)
self.__first_render__()
def __first_render__ (self):
pass
def add_weather (self, weather):
pass
def add_calendar (self, calendar):
pass
def add_rssfeed (self, rss):
pass
def add_taks (self, tasks):
pass
def __finish_image__(self):
pass
def __abs_co__(self, coordinates):
return (int(coordinates[0] * self.size[0]),int(coordinates[1] * self.size[1]))

View file

@ -16,6 +16,7 @@ from DebugConsole import DebugConsole
from settings import * from settings import *
from MonthOvPanel import MonthOvPanel from MonthOvPanel import MonthOvPanel
from DayListPanel import DayListPanel from DayListPanel import DayListPanel
from DayViewPanel import DayViewPanel
import OwmForecasts import OwmForecasts
import IcalEvents import IcalEvents
import RssParserPosts import RssParserPosts
@ -41,7 +42,8 @@ if render_to_display:
available_panels = { available_panels = {
"day-list" : DayListPanel, "day-list" : DayListPanel,
"month-overview" : MonthOvPanel "month-overview" : MonthOvPanel,
"day-view" : DayViewPanel
} }
loop_timer = LoopTimer(update_interval, run_on_hour=True) loop_timer = LoopTimer(update_interval, run_on_hour=True)

View file

@ -24,7 +24,7 @@ update_interval = "60"
"""DESIGN""" """DESIGN"""
font_boldness = "semibold" # extralight, light, regular, semibold, bold, extrabold font_boldness = "semibold" # extralight, light, regular, semibold, bold, extrabold
choosen_design = "month-overview" # month-overview, day-list choosen_design = "month-overview" # month-overview, day-list, day-view
general_settings = { # General settings that designs may use general_settings = { # General settings that designs may use
"info-area" : "rss", # empty, events, rss "info-area" : "rss", # empty, events, rss
"highlight-event-days" : True "highlight-event-days" : True