本文整理汇总了C++中Fixture::channelAddress方法的典型用法代码示例。如果您正苦于以下问题:C++ Fixture::channelAddress方法的具体用法?C++ Fixture::channelAddress怎么用?C++ Fixture::channelAddress使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fixture
的用法示例。
在下文中一共展示了Fixture::channelAddress方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeDMXLevel
void VCSlider::writeDMXLevel(MasterTimer* timer, UniverseArray* universes)
{
Q_UNUSED(timer);
m_levelValueMutex.lock();
QListIterator <LevelChannel> it(m_levelChannels);
while (it.hasNext() == true)
{
LevelChannel lch(it.next());
Fixture* fxi = m_doc->fixture(lch.fixture);
if (fxi != NULL)
{
const QLCChannel* qlcch = fxi->channel(lch.channel);
if (qlcch == NULL)
continue;
if (qlcch->group() != QLCChannel::Intensity &&
m_levelValueChanged == false)
{
/* Value has not changed and this is not an intensity channel.
LTP in effect. */
continue;
}
quint32 dmx_ch = fxi->channelAddress(lch.channel);
universes->write(dmx_ch, m_levelValue, qlcch->group());
}
}
m_levelValueChanged = false;
m_levelValueMutex.unlock();
}
示例2: writeDMXLevel
void VCSlider::writeDMXLevel(MasterTimer* timer, UniverseArray* universes)
{
Q_UNUSED(timer);
m_levelValueMutex.lock();
uchar modLevel = m_levelValue;
int r = 0, g = 0, b = 0, c = 0, m = 0, y = 0;
if (m_cngType == ClickAndGoWidget::RGB)
{
float f = 0;
if (m_slider)
f = SCALE(float(m_levelValue), float(m_slider->minimum()),
float(m_slider->maximum()), float(0), float(200));
if ((uchar)f != 0)
{
QColor modColor = m_cngRGBvalue.lighter((uchar)f);
r = modColor.red();
g = modColor.green();
b = modColor.blue();
}
}
else if (m_cngType == ClickAndGoWidget::CMY)
{
float f = 0;
if (m_slider)
f = SCALE(float(m_levelValue), float(m_slider->minimum()),
float(m_slider->maximum()), float(0), float(200));
if ((uchar)f != 0)
{
QColor modColor = m_cngRGBvalue.lighter((uchar)f);
c = modColor.cyan();
m = modColor.magenta();
y = modColor.yellow();
}
}
QListIterator <LevelChannel> it(m_levelChannels);
while (it.hasNext() == true)
{
LevelChannel lch(it.next());
Fixture* fxi = m_doc->fixture(lch.fixture);
if (fxi != NULL)
{
const QLCChannel* qlcch = fxi->channel(lch.channel);
if (qlcch == NULL)
continue;
if (qlcch->group() != QLCChannel::Intensity &&
m_levelValueChanged == false)
{
/* Value has not changed and this is not an intensity channel.
LTP in effect. */
continue;
}
if (qlcch->group() == QLCChannel::Intensity)
{
if (m_cngType == ClickAndGoWidget::RGB)
{
if (qlcch->colour() == QLCChannel::Red)
modLevel = (uchar)r;
else if (qlcch->colour() == QLCChannel::Green)
modLevel = (uchar)g;
else if (qlcch->colour() == QLCChannel::Blue)
modLevel = (uchar)b;
}
else if (m_cngType == ClickAndGoWidget::CMY)
{
if (qlcch->colour() == QLCChannel::Cyan)
modLevel = (uchar)c;
else if (qlcch->colour() == QLCChannel::Magenta)
modLevel = (uchar)m;
else if (qlcch->colour() == QLCChannel::Yellow)
modLevel = (uchar)y;
}
}
quint32 dmx_ch = fxi->channelAddress(lch.channel);
universes->write(dmx_ch, modLevel, qlcch->group());
}
}
m_levelValueChanged = false;
m_levelValueMutex.unlock();
}