~aleteoryx/muditaos

ref: 182f694ac2a1c3da23df72e0494588fc579e7616 muditaos/module-apps/application-settings-new/windows/ChangePasscodeWindow.hpp -rw-r--r-- 1.6 KiB
182f694a — Przemyslaw Brudny [EGD-6637] Cleanup locks structure 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
// 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 "locks/windows/LockWindow.hpp"
#include "locks/widgets/PhoneLockBaseBox.hpp"
#include "application-settings-new/data/ChangePasscodeData.hpp"
#include "application-settings-new/widgets/ChangePasscodeLockHandler.hpp"

namespace gui
{
    class ChangePasscodeWindow : public LockWindow
    {
      public:
        explicit ChangePasscodeWindow(app::Application *app);
        bool onInput(const InputEvent &inputEvent) override;
        void rebuild() override;

      protected:
        void buildBottomBar() override;
        void buildInterface() override;
        void buildTitleBar() override;
        void destroyInterface() override;
        void onBeforeShow(ShowMode mode, SwitchData *data) override;

        virtual void processPasscode();
        virtual void setVisibleState();

        ChangePasscodeAction changePasscodeAction;
        std::unique_ptr<PhoneLockBaseBox> lockBox  = nullptr;
        gui::Image *lockImage                      = nullptr;
        Lock::LockState lockState{Lock::LockState::InputRequired};
        ChangePasscodeLockHandler lockHandler;

        std::string textForEnterCurrentPassword = "app_settings_security_type_current_passcode";
        std::string textForEnterNewPassword     = "app_settings_security_enter_new_passcode";
        std::string testForConfirmPassword      = "app_settings_security_confirm_new_passcode";
        std::string textForWrongPassword        = "app_settings_security_wrong_passcode";
    };
} /* namespace gui */