~aleteoryx/muditaos

ref: 44d3306f280cc7d6daa718d2a9f6323e48f54616 muditaos/module-apps/application-antenna/windows/ScanModesWindow.hpp -rw-r--r-- 1.4 KiB
44d3306f — rrandomsky [CP-1059] Fix for erase only sensitive data from logs 2 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// 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 <apps-common/ApplicationCommon.hpp>
#include <apps-common/windows/AppWindow.hpp>
#include <module-gui/gui/widgets/Text.hpp>

namespace gui
{
    namespace name
    {
        namespace window
        {
            inline constexpr auto scan_window = "AntennaScanWindow";
        }
    } // namespace name
    class ScanModesWindow : public AppWindow
    {
      protected:
        std::map<uint32_t, std::string> modeButtonParams;
        enum scanModes
        {
            Auto = 0,
            GSM_only,
            WCDMA_only,
            LTE_only,
            TD_SCDMA_only,
            UTMS_only,
            CDMA_only,
            HDR_only,
            CDMA_and_HDR_only
        };

        gui::VBox *modesBox       = nullptr;
        gui::Label *commandResult = nullptr;

        gui::Label *addMode(gui::Item *parent, const UTF8 &text);
        gui::Label *addSpacer(void);

      public:
        ScanModesWindow(app::ApplicationCommon *app);

        // virtual methods
        bool onInput(const InputEvent &inputEvent) override;
        void onBeforeShow(ShowMode mode, SwitchData *data) override;
        void rebuild() override;
        void buildInterface() override;
        void destroyInterface() override;
        void updateCurrentMode(std::string &data);
    };

} /* namespace gui */