mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-04-23 16:40:22 -04:00
- add ChangeDateAndTimeWindow, - extract EventTimeItem to common widgets folder and rename it to TimeWidget, - extract EventDateItem to common widgets folder and rename it to DateWidget, - replace timeWidget with common TimeWidget in NightshiftWindow, - refactor time setting in DesktopMainWindow and TopBar, - Remove dead code from EventManager (GetNextAlarmTimestamp and HandleAlarmTrigger)
31 lines
1017 B
C++
31 lines
1017 B
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#include "CalendarDateItem.hpp"
|
|
#include <module-apps/widgets/DateAndTimeStyle.hpp>
|
|
#include <module-apps/widgets/DateWidget.hpp>
|
|
#include <module-apps/widgets/WidgetsUtils.hpp>
|
|
|
|
namespace date_and_time = style::window::date_and_time;
|
|
|
|
namespace gui
|
|
{
|
|
CalendarDateItem::CalendarDateItem()
|
|
{
|
|
setMinimumSize(style::window::default_body_width, date_and_time::height);
|
|
setEdges(RectangleEdge::None);
|
|
setMargins(Margins(date_and_time::leftMargin, date_and_time::topMargin, 0, 0));
|
|
|
|
vBox = new VBox(this, 0, 0, 0, 0);
|
|
vBox->setEdges(RectangleEdge::None);
|
|
|
|
dateWidget = new DateWidget(vBox);
|
|
|
|
onLoadCallback = [&](std::shared_ptr<EventsRecord> event) {
|
|
dateWidget->loadData(TimePointToYearMonthDay(event->date_from));
|
|
};
|
|
|
|
passDefaultCallbacksFromListItem(this, vBox);
|
|
}
|
|
} /* namespace gui */
|