Files
MuditaOS/module-apps/apps-common/widgets/ProgressTimerWithBarGraphAndCounter.hpp
Onufry Pajaczek 7c6af2c57f [BH-1542] Pure meditation fix and cetner TimeFixedWidget
*DigitsContainer definicions moved to cpp file(for proper linkage)
*DigitsContainer changed container to std::vector
*Fixed a bug in ProgressTimerWithBarGraphAndCounter where timerText was
treated as timeWidget
*MeditationCountdownWindow timer is now custom size
*Minus removed form MeditationRunningWindow timer
2022-08-18 09:12:36 +02:00

41 lines
1006 B
C++

// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include "ProgressTimer.hpp"
#include "TimeFixedWidget.hpp"
#include <Timers/TimerHandle.hpp>
#include <time/time_conversion.hpp>
#include <atomic>
#include <chrono>
#include <string>
namespace gui
{
class Text;
class Progress;
} // namespace gui
namespace app
{
class ProgressTimerWithBarGraphAndCounter : public ProgressTimer
{
gui::Text *text = nullptr;
gui::Progress *progress = nullptr;
gui::TimeFixedWidget *timeWidget = nullptr;
void update() override;
void updateText();
void updateTimeWidget();
void updateProgress();
public:
using ProgressTimer::ProgressTimer;
void attach(gui::Progress *_progress);
void attach(gui::Text *_text);
void attach(gui::TimeFixedWidget *_timeWidget);
};
} // namespace app