From 65b4e9ad0f50feecdd3330be09cc95d44485d9e6 Mon Sep 17 00:00:00 2001 From: Tomas Rogala Date: Fri, 14 Aug 2020 10:24:48 +0200 Subject: [PATCH] [EGD-3469] PR changes --- art/phone/common/dots/event_dot.png | Bin 0 -> 1435 bytes changelog.md | 5 + image/assets/images/event_dot.vpi | Bin 0 -> 67 bytes image/assets/lang/lang_en.json | 3 + .../ApplicationCalendar.cpp | 94 ++++- .../ApplicationCalendar.hpp | 10 +- .../application-calendar/CMakeLists.txt | 16 +- .../data/CalendarData.cpp | 32 ++ .../data/CalendarData.hpp | 98 +++++ .../data/OptionParser.hpp | 52 +++ .../data/TimeDisplayParser.hpp | 89 ++++ .../application-calendar/data/dateCommon.hpp | 166 ++++++++ .../models/AllEventsModel.cpp | 37 +- .../models/AllEventsModel.hpp | 12 +- .../models/CalendarEventsModel.cpp | 57 --- .../models/CustomRepeatModel.cpp | 26 +- .../models/CustomRepeatModel.hpp | 10 +- .../models/DayEventsInternalModel.cpp | 61 +++ .../models/DayEventsInternalModel.hpp | 22 + .../models/DayEventsModel.cpp | 54 --- .../models/DayEventsModel.hpp | 28 -- .../models/EventDetailModel.cpp | 9 +- .../models/EventDetailModel.hpp | 3 +- .../models/MonthModel.cpp | 25 +- .../models/MonthModel.hpp | 3 + .../models/NewEditEventModel.cpp | 97 ++++- .../models/NewEditEventModel.hpp | 9 +- .../widgets/AllEventsItem.cpp | 22 +- .../widgets/AllEventsItem.hpp | 3 + .../widgets/CalendarListItem.hpp | 5 +- .../widgets/CalendarStyle.hpp | 72 ++-- .../widgets/CheckBoxWithLabelAndModel.cpp | 54 --- .../widgets/CheckBoxWithLabelItem.cpp | 46 +- .../widgets/CheckBoxWithLabelItem.hpp | 6 +- .../widgets/DayEventsItem.cpp | 27 +- .../widgets/DayEventsItem.hpp | 4 +- .../application-calendar/widgets/DayLabel.cpp | 116 +++++ .../application-calendar/widgets/DayLabel.hpp | 28 ++ .../widgets/EventDetailDescriptionItem.cpp | 24 +- .../widgets/EventTimeItem.cpp | 263 +++++++++++- .../widgets/EventTimeItem.hpp | 15 +- .../application-calendar/widgets/MonthBox.cpp | 80 ++++ .../application-calendar/widgets/MonthBox.hpp | 26 ++ .../widgets/NewEventCheckBoxWithLabel.cpp | 75 ++++ ...odel.hpp => NewEventCheckBoxWithLabel.hpp} | 6 +- .../widgets/RepeatAndReminderItem.cpp | 20 +- .../widgets/RepeatAndReminderItem.hpp | 5 +- .../widgets/SeveralOptionsItem.cpp | 68 ++- .../widgets/SeveralOptionsItem.hpp | 16 + .../widgets/TextWithLabelItem.cpp | 14 +- .../windows/AllEventsWindow.cpp | 53 ++- .../windows/AllEventsWindow.hpp | 3 + .../windows/CalendarEventsOptionsWindow.cpp | 35 +- .../windows/CalendarEventsOptionsWindow.hpp | 6 + .../windows/CalendarMainWindow.cpp | 205 ++++----- .../windows/CalendarMainWindow.hpp | 43 +- .../windows/CustomRepeatWindow.cpp | 52 ++- .../windows/CustomRepeatWindow.hpp | 6 + .../windows/DayEventsWindow.cpp | 82 ++-- .../windows/DayEventsWindow.hpp | 12 +- .../windows/EventDetailWindow.cpp | 31 +- .../windows/EventDetailWindow.hpp | 4 + .../windows/NewEditEventWindow.cpp | 38 +- .../windows/NewEditEventWindow.hpp | 5 +- .../windows/DesktopMainWindow.cpp | 1 - module-db/CMakeLists.txt | 2 +- module-db/Interface/EventsRecord.cpp | 130 ++++-- module-db/Interface/EventsRecord.hpp | 29 +- module-db/Tables/EventsTable.cpp | 395 ++++++++++++++++-- module-db/Tables/EventsTable.hpp | 25 +- .../queries/calendar/QueryEventsEdit.cpp | 8 +- .../queries/calendar/QueryEventsEdit.hpp | 5 +- .../calendar/QueryEventsGetAllLimited.cpp | 32 ++ .../calendar/QueryEventsGetAllLimited.hpp | 32 ++ .../calendar/QueryEventsGetFiltered.cpp | 4 +- .../calendar/QueryEventsGetFiltered.hpp | 7 +- .../queries/calendar/QueryEventsRemove.cpp | 2 +- module-db/tests/EventsRecord_tests.cpp | 221 +++++----- module-db/tests/EventsTable_tests.cpp | 228 ++++++---- module-gui/gui/widgets/CheckBox.cpp | 2 +- module-utils/time/time_locale.hpp | 10 + 81 files changed, 2797 insertions(+), 924 deletions(-) create mode 100644 art/phone/common/dots/event_dot.png create mode 100644 image/assets/images/event_dot.vpi create mode 100644 module-apps/application-calendar/data/CalendarData.cpp create mode 100644 module-apps/application-calendar/data/CalendarData.hpp create mode 100644 module-apps/application-calendar/data/OptionParser.hpp create mode 100644 module-apps/application-calendar/data/TimeDisplayParser.hpp create mode 100644 module-apps/application-calendar/data/dateCommon.hpp delete mode 100644 module-apps/application-calendar/models/CalendarEventsModel.cpp create mode 100644 module-apps/application-calendar/models/DayEventsInternalModel.cpp create mode 100644 module-apps/application-calendar/models/DayEventsInternalModel.hpp delete mode 100644 module-apps/application-calendar/models/DayEventsModel.cpp delete mode 100644 module-apps/application-calendar/models/DayEventsModel.hpp delete mode 100644 module-apps/application-calendar/widgets/CheckBoxWithLabelAndModel.cpp create mode 100644 module-apps/application-calendar/widgets/DayLabel.cpp create mode 100644 module-apps/application-calendar/widgets/DayLabel.hpp create mode 100644 module-apps/application-calendar/widgets/MonthBox.cpp create mode 100644 module-apps/application-calendar/widgets/MonthBox.hpp create mode 100644 module-apps/application-calendar/widgets/NewEventCheckBoxWithLabel.cpp rename module-apps/application-calendar/widgets/{CheckBoxWithLabelAndModel.hpp => NewEventCheckBoxWithLabel.hpp} (72%) create mode 100644 module-db/queries/calendar/QueryEventsGetAllLimited.cpp create mode 100644 module-db/queries/calendar/QueryEventsGetAllLimited.hpp diff --git a/art/phone/common/dots/event_dot.png b/art/phone/common/dots/event_dot.png new file mode 100644 index 0000000000000000000000000000000000000000..ab05d046b778bd0b23cc5d9a250fe2a8eac7ac7a GIT binary patch literal 1435 zcmbVMPixdb6pw;ZE4?U)e=b7`TG1qvY`Qf=V`+D5yI^W*7p!=3HksWG-DF}i?QZwz zMG7i|ohSjc zqD;?p66&urfoiM~#;*G9^&1t1fveu0^stwdSTkJgrfjvlRQ0>-z7wc3*U@x`071kA zMV+V>XQbn*JzfHHxooJY2NCP8Ix7vLHE$V}c*;;w$C{6^g{BnKMfNR@)$`*TH_nSRl(D~geb{r<7^Nn2$<2KiDBwkO6mavKgT5-X{%>E z@D0{t5sO6zSTn~aO)hxWcO?cD~V=3bDz9Xzm1#?w-ZyI(q)2_n3 zSw&*nSFlAe?n6Bug!Qe%poIdU4?rPl0xIYq!GTZeJdG$w4kOxNMiMtvln0WOc#EfC z7`!X&U$2x(%PFsiE!fCb7Uoc8zEm`wVo|env*)hokxHBi8vCqLc2x+E9) zL8Ki7fo2!#b**OESgTE$xOUABCYha|FLQrGCc*H0@Q>$jr6Cj{ZT&ZoEKQj`WHHR( zUbhCtv&!xdW~~tQ5{6J;7J{q#G6Ptk4wl3JjzFKb-DE)eo4n}5GF}&LnzGpjMC&gy z&j9xgS+sp6#?K;qd;1D}2#2mAr+K@ApSI(nx2bZ6&ib>hOK?Q?fOeA)f_?Ay$#J;(d_M7Gb${8IVV+`R`s04>YC AJOBUy literal 0 HcmV?d00001 diff --git a/changelog.md b/changelog.md index 008986b45a8e5e4b9c974bfc97b73bc02db0e953..ca5b632749d3a332c2df40475402e3ca6370ef7f 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,11 @@ ### Added +* `[calendar]` Communication between windows. +* `[calendar]` Add/Edit/Remove events functionality. +* `[calendar]` Display events in day window and allEvents window. +* `[calendar]` Marking days witch contains events in Calendar Main Window. +* `[calendar]` Add repeated events. * `[desktop]` info on how to unlock * `[settings]` pin change option in settings main window * `[phonebook]` Make SAVE button appear when at least one field is fulfilled. diff --git a/image/assets/images/event_dot.vpi b/image/assets/images/event_dot.vpi new file mode 100644 index 0000000000000000000000000000000000000000..7cc2fb07842fc5c476e0e74c41d5ce0c9d69f83f GIT binary patch literal 67 lcmZQ&U}X?sW?*1o5@29p1k)fMBajE7L1L^>HcSjvJpdXX0KotN literal 0 HcmV?d00001 diff --git a/image/assets/lang/lang_en.json b/image/assets/lang/lang_en.json index 24c0b6b760a30474f6174763ce80646212fe7139..044ce3806523dbca85b5af4401bd0ab14e84ae74 100644 --- a/image/assets/lang/lang_en.json +++ b/image/assets/lang/lang_en.json @@ -58,6 +58,8 @@ "locale_24hour_min" : "%H:%M", "locale_date_full" : "%m/%d/%y", "locale_date_short" : "%d/%m", + "common_AM" : "AM", + "common_PM" : "PM", "duration_min_0sec" : "%M:%0S", "duration_0min_0sec" : "%0M:%0S", @@ -98,6 +100,7 @@ "app_calendar_edit": "EDIT", "app_calendar_new_edit_event_name": "Event name", "app_calendar_new_edit_event_allday": "All day event", + "app_calendar_all_day": "All day", "app_calendar_new_edit_event_start": "Start", "app_calendar_new_edit_event_end": "End", diff --git a/module-apps/application-calendar/ApplicationCalendar.cpp b/module-apps/application-calendar/ApplicationCalendar.cpp index 34ae30938ed027279b5aea46d43f95c18b7ef297..616bc525df8e7d0de404d7b02a2929256627013f 100644 --- a/module-apps/application-calendar/ApplicationCalendar.cpp +++ b/module-apps/application-calendar/ApplicationCalendar.cpp @@ -6,23 +6,35 @@ #include "windows/EventDetailWindow.hpp" #include "windows/NewEditEventWindow.hpp" #include "windows/CustomRepeatWindow.hpp" -#include "application-calendar/widgets/CalendarStyle.hpp" #include "NoEvents.hpp" #include "Dialog.hpp" #include