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