Files
MuditaOS/module-apps/application-settings/windows/system/TechnicalInformationWindow.cpp
Mateusz Grzegorzek 58dd02cff1 [BH-861] Cleanup Application split - part I
1. Prepare Pure and Bell specific `Application`
   classes and add them to `app` target:

- `products/BellHybrid/apps/Application.cpp`
- `products/PurePhone/apps/Application.cpp`

2. Update `CMakeLists.txt` files.
3. Move `ApplicationBell` implementation to Bell-specific
   `Application` class and remove `ApplicationBell` files.
4. Change Bell apps parent classes from `ApplicationBell`
  to Bell-specific `Application` class.
5. Rename `Application` to `ApplicationCommon` in the rest of the files.
2021-09-13 11:58:10 +02:00

49 lines
1.6 KiB
C++

// 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"));
bottomBar->setActive(gui::BottomBar::Side::RIGHT, true);
bottomBar->setText(gui::BottomBar::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