~aleteoryx/muditaos

ref: af960b6fac2fdd9e42072c4632ca769fce76f95f muditaos/module-gui/gui/widgets/TopBar/SIM.hpp -rw-r--r-- 992 bytes
af960b6f — Lucjan Bryndza [EGD-5146] Add read LFS block size from part 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
// 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 "../Image.hpp"
#include <common_data/EventStore.hpp>

namespace gui
{
    class SIM : public Image
    {
        Store::GSM::SIM current = Store::GSM::SIM::SIM_UNKNOWN;

      public:
        /// create first image (sim unknown) and set it
        const unsigned int w   = 24;
        const unsigned int h   = 30;
        const char *sim1       = "sim1";       // sim 1 indicator
        const char *sim2       = "sim2";       // sim 2 indicator
        const char *simunknown = "simunknown"; // sim - unknown sim state indicator (i.e. no initialization was done)
        const char *simfailed  = "simfail";    // sim - notification for sim failure

        /// check if sim set in state -> if not -> show new sim
        void show(Store::GSM::SIM state);
        SIM(Item *parent, uint32_t x, uint32_t y);
    };
} // namespace gui