Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* SoundState class derivation for custom purposes.
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Filip Biedziak, NLE, 2020-08-26
|
||||
*/
|
||||
|
||||
#include "efm_sound_state.h"
|
||||
|
||||
|
||||
namespace EffectManagement
|
||||
{
|
||||
|
||||
//=============================================================================================================================
|
||||
// SOUNDSTATE
|
||||
//=============================================================================================================================
|
||||
|
||||
SoundState::SoundState(const SoundManagement::SoundState &soundState)
|
||||
: SoundManagement::SoundState(soundState)
|
||||
{
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------
|
||||
// PUBLIC MEMBER FUNCTIONS
|
||||
//-----------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
void SoundState::status(Status stat)
|
||||
{
|
||||
m_status = stat;
|
||||
}
|
||||
|
||||
void SoundState::duration(int secs)
|
||||
{
|
||||
if (secs > 0)
|
||||
m_duration = std::max(0, secs);
|
||||
}
|
||||
|
||||
void SoundState::timeLeft(int secs)
|
||||
{
|
||||
if (secs >= 0)
|
||||
m_timeLeft = secs;
|
||||
}
|
||||
|
||||
void SoundState::volume(int vol)
|
||||
{
|
||||
if (vol >= 0)
|
||||
m_volume = vol;
|
||||
}
|
||||
|
||||
|
||||
QString SoundState::statusToString() const
|
||||
{
|
||||
if (m_status == Status::Active)
|
||||
return QStringLiteral("Active");
|
||||
return m_status == Status::Stop ? QStringLiteral("Stop") : QStringLiteral("Scheduled");
|
||||
}
|
||||
|
||||
} // namespace EffectManagement
|
||||
Reference in new issue
Block a user