~aleteoryx/muditaos

ref: 29f455d46bbddee9a8f0ea860e84c9b6e5ab38b5 muditaos/module-apps/apps-common/popups/lock-popups/SimNotReadyWindow.cpp -rw-r--r-- 1.7 KiB
29f455d4 — Przemyslaw Brudny [EGD-7998] Pure image assets cleanup and update 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
38
39
40
41
42
43
44
45
46
47
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "SimNotReadyWindow.hpp"

#include <service-appmgr/Controller.hpp>

#include <i18n/i18n.hpp>

using namespace gui;

SimNotReadyWindow::SimNotReadyWindow(app::ApplicationCommon *app, const std::string &name) : AppWindow(app, name)
{
    buildInterface();
}

status_bar::Configuration SimNotReadyWindow::configureStatusBar(status_bar::Configuration appConfiguration)
{
    appConfiguration.disable(status_bar::Indicator::NetworkAccessTechnology);
    appConfiguration.disable(status_bar::Indicator::Lock);
    appConfiguration.enable(status_bar::Indicator::PhoneMode);
    appConfiguration.enable(status_bar::Indicator::Time);
    appConfiguration.enable(status_bar::Indicator::Battery);
    appConfiguration.enable(status_bar::Indicator::Signal);
    appConfiguration.enable(status_bar::Indicator::SimCard);
    appConfiguration.enable(status_bar::Indicator::Bluetooth);
    appConfiguration.enable(status_bar::Indicator::AlarmClock);
    return appConfiguration;
}

void SimNotReadyWindow::buildInterface()
{
    AppWindow::buildInterface();

    setTitle(utils::translate("app_settings_net"));

    navBar->setText(nav_bar::Side::Right, utils::translate("common_back"));

    infoIcon = new gui::Icon(this,
                             style::window::default_left_margin,
                             style::window::default_vertical_pos,
                             style::window::default_body_width,
                             style::window::default_body_height,
                             "sim_128px_W_G",
                             utils::translate("sim_card_not_ready"));
    infoIcon->setAlignment(Alignment::Horizontal::Center);
}