mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-04-24 00:49:28 -04:00
This PR fixes: -several explicit uses of `new` that were not matched by `delete` -dangling `CalendarTimeItem`s -reset of focus on the `allDayEventCheckBox` check/uncheck -exiting the app form `allEventsWindow` on `KEY_RF`
32 lines
945 B
C++
32 lines
945 B
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
#include "CheckBoxWithLabelItem.hpp"
|
|
#include <widgets/DateWidget.hpp>
|
|
|
|
namespace gui
|
|
{
|
|
class NewEventCheckBoxWithLabel : public CheckBoxWithLabelItem
|
|
{
|
|
using OnCheckCallback = std::function<void(bool)>;
|
|
OnCheckCallback onCheck = nullptr;
|
|
app::Application *app = nullptr;
|
|
gui::DateWidget *dateItem = nullptr;
|
|
void applyCallbacks() override;
|
|
|
|
public:
|
|
NewEventCheckBoxWithLabel(app::Application *application,
|
|
const std::string &description,
|
|
OnCheckCallback onCheck);
|
|
|
|
void setConnectionToDateItem(gui::DateWidget *item);
|
|
};
|
|
|
|
namespace allDayEvents
|
|
{
|
|
bool isAllDayEvent(TimePoint start, TimePoint end);
|
|
}
|
|
|
|
} /* namespace gui */
|