mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-02-06 20:33:00 -05:00
Added new OnPageElement listView rebuild type. Created new options refresh. Refactored DisplayLight Setting. BarGraph rector. Added step render limit for small radius arcs.
44 lines
1.1 KiB
C++
44 lines
1.1 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 "BaseSettingsWindow.hpp"
|
|
#include <i18n/i18n.hpp>
|
|
|
|
namespace gui
|
|
{
|
|
BaseSettingsWindow::BaseSettingsWindow(app::Application *app, std::string name) : OptionWindow(app, name)
|
|
{
|
|
optionsList->prepareRebuildCallback = [this]() {
|
|
clearOptions();
|
|
optionsModel->createData(options);
|
|
};
|
|
}
|
|
|
|
void BaseSettingsWindow::rebuild()
|
|
{
|
|
destroyInterface();
|
|
buildInterface();
|
|
}
|
|
|
|
void BaseSettingsWindow::onBeforeShow(ShowMode mode, SwitchData *data)
|
|
{
|
|
rebuildOptionList();
|
|
}
|
|
|
|
void BaseSettingsWindow::rebuildOptionList()
|
|
{
|
|
clearOptions();
|
|
addOptions(buildOptionsList());
|
|
}
|
|
|
|
void BaseSettingsWindow::refreshOptionsList()
|
|
{
|
|
refreshOptions(buildOptionsList());
|
|
}
|
|
|
|
void BaseSettingsWindow::refreshOptionsList(unsigned int pageIndex)
|
|
{
|
|
refreshOptions(buildOptionsList(), pageIndex);
|
|
}
|
|
} // namespace gui
|