本文整理汇总了C++中IOPluginStub::inputs方法的典型用法代码示例。如果您正苦于以下问题:C++ IOPluginStub::inputs方法的具体用法?C++ IOPluginStub::inputs怎么用?C++ IOPluginStub::inputs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IOPluginStub
的用法示例。
在下文中一共展示了IOPluginStub::inputs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: patch
void InputPatch_Test::patch()
{
InputOutputMap im(m_doc, 4);
QCOMPARE(m_doc->ioPluginCache()->plugins().size(), 1);
IOPluginStub* stub = static_cast<IOPluginStub*> (m_doc->ioPluginCache()->plugins().at(0));
QVERIFY(stub != NULL);
QLCInputProfile prof1;
prof1.setManufacturer("Foo");
prof1.setManufacturer("Bar");
InputPatch* ip = new InputPatch(0, this);
ip->set(stub, 0, &prof1);
QVERIFY(ip->m_plugin == stub);
QVERIFY(ip->m_pluginLine == 0);
QVERIFY(ip->m_profile == &prof1);
QVERIFY(ip->pluginName() == stub->name());
QVERIFY(ip->inputName() == stub->inputs()[0]);
QVERIFY(ip->profileName() == prof1.name());
QVERIFY(stub->m_openInputs.size() == 1);
QVERIFY(stub->m_openInputs.at(0) == 0);
QLCInputProfile prof2;
prof2.setManufacturer("Xyzzy");
prof2.setManufacturer("Foobar");
ip->set(stub, 3, &prof2);
QVERIFY(ip->m_plugin == stub);
QVERIFY(ip->m_pluginLine == 3);
QVERIFY(ip->m_profile == &prof2);
QVERIFY(ip->pluginName() == stub->name());
QVERIFY(ip->inputName() == stub->inputs()[3]);
QVERIFY(ip->profileName() == prof2.name());
QVERIFY(stub->m_openInputs.size() == 1);
QVERIFY(stub->m_openInputs.at(0) == 3);
ip->reconnect();
QVERIFY(ip->m_plugin == stub);
QVERIFY(ip->m_pluginLine == 3);
QVERIFY(ip->m_profile == &prof2);
QVERIFY(ip->pluginName() == stub->name());
QVERIFY(ip->inputName() == stub->inputs()[3]);
QVERIFY(ip->profileName() == prof2.name());
QVERIFY(stub->m_openInputs.size() == 1);
QVERIFY(stub->m_openInputs.at(0) == 3);
delete ip;
QVERIFY(stub->m_openInputs.size() == 0);
}
示例2: pluginInputs
void InputOutputMap_Test::pluginInputs()
{
InputOutputMap im(m_doc, 4);
QVERIFY(im.pluginInputs("Foo").size() == 0);
IOPluginStub* stub = static_cast<IOPluginStub*>
(m_doc->ioPluginCache()->plugins().at(0));
QVERIFY(stub != NULL);
QVERIFY(im.pluginInputs(stub->name()).size() == 4);
QVERIFY(im.pluginInputs(stub->name()) == stub->inputs());
}