~aleteoryx/muditaos

ref: 7597d388526c3f1d3c666964514db33bfcd6cf4d muditaos/module-apps/application-settings/windows/system/TechnicalInformationWindow.cpp -rw-r--r-- 1.6 KiB
7597d388 — Przemyslaw Brudny [EGD-7857] Renamed BottomBar to NavBar 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
48
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "TechnicalInformationWindow.hpp"

#include <application-settings/windows/WindowNames.hpp>

namespace gui
{
    TechnicalInformationWindow::TechnicalInformationWindow(
        app::ApplicationCommon *app, std::shared_ptr<TechnicalWindowContract::Presenter> technicalPresenter)
        : AppWindow(app, gui::window::name::technical_information), presenter(std::move(technicalPresenter))
    {
        presenter->attach(this);
        buildInterface();
    }

    void TechnicalInformationWindow::onBeforeShow(ShowMode mode, SwitchData *data)
    {
        presenter->requestImei();
    }

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

        setTitle(utils::translate("app_settings_about_your_pure"));
        navBar->setActive(gui::nav_bar::Side::Right, true);
        navBar->setText(gui::nav_bar::Side::Right, utils::translate(::style::strings::common::back));

        list = new ListView(this,
                            style::window::default_left_margin,
                            style::window::default_vertical_pos,
                            style::listview::body_width_with_scroll,
                            style::window::default_body_height,
                            presenter->getTechnicalInformationProvider(),
                            listview::ScrollBarType::Fixed);

        setFocusItem(list);
        list->rebuildList();
    }

    void TechnicalInformationWindow::imeiReady() noexcept
    {
        list->rebuildList();
    }

} // namespace gui