本文整理汇总了C++中Fixture::channelCanFade方法的典型用法代码示例。如果您正苦于以下问题:C++ Fixture::channelCanFade方法的具体用法?C++ Fixture::channelCanFade怎么用?C++ Fixture::channelCanFade使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fixture
的用法示例。
在下文中一共展示了Fixture::channelCanFade方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: canFade
bool FadeChannel::canFade(const Doc* doc) const
{
bool cFade = true;
if (fixture() != Fixture::invalidId())
{
Fixture* fxi = doc->fixture(fixture());
if (fxi != NULL)
cFade = fxi->channelCanFade(channel());
}
return cFade;
}
示例2: postRun
void RGBMatrix::postRun(MasterTimer* timer, QList<Universe *> universes)
{
if (m_fader != NULL)
{
QHashIterator <FadeChannel,FadeChannel> it(m_fader->channels());
while (it.hasNext() == true)
{
it.next();
FadeChannel fc = it.value();
// fade out only intensity channels
if (fc.group(doc()) != QLCChannel::Intensity)
continue;
bool canFade = true;
Fixture *fixture = doc()->fixture(fc.fixture());
if (fixture != NULL)
canFade = fixture->channelCanFade(fc.channel());
fc.setStart(fc.current(getAttributeValue(Intensity)));
fc.setCurrent(fc.current(getAttributeValue(Intensity)));
fc.setElapsed(0);
fc.setReady(false);
if (canFade == false)
{
fc.setFadeTime(0);
fc.setTarget(fc.current(getAttributeValue(Intensity)));
}
else
{
if (overrideFadeOutSpeed() == defaultSpeed())
fc.setFadeTime(fadeOutSpeed());
else
fc.setFadeTime(overrideFadeOutSpeed());
fc.setTarget(0);
}
timer->faderAdd(fc);
}
delete m_fader;
m_fader = NULL;
}
{
QMutexLocker algorithmLocker(&m_algorithmMutex);
if (m_algorithm != NULL)
m_algorithm->postRun();
}
Function::postRun(timer, universes);
}
示例3: fadeAndStopAll
void MasterTimer::fadeAndStopAll(int timeout)
{
if (timeout == 0)
return;
Doc* doc = qobject_cast<Doc*> (parent());
Q_ASSERT(doc != NULL);
QList<FadeChannel> fcList;
QList<Universe *> universes = doc->inputOutputMap()->claimUniverses();
for (int i = 0; i < universes.count(); i++)
{
QHashIterator <int,uchar> it(universes[i]->intensityChannels());
while (it.hasNext() == true)
{
it.next();
Fixture* fxi = doc->fixture(doc->fixtureForAddress(it.key()));
if (fxi != NULL)
{
uint ch = it.key() - fxi->universeAddress();
if (fxi->channelCanFade(ch))
{
FadeChannel fc(doc, fxi->id(), ch);
fc.setStart(it.value());
fc.setTarget(0);
fc.setFadeTime(timeout);
fcList.append(fc);
}
}
}
}
doc->inputOutputMap()->releaseUniverses();
// Stop all functions first
stopAllFunctions();
// Instruct mastertimer to do a fade out of all
// the intensity channels that can fade
QMutexLocker faderLocker(&m_faderMutex);
foreach(FadeChannel fade, fcList)
fader()->add(fade);
}