本文整理汇总了C++中EFXFixture::setFadeBus方法的典型用法代码示例。如果您正苦于以下问题:C++ EFXFixture::setFadeBus方法的具体用法?C++ EFXFixture::setFadeBus怎么用?C++ EFXFixture::setFadeBus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EFXFixture
的用法示例。
在下文中一共展示了EFXFixture::setFadeBus方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: arm
void EFX::arm()
{
int serialNumber = 0;
Doc* doc = qobject_cast <Doc*> (parent());
Q_ASSERT(doc != NULL);
QListIterator <EFXFixture*> it(m_fixtures);
while (it.hasNext() == true)
{
EFXFixture* ef = it.next();
Q_ASSERT(ef != NULL);
ef->setSerialNumber(serialNumber++);
/* If fxi == NULL, the fixture has been destroyed */
Fixture* fxi = doc->fixture(ef->fixture());
if (fxi == NULL)
continue;
/* If this fixture has no mode, it's a generic dimmer that
can't do pan&tilt anyway. */
const QLCFixtureMode* mode = fxi->fixtureMode();
if (mode == NULL)
continue;
QList <quint32> intensityChannels;
/* Find exact channel numbers for MSB/LSB pan and tilt */
for (quint32 i = 0; i < quint32(mode->channels().size()); i++)
{
QLCChannel* ch = mode->channel(i);
Q_ASSERT(ch != NULL);
if (ch->group() == QLCChannel::Pan)
{
if (ch->controlByte() == QLCChannel::MSB)
ef->setMsbPanChannel(fxi->universeAddress() + i);
else if (ch->controlByte() == QLCChannel::LSB)
ef->setLsbPanChannel(fxi->universeAddress() + i);
}
else if (ch->group() == QLCChannel::Tilt)
{
if (ch->controlByte() == QLCChannel::MSB)
ef->setMsbTiltChannel(fxi->universeAddress() + i);
else if (ch->controlByte() == QLCChannel::LSB)
ef->setLsbTiltChannel(fxi->universeAddress() + i);
}
else if (ch->group() == QLCChannel::Intensity &&
ch->colour() == QLCChannel::NoColour) // Don't touch RGB/CMY channels
{
if (ch->searchCapability(/*D*/"immer", false) != NULL ||
ch->searchCapability(/*I*/"ntensity", false) != NULL)
{
intensityChannels << (fxi->universeAddress() + i);
}
}
}
ef->setIntensityChannels(intensityChannels);
ef->setFadeBus(fadeBusID());
}
Q_ASSERT(m_fader == NULL);
m_fader = new GenericFader;
resetElapsed();
}