~aleteoryx/muditaos

ref: 88a9fdedf22428cbfe52f91c8352eae52438e7f1 muditaos/module-apps/application-calendar/widgets/NewEventCheckBoxWithLabel.hpp -rw-r--r-- 945 bytes
88a9fded — Kuba [EGD-6883] Change time settings cleanup 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// 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 */