本文整理汇总了C++中QLCInputProfile::remapChannel方法的典型用法代码示例。如果您正苦于以下问题:C++ QLCInputProfile::remapChannel方法的具体用法?C++ QLCInputProfile::remapChannel怎么用?C++ QLCInputProfile::remapChannel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QLCInputProfile
的用法示例。
在下文中一共展示了QLCInputProfile::remapChannel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: remapChannel
void QLCInputProfile_Test::remapChannel()
{
QLCInputProfile ip;
QLCInputChannel* ich1 = new QLCInputChannel();
ich1->setName("Foobar");
ip.insertChannel(0, ich1);
QVERIFY(ip.channel(0) == ich1);
QLCInputChannel* ich2 = new QLCInputChannel();
ip.insertChannel(5, ich2);
QVERIFY(ip.channel(0) == ich1);
QVERIFY(ip.channel(5) == ich2);
QVERIFY(ip.remapChannel(ich1, 9000) == true);
QVERIFY(ip.channel(0) == NULL);
QVERIFY(ip.channel(5) == ich2);
QVERIFY(ip.channel(9000) == ich1);
QVERIFY(ip.channel(9000)->name() == "Foobar");
QVERIFY(ip.remapChannel(NULL, 9000) == false);
QVERIFY(ip.channels().size() == 2);
QVERIFY(ip.channel(0) == NULL);
QVERIFY(ip.channel(5) == ich2);
QVERIFY(ip.channel(9000) == ich1);
QVERIFY(ip.channel(9000)->name() == "Foobar");
QLCInputChannel* ich3 = new QLCInputChannel();
QVERIFY(ip.remapChannel(ich3, 5) == false);
QVERIFY(ip.channels().size() == 2);
QVERIFY(ip.channel(0) == NULL);
QVERIFY(ip.channel(5) == ich2);
QVERIFY(ip.channel(9000) == ich1);
QVERIFY(ip.channel(9000)->name() == "Foobar");
delete ich3;
}