~aleteoryx/muditaos

ref: b7bc7cc89fc09f93240473b8aef047f349d2e8c0 muditaos/module-apps/application-calendar/widgets/DayEventsItem.hpp -rw-r--r-- 841 bytes
b7bc7cc8 — Marcin Smoczyński changelog: update for v0.42.1 (#820) 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
#pragma once
#include <Label.hpp>
#include <ListItem.hpp>
#include <module-db/Interface/EventsRecord.hpp>
#include <BoxLayout.hpp>
#include <module-gui/gui/widgets/Image.hpp>
#include <Image.hpp>

namespace gui

{
    class DayEventsItem : public ListItem
    {
        gui::VBox *vBox         = nullptr;
        gui::HBox *hBox         = nullptr;
        gui::Label *title       = nullptr;
        gui::Label *description = nullptr;
        gui::Image *clock       = nullptr;

      public:
        std::shared_ptr<EventsRecord> record;
        DayEventsItem();
        virtual ~DayEventsItem() override = default;

        // virtual methods from Item
        void setEvent(std::shared_ptr<EventsRecord> record);
        bool onDimensionChanged(const BoundingBox &oldDim, const BoundingBox &newDim) override;
    };

} /* namespace gui */