本文整理汇总了C++中Cue::setFadeOutSpeed方法的典型用法代码示例。如果您正苦于以下问题:C++ Cue::setFadeOutSpeed方法的具体用法?C++ Cue::setFadeOutSpeed怎么用?C++ Cue::setFadeOutSpeed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cue
的用法示例。
在下文中一共展示了Cue::setFadeOutSpeed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switchCue
void CueStack_Test::switchCue()
{
QLCFixtureDef* def = m_doc->fixtureDefCache()->fixtureDef("Futurelight", "DJScan250");
QVERIFY(def != NULL);
QLCFixtureMode* mode = def->modes().first();
QVERIFY(mode != NULL);
Fixture* fxi = new Fixture(m_doc);
fxi->setFixtureDefinition(def, mode);
fxi->setName("Test Scanner");
fxi->setAddress(10);
fxi->setUniverse(0);
m_doc->addFixture(fxi);
QList<Universe*> ua;
ua.append(new Universe(0, new GrandMaster()));
CueStack cs(m_doc);
cs.setFadeInSpeed(100);
cs.setFadeOutSpeed(200);
cs.setDuration(300);
Cue cue;
cue.setName("One");
cue.setValue(0, 255);
cue.setValue(1, 255);
cue.setValue(500, 255);
cue.setValue(10, 255); // LTP
cue.setValue(11, 255); // LTP
cue.setFadeInSpeed(20);
cue.setFadeOutSpeed(40);
cs.appendCue(cue);
cue = Cue();
cue.setName("Two");
cue.setValue(500, 255);
cue.setValue(3, 255);
cue.setValue(4, 255);
cue.setValue(11, 255); // LTP
cue.setFadeInSpeed(60);
cue.setFadeOutSpeed(80);
cs.appendCue(cue);
cs.preRun();
// Do nothing with invalid cue indices
cs.switchCue(-1, -1, ua);
QCOMPARE(cs.m_fader->channels().size(), 0);
cs.switchCue(-1, 3, ua);
QCOMPARE(cs.m_fader->channels().size(), 0);
// Switch to cue one
cs.switchCue(3, 0, ua);
QCOMPARE(cs.m_fader->channels().size(), 5);
FadeChannel fc;
fc.setChannel(0);
QCOMPARE(cs.m_fader->channels()[fc].start(), uchar(0));
QCOMPARE(cs.m_fader->channels()[fc].current(), uchar(0));
QCOMPARE(cs.m_fader->channels()[fc].target(), uchar(255));
QCOMPARE(cs.m_fader->channels()[fc].channel(), uint(0));
QCOMPARE(cs.m_fader->channels()[fc].fadeTime(), uint(20));
fc.setChannel(1);
QCOMPARE(cs.m_fader->channels()[fc].start(), uchar(0));
QCOMPARE(cs.m_fader->channels()[fc].current(), uchar(0));
QCOMPARE(cs.m_fader->channels()[fc].target(), uchar(255));
QCOMPARE(cs.m_fader->channels()[fc].channel(), uint(1));
QCOMPARE(cs.m_fader->channels()[fc].fadeTime(), uint(20));
fc.setChannel(10);
QCOMPARE(cs.m_fader->channels()[fc].start(), uchar(0));
QCOMPARE(cs.m_fader->channels()[fc].current(), uchar(0));
QCOMPARE(cs.m_fader->channels()[fc].target(), uchar(255));
QCOMPARE(cs.m_fader->channels()[fc].channel(), uint(10));
QCOMPARE(cs.m_fader->channels()[fc].fadeTime(), uint(20));
fc.setChannel(11);
QCOMPARE(cs.m_fader->channels()[fc].start(), uchar(0));
QCOMPARE(cs.m_fader->channels()[fc].current(), uchar(0));
QCOMPARE(cs.m_fader->channels()[fc].target(), uchar(255));
QCOMPARE(cs.m_fader->channels()[fc].channel(), uint(11));
QCOMPARE(cs.m_fader->channels()[fc].fadeTime(), uint(20));
fc.setChannel(500);
QCOMPARE(cs.m_fader->channels()[fc].start(), uchar(0));
QCOMPARE(cs.m_fader->channels()[fc].current(), uchar(0));
QCOMPARE(cs.m_fader->channels()[fc].target(), uchar(255));
QCOMPARE(cs.m_fader->channels()[fc].channel(), uint(500));
QCOMPARE(cs.m_fader->channels()[fc].fadeTime(), uint(20));
fc.setChannel(3);
QCOMPARE(cs.m_fader->channels()[fc].channel(), QLCChannel::invalid());
fc.setChannel(4);
QCOMPARE(cs.m_fader->channels()[fc].channel(), QLCChannel::invalid());
fc.setChannel(0);
cs.m_fader->m_channels[fc].setCurrent(127);
fc.setChannel(1);
//.........这里部分代码省略.........