53 lines
996 B
C++
Executable File
53 lines
996 B
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* SoundState class derivation for custom purposes.
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Filip Biedziak, NLE, 2020-08-10
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <SoundManagement/som.hpp>
|
|
|
|
#include <QString>
|
|
|
|
|
|
namespace EffectManagement
|
|
{
|
|
|
|
class SoundState
|
|
: public SoundManagement::SoundState
|
|
{
|
|
|
|
public:
|
|
enum Status { Active, Stop, Scheduled };
|
|
|
|
SoundState() = default;
|
|
explicit SoundState(const SoundManagement::SoundState &soundState);
|
|
|
|
public:
|
|
Status status() const { return m_status; }
|
|
int duration() const { return m_duration; }
|
|
int timeLeft() const { return m_timeLeft; }
|
|
int volume() const { return m_volume; }
|
|
|
|
void status(Status stat);
|
|
void duration(int secs);
|
|
void timeLeft(int secs);
|
|
void volume(int vol);
|
|
|
|
QString statusToString() const;
|
|
|
|
|
|
private:
|
|
Status m_status{Status::Scheduled};
|
|
int m_volume{100};
|
|
int m_duration{0};
|
|
int m_timeLeft{0};
|
|
|
|
}; // class SoundState
|
|
|
|
} // namespace EffectManagement
|