~aleteoryx/muditaos

ref: 87bd36c84617c7c9b431d9853d9cd3e6f2aa8b90 muditaos/module-apps/apps-common/widgets/TimeFixedWidget.hpp -rw-r--r-- 1.2 KiB
87bd36c8 — Marcin Zieliński [MOS-649] Rename confusing method 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
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 <Text.hpp>
#include <Text.hpp>
#include <BoxLayout.hpp>
#include "widgets/DateWidget.hpp"
#include <time/FromTillDate.hpp>

namespace gui
{
    class TimeFixedWidget : public Rect
    {
      public:
        TimeFixedWidget(Item *parent,
                        const uint32_t &x,
                        const uint32_t &y,
                        const uint32_t &w,
                        const uint32_t &h,
                        const bool minus = false);

        void setFirst(uint32_t first);
        void setSecond(uint32_t second);
        void setMinus(bool minus);
        void setFont(const UTF8 &fontName);

      private:
        bool minusVisible        = false;
        HBox *hBox               = nullptr;
        HBox *firstHBox          = nullptr;
        HBox *secondHBox         = nullptr;
        Label *colonText         = nullptr;
        Label *firstPrimoText    = nullptr;
        Label *firstSecundoText  = nullptr;
        Label *secondPrimoText   = nullptr;
        Label *secondSecundoText = nullptr;
        Label *minusText         = nullptr;
    };
} /* namespace gui */