mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-04-20 15:07:17 -04:00
50 lines
1.3 KiB
C++
50 lines
1.3 KiB
C++
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include <vector>
|
|
#include "AppWindow.hpp"
|
|
#include "gui/widgets/Label.hpp"
|
|
#include "gui/widgets/TextFixedSize.hpp"
|
|
#include "gui/widgets/Image.hpp"
|
|
#include "gui/widgets/BottomBar.hpp"
|
|
|
|
namespace gui
|
|
{
|
|
class UpdateWindow : public AppWindow
|
|
{
|
|
|
|
enum class State
|
|
{
|
|
UpdateNow,
|
|
Return,
|
|
};
|
|
|
|
gui::Label *titleLabel = nullptr;
|
|
gui::Label *infoLabel = nullptr;
|
|
gui::Label *detailLabel = nullptr;
|
|
gui::Label *percentLabel = nullptr;
|
|
|
|
gui::Label *currentVersionInfo = nullptr;
|
|
gui::Label *updateVersionInfo = nullptr;
|
|
gui::Label *updateDetails = nullptr;
|
|
|
|
std::vector<gui::Label *> selectionLabels;
|
|
State state = State::Return;
|
|
int progressPercent = 0;
|
|
|
|
public:
|
|
UpdateWindow(app::Application *app);
|
|
void onBeforeShow(ShowMode mode, SwitchData *data) override;
|
|
bool onInput(const InputEvent &inputEvent) override;
|
|
bool handleSwitchData(SwitchData *data) override;
|
|
void rebuild() override;
|
|
void buildInterface() override;
|
|
void destroyInterface() override;
|
|
|
|
fs::path updateFile;
|
|
};
|
|
|
|
} /* namespace gui */
|