~aleteoryx/muditaos

ref: a8fd5d25ec9589660fcbd316d2dcf13f74542a09 muditaos/module-apps/application-settings/windows/advanced/CPUModeTestWindow.hpp -rw-r--r-- 1.0 KiB
a8fd5d25 — Adam Wulkiewicz [MOS-691] Fix memory leaks in APN settings 3 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
// 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 "AppWindow.hpp"

#include <TextFixedSize.hpp>
#include <widgets/TextSpinnerBox.hpp>
#include <SystemManager/CpuSentinel.hpp>

namespace gui
{
    class CPUModeTestWindow : public AppWindow
    {
      private:
        static inline auto name = "CPU Mode Tester";

        VBox *body                           = nullptr;
        TextFixedSize *currentFreqValue      = nullptr;
        TextSpinnerBox *currentFreqSpinner   = nullptr;
        TextSpinnerBox *permanentFreqSpinner = nullptr;

        std::shared_ptr<sys::CpuSentinel> cpuModeTester;

        void createCurrentFreqBox();
        void createPermanentFreqSettingBox();
        void createNewFreqBox();

      public:
        explicit CPUModeTestWindow(app::ApplicationCommon *app);
        void onClose(CloseReason reason) override;
        void onBeforeShow(ShowMode mode, SwitchData *data) override;
    };
} /* namespace gui */