~aleteoryx/muditaos

ref: 8f0797218f2defa9266704a93cfff94322a38f51 muditaos/module-apps/application-settings-new/widgets/ApnInputWidget.hpp -rw-r--r-- 1.5 KiB
8f079721 — Mateusz Grzegorzek [EGD-5312] Add Time selection window 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// 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 "application-settings-new/data/SettingsInternals.hpp"
#include "application-settings-new//widgets/ApnListItem.hpp"

#include <ListItem.hpp>
#include <Text.hpp>
#include <TextFixedSize.hpp>

namespace gui
{
    class ApnInputWidget : public ApnListItem
    {
        settingsInternals::ListItemName listItemName;

      public:
        ApnInputWidget(settingsInternals::ListItemName listItemName,
                       std::function<void(const UTF8 &text)> bottomBarTemporaryMode = nullptr,
                       std::function<void()> bottomBarRestoreFromTemporaryMode      = nullptr,
                       std::function<void()> selectSpecialCharacter                 = nullptr,
                       std::function<void()> contentChanged                         = nullptr,
                       unsigned int lines                                           = 1);

      private:
        VBox *vBox                             = nullptr;
        Label *titleLabel                      = nullptr;
        TextFixedSize *inputText               = nullptr;
        std::function<void()> checkTextContent = nullptr;

        void applyItemNameSpecificSettings();
        void nameHandler();
        void apnHandler();
        void usernameHandler();
        void passwordNumberHandler();
        void authtypeHandler();
        void apntypeHandler();
        void protocolHandler();
    };

} /* namespace gui */