本文整理汇总了C++中Led::timeAxis方法的典型用法代码示例。如果您正苦于以下问题:C++ Led::timeAxis方法的具体用法?C++ Led::timeAxis怎么用?C++ Led::timeAxis使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Led
的用法示例。
在下文中一共展示了Led::timeAxis方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addTimeAxis
void LedTests::addTimeAxis() {
iAnimation->addTimeAxis(0, 100, 100, kPriorityLow, false);
Led* led = new Led(iAnimation,
*iAnimation,
1,
Position(0,0),
NULL);
led->addTimeAxis();
QVERIFY(led->timeAxis() != NULL);
}
示例2: addValueAxis
void LedTests::addValueAxis() {
QFETCH(int, numValueAxes);
QFETCH(bool, addTimeAxis);
QFETCH(int, currentFrameNum);
Led* led = new Led(iAnimation,
*iAnimation,
1,
Position(0,0),
NULL);
/*if(addTimeAxis) {
led->addTimeAxis();
}*/
if(addTimeAxis) {
iAnimation->addTimeAxis(0, 100, 100, kPriorityLow, false);
//iAnimation->timeAxis()->setCurrentFrame(currentFrameNum);
}
for(int i = 0; i < numValueAxes; i++) {
iAnimation->addValueAxis(-10, 10, 0, kPriorityLow, false);
}
for(int i = 0; i < numValueAxes; i++) {
//led->addValueAxis(i);
QCOMPARE(led->axisAt(i).axis().lowValue(), iAnimation->axisAt(i).lowValue());
QCOMPARE(led->axisAt(i).axis().highValue(), iAnimation->axisAt(i).highValue());
QCOMPARE(led->axisAt(i).axis().zeroValue(), iAnimation->axisAt(i).zeroValue());
QCOMPARE(led->axisAt(i).axis().priority(), iAnimation->axisAt(i).priority());
QCOMPARE(led->axisAt(i).axis().isOpaque(), iAnimation->axisAt(i).isOpaque());
if(addTimeAxis) {
ValueAxisData& axis = led->axisAt(i);
QCOMPARE(static_cast<const LinkedValue&>(axis.frameAt(axis.axis().zeroValue()).value()).colour(),
static_cast<const ColourValue&>(led->timeAxis()->currentFrame().value()).colour());
}
}
}