~aleteoryx/muditaos

ref: df1d1cdfe2b33b193f23ec281c5f205a6d606de5 muditaos/module-apps/application-bell-settings/widgets/TimeFormatSetListItem.hpp -rw-r--r-- 1006 bytes
df1d1cdf — Przemyslaw Brudny [BH-723] Added ThreeBox and BellBaseLayout 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
31
32
33
34
35
36
37
// 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 <time/time_locale.hpp>
#include <utf8/UTF8.hpp>
#include <widgets/BellSideListItem.hpp>

#include <functional>

namespace gui
{
    class Spinner;
    class Label;

    class TimeFormatSetListItem : public gui::BellSideListItem
    {
      public:
        TimeFormatSetListItem() = delete;
        TimeFormatSetListItem(
            gui::Length x, gui::Length y, gui::Length w, gui::Length h, const UTF8 &topDesc, const UTF8 &botDesc);

        auto getTimeFmt() const noexcept -> utils::time::Locale::TimeFormat;
        auto setTimeFmt(utils::time::Locale::TimeFormat fmt) noexcept -> void;

        /// called before next SideListItem is activated
        /// @param `this` : item
        std::function<void(Item &)> onNextCallback;

      private:

        Label *bottomDescription{};
        Spinner *timeFormat{};
    };

} // namespace gui