~aleteoryx/muditaos

ref: 80768bf4a59e43bd9c2eb9ca4cd30562a7a4ee74 muditaos/module-apps/application-calendar/windows/AllEventsWindow.hpp -rw-r--r-- 1.2 KiB
80768bf4 — Tomas Rogala [EGD-4708] Add backend of multiday events handling 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
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once
#include "application-calendar/models/AllEventsModel.hpp"
#include "application-calendar/widgets/CalendarListView.hpp"
#include "application-calendar/widgets/CalendarStyle.hpp"
#include "windows/AppWindow.hpp"
#include "Application.hpp"
#include <ListView.hpp>

namespace gui
{
    class AllEventsWindow : public gui::AppWindow
    {
        gui::Image *leftArrowImage   = nullptr;
        gui::Image *newDayEventImage = nullptr;

        TimePoint dateFilter                           = TimePointNow();
        gui::ListView *allEventsList                   = nullptr;
        std::shared_ptr<AllEventsModel> allEventsModel = nullptr;

      public:
        AllEventsWindow(app::Application *app, std::string name);
        void onBeforeShow(gui::ShowMode mode, gui::SwitchData *data) override;
        bool onDatabaseMessage(sys::Message *msgl) override;

        bool onInput(const gui::InputEvent &inputEvent) override;
        void rebuild() override;
        void buildInterface() override;
        auto handleSwitchData(SwitchData *data) -> bool override;
    };

} // namespace gui