mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-07-19 12:34:31 -04:00
Applications configure the top bar once for all their windows. Sometimes, windows need to configure top bars with its configuration.
50 lines
1.5 KiB
C++
50 lines
1.5 KiB
C++
// 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/EventDetailModel.hpp"
|
|
#include "windows/AppWindow.hpp"
|
|
#include "Application.hpp"
|
|
#include <Style.hpp>
|
|
#include <module-db/Interface/EventsRecord.hpp>
|
|
#include <Text.hpp>
|
|
#include <Label.hpp>
|
|
#include <module-sys/Service/Timer.hpp>
|
|
|
|
namespace gui
|
|
{
|
|
class EventReminderWindow : public gui::AppWindow
|
|
{
|
|
private:
|
|
std::unique_ptr<sys::Timer> reminderTimer;
|
|
|
|
protected:
|
|
std::shared_ptr<EventsRecord> eventRecord;
|
|
|
|
gui::VBox *body = nullptr;
|
|
Label *dateLabel = nullptr;
|
|
Label *timeLabel = nullptr;
|
|
Label *descriptionLabel = nullptr;
|
|
Image *topImage = nullptr;
|
|
Image *bottomImage = nullptr;
|
|
|
|
void startTimer();
|
|
void destroyTimer();
|
|
void reminderTimerCallback();
|
|
void closeReminder();
|
|
|
|
public:
|
|
EventReminderWindow(app::Application *app, std::string name);
|
|
virtual ~EventReminderWindow();
|
|
|
|
void onClose() override;
|
|
bool onInput(const gui::InputEvent &inputEvent) override;
|
|
void rebuild() override;
|
|
void buildInterface() override;
|
|
void destroyInterface() override;
|
|
top_bar::Configuration configureTopBar(top_bar::Configuration appConfiguration) override;
|
|
auto handleSwitchData(SwitchData *data) -> bool override;
|
|
};
|
|
|
|
} /* namespace gui */
|