本文整理汇总了C++中IOPluginStub类的典型用法代码示例。如果您正苦于以下问题:C++ IOPluginStub类的具体用法?C++ IOPluginStub怎么用?C++ IOPluginStub使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IOPluginStub类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: iom
void InputOutputMap_Test::universeNames()
{
InputOutputMap iom(m_doc, 4);
QCOMPARE(quint32(iom.universeNames().size()), iom.universes());
QVERIFY(iom.universeNames().at(0).contains("Universe"));
QVERIFY(iom.universeNames().at(1).contains("Universe"));
QVERIFY(iom.universeNames().at(2).contains("Universe"));
QVERIFY(iom.universeNames().at(3).contains("Universe"));
IOPluginStub* stub = static_cast<IOPluginStub*>
(m_doc->ioPluginCache()->plugins().at(0));
QVERIFY(stub != NULL);
iom.setOutputPatch(0, stub->name(), 3);
QCOMPARE(quint32(iom.universeNames().size()), iom.universes());
QCOMPARE(iom.universeNames().at(0), QString("Universe 1"));
QCOMPARE(iom.universeNames().at(1), QString("Universe 2"));
QCOMPARE(iom.universeNames().at(2), QString("Universe 3"));
QCOMPARE(iom.universeNames().at(3), QString("Universe 4"));
iom.setOutputPatch(3, stub->name(), 2);
QCOMPARE(quint32(iom.universeNames().size()), iom.universes());
QCOMPARE(iom.universeNames().at(0), QString("Universe 1"));
QCOMPARE(iom.universeNames().at(1), QString("Universe 2"));
QCOMPARE(iom.universeNames().at(2), QString("Universe 3"));
QCOMPARE(iom.universeNames().at(3), QString("Universe 4"));
}
示例2: om
void InputOutputMap_Test::pluginOutputs()
{
InputOutputMap om(m_doc, 4);
IOPluginStub* stub = static_cast<IOPluginStub*>
(m_doc->ioPluginCache()->plugins().at(0));
QVERIFY(stub != NULL);
QStringList ls(om.pluginOutputs(stub->name()));
QVERIFY(ls == stub->outputs());
QVERIFY(om.pluginOutputs("Foobar").isEmpty() == true);
}
示例3: im
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());
}
示例4: im
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);
}
示例5: iom
void InputOutputMap_Test::setOutputPatch()
{
InputOutputMap iom(m_doc, 4);
IOPluginStub* stub = static_cast<IOPluginStub*>
(m_doc->ioPluginCache()->plugins().at(0));
QVERIFY(stub != NULL);
QVERIFY(iom.setOutputPatch(0, "Foobar", 0) == true);
QVERIFY(iom.outputPatch(0)->plugin() == NULL);
QVERIFY(iom.outputPatch(0)->output() == QLCIOPlugin::invalidLine());
QVERIFY(iom.outputPatch(1) == NULL);
QVERIFY(iom.outputPatch(2) == NULL);
QVERIFY(iom.outputPatch(3) == NULL);
QVERIFY(iom.setOutputPatch(4, stub->name(), 0) == false);
QVERIFY(iom.outputPatch(0)->plugin() == NULL);
QVERIFY(iom.outputPatch(0)->output() == QLCIOPlugin::invalidLine());
QVERIFY(iom.outputPatch(1) == NULL);
QVERIFY(iom.outputPatch(2) == NULL);
QVERIFY(iom.outputPatch(3) == NULL);
QVERIFY(iom.setOutputPatch(4, stub->name(), 4) == false);
QVERIFY(iom.outputPatch(0)->plugin() == NULL);
QVERIFY(iom.outputPatch(0)->output() == QLCIOPlugin::invalidLine());
QVERIFY(iom.outputPatch(1) == NULL);
QVERIFY(iom.outputPatch(2) == NULL);
QVERIFY(iom.outputPatch(3) == NULL);
QVERIFY(iom.setOutputPatch(3, stub->name(), 0) == true);
QVERIFY(iom.outputPatch(3)->plugin() == stub);
QVERIFY(iom.outputPatch(3)->output() == 0);
QVERIFY(iom.setOutputPatch(2, stub->name(), 1) == true);
QVERIFY(iom.outputPatch(2)->plugin() == stub);
QVERIFY(iom.outputPatch(2)->output() == 1);
QVERIFY(iom.setOutputPatch(1, stub->name(), 2) == true);
QVERIFY(iom.outputPatch(1)->plugin() == stub);
QVERIFY(iom.outputPatch(1)->output() == 2);
QVERIFY(iom.setOutputPatch(0, stub->name(), 3) == true);
QVERIFY(iom.outputPatch(0)->plugin() == stub);
QVERIFY(iom.outputPatch(0)->output() == 3);
}