~aleteoryx/muditaos

ref: b16523e32502757ec6ae11ff7716f639de921a54 muditaos/module-apps/application-calendar/widgets/CalendarTimeItem.hpp -rw-r--r-- 1.0 KiB
b16523e3 — Michał Kamoń [EGD-6222] Fix the App Calendar memory leaks 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
// 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 <module-apps/widgets/TimeWidget.hpp>

namespace gui
{
    class VBox;
    class CalendarTimeItem : public CalendarListItem
    {
      public:
        CalendarTimeItem(const std::string &description,
                         TimeWidget::Type type,
                         const std::function<void(const UTF8 &text)> &bottomBarTemporaryMode,
                         const std::function<void()> &bottomBarRestoreFromTemporaryMode,
                         TimePoint dateFrom,
                         TimePoint dateTill);

        void setConnectionToSecondItem(CalendarTimeItem *item);
        void setConnectionToDateItem(CalendarDateItem *item);
        auto getFromTillDate() const -> std::shared_ptr<utils::time::FromTillDate>;

      private:
        TimeWidget *timeWidget = nullptr;
        VBox *vBox             = nullptr;
    };
} /* namespace gui */