本文整理汇总了C++中QLCFixtureHead::panMsbChannel方法的典型用法代码示例。如果您正苦于以下问题:C++ QLCFixtureHead::panMsbChannel方法的具体用法?C++ QLCFixtureHead::panMsbChannel怎么用?C++ QLCFixtureHead::panMsbChannel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QLCFixtureHead
的用法示例。
在下文中一共展示了QLCFixtureHead::panMsbChannel方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cacheChannelsPanTilt
void QLCFixtureHead_Test::cacheChannelsPanTilt()
{
QLCFixtureMode mode(m_fixtureDef);
QCOMPARE(mode.channels().size(), 0);
m_ch1->setGroup(QLCChannel::Pan);
m_ch1->setControlByte(QLCChannel::MSB);
mode.insertChannel(m_ch1, 0);
m_ch2->setGroup(QLCChannel::Pan);
m_ch2->setControlByte(QLCChannel::LSB);
mode.insertChannel(m_ch2, 1);
m_ch3->setGroup(QLCChannel::Tilt);
m_ch3->setControlByte(QLCChannel::MSB);
mode.insertChannel(m_ch3, 2);
m_ch4->setGroup(QLCChannel::Tilt);
m_ch4->setControlByte(QLCChannel::LSB);
mode.insertChannel(m_ch4, 3);
QLCFixtureHead head;
head.addChannel(0);
head.addChannel(1);
head.addChannel(2);
head.addChannel(3);
head.cacheChannels(&mode);
QCOMPARE(head.panMsbChannel(), quint32(0));
QCOMPARE(head.panLsbChannel(), quint32(1));
QCOMPARE(head.tiltMsbChannel(), quint32(2));
QCOMPARE(head.tiltLsbChannel(), quint32(3));
QCOMPARE(head.rgbChannels(), QVector <quint32> ());
QCOMPARE(head.cmyChannels(), QVector <quint32> ());
QCOMPARE(head.masterIntensityChannel(), QLCChannel::invalid());
head.cacheChannels((QLCFixtureMode*) 0xDEADBEEF);
QCOMPARE(head.panMsbChannel(), quint32(0));
QCOMPARE(head.panLsbChannel(), quint32(1));
QCOMPARE(head.tiltMsbChannel(), quint32(2));
QCOMPARE(head.tiltLsbChannel(), quint32(3));
QCOMPARE(head.rgbChannels(), QVector <quint32> ());
QCOMPARE(head.cmyChannels(), QVector <quint32> ());
QCOMPARE(head.masterIntensityChannel(), QLCChannel::invalid());
}
示例2: doublePanTilt
void QLCFixtureHead_Test::doublePanTilt()
{
// Test that the first found Pan/Tilt channel is used
// - for the case the user forgets to set the latter to LSB
// - in most cases the Pan MSB channel comes first
QLCFixtureMode mode(m_fixtureDef);
QCOMPARE(mode.channels().size(), 0);
m_ch1->setGroup(QLCChannel::Pan);
m_ch1->setControlByte(QLCChannel::MSB);
mode.insertChannel(m_ch1, 0);
m_ch2->setGroup(QLCChannel::Pan);
m_ch2->setControlByte(QLCChannel::MSB);
mode.insertChannel(m_ch2, 1);
m_ch3->setGroup(QLCChannel::Tilt);
m_ch3->setControlByte(QLCChannel::MSB);
mode.insertChannel(m_ch3, 2);
m_ch4->setGroup(QLCChannel::Tilt);
m_ch4->setControlByte(QLCChannel::MSB);
mode.insertChannel(m_ch4, 3);
QLCFixtureHead head;
head.addChannel(0);
head.addChannel(1);
head.addChannel(2);
head.addChannel(3);
head.cacheChannels(&mode);
QCOMPARE(head.panMsbChannel(), quint32(0));
QCOMPARE(head.panLsbChannel(), QLCChannel::invalid());
QCOMPARE(head.tiltMsbChannel(), quint32(2));
QCOMPARE(head.tiltLsbChannel(), QLCChannel::invalid());
}
示例3: cacheChannelsCmyMaster
void QLCFixtureHead_Test::cacheChannelsCmyMaster()
{
QLCFixtureMode mode(m_fixtureDef);
QCOMPARE(mode.channels().size(), 0);
m_ch1->setGroup(QLCChannel::Intensity);
m_ch1->setColour(QLCChannel::Cyan);
mode.insertChannel(m_ch1, 0);
m_ch2->setGroup(QLCChannel::Intensity);
m_ch2->setColour(QLCChannel::Magenta);
mode.insertChannel(m_ch2, 1);
m_ch3->setGroup(QLCChannel::Intensity);
m_ch3->setColour(QLCChannel::NoColour);
mode.insertChannel(m_ch3, 2);
m_ch4->setGroup(QLCChannel::Intensity);
m_ch4->setColour(QLCChannel::Yellow);
mode.insertChannel(m_ch4, 3);
QLCFixtureHead head;
head.addChannel(0);
head.addChannel(1);
head.addChannel(2);
head.addChannel(3);
head.cacheChannels(&mode);
QCOMPARE(head.panMsbChannel(), QLCChannel::invalid());
QCOMPARE(head.panLsbChannel(), QLCChannel::invalid());
QCOMPARE(head.tiltMsbChannel(), QLCChannel::invalid());
QCOMPARE(head.tiltLsbChannel(), QLCChannel::invalid());
QCOMPARE(head.rgbChannels(), QVector <quint32> ());
QCOMPARE(head.cmyChannels(), QVector <quint32> () << 0 << 1 << 3);
QCOMPARE(head.masterIntensityChannel(), quint32(2));
}