~aleteoryx/muditaos

ref: d818fc70440f10073458056855929457856c818e muditaos/module-apps/application-desktop/windows/PinLockBaseWindow.hpp -rw-r--r-- 1022 bytes
d818fc70 — Jakub Pyszczak [EGD-5613] Fix pin lock window 5 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
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

#include "LockWindow.hpp"

namespace gui
{
    class PinLockBaseWindow : public LockWindow
    {
      public:
        PinLockBaseWindow(app::Application *app, std::string name) : LockWindow(app, name)
        {}

        top_bar::Configuration configureTopBar(top_bar::Configuration appConfiguration) override;

        void buildImages(const std::string &lockImg, const std::string &infoImg);
        [[nodiscard]] auto getToken(Token token) const -> std::string;
        void restore() noexcept override;
        void setImagesVisible(bool lockImg, bool infoImg);
        void setTitleBar(bool isVisible, bool isIceActive);

        gui::HBox *iceBox     = nullptr;
        gui::Image *infoImage = nullptr;
        gui::Image *lockImage = nullptr;

      private:
        void buildBottomBar() override;
        void buildTitleBar() override;
    };
} // namespace gui