// 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.hpp" #include "CalendarListItem.hpp" #include "application-calendar/widgets/CalendarStyle.hpp" #include #include #include #include namespace gui { const std::array reminderTimeOptions = {Reminder::never, Reminder::event_time, Reminder::five_min_before, Reminder::fifteen_min_before, Reminder::thirty_min_before, Reminder::one_hour_before, Reminder::two_hour_before, Reminder::one_day_before, Reminder::two_days_before, Reminder::one_week_before}; class SeveralOptionsItem : public CalendarListItem { app::Application *application = nullptr; gui::VBox *vBox = nullptr; gui::HBox *hBox = nullptr; gui::Label *optionLabel = nullptr; gui::Label *descriptionLabel = nullptr; gui::Image *leftArrow = nullptr; gui::Image *rightArrow = nullptr; std::vector optionsNames; unsigned int actualVectorIndex = 0; std::function bottomBarTemporaryMode = nullptr; std::function bottomBarRestoreFromTemporaryMode = nullptr; public: SeveralOptionsItem(app::Application *app, const std::string &description, std::function bottomBarTemporaryMode = nullptr, std::function bottomBarRestoreFromTemporaryMode = nullptr); virtual ~SeveralOptionsItem() override = default; void prepareOptionsNames(); void applyCallbacks(); uint32_t repeatOptionValue = 0; // virtual methods from Item bool onDimensionChanged(const BoundingBox &oldDim, const BoundingBox &newDim) override; }; } /* namespace gui */