~aleteoryx/muditaos

ref: 8f0797218f2defa9266704a93cfff94322a38f51 muditaos/module-apps/application-calendar/widgets/CheckBoxWithLabelItem.hpp -rw-r--r-- 1.1 KiB
8f079721 — Mateusz Grzegorzek [EGD-5312] Add Time selection window 5 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
32
33
34
35
36
// 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 "CalendarListItem.hpp"
#include "Application.hpp"
#include "module-apps/application-calendar/data/CalendarData.hpp"
#include <Label.hpp>
#include <Image.hpp>
#include <BoxLayout.hpp>
#include <BottomBar.hpp>
#include <CheckBox.hpp>

namespace gui
{
    class CheckBoxWithLabelItem : public CalendarListItem
    {
        gui::HBox *hBox           = nullptr;
        app::Application *app     = nullptr;
        std::shared_ptr<WeekDaysRepeatData> checkBoxData = nullptr;

        virtual void applyCallbacks();
        void setCheckBoxes();

      public:
        CheckBoxWithLabelItem(app::Application *application,
                              const std::string &description,
                              std::shared_ptr<WeekDaysRepeatData> data = nullptr);
        virtual ~CheckBoxWithLabelItem() override = default;

        gui::Label *descriptionLabel = nullptr;
        gui::CheckBox *checkBox      = nullptr;
    };

} /* namespace gui */