本文整理汇总了C++中QLCInputProfile::setManufacturer方法的典型用法代码示例。如果您正苦于以下问题:C++ QLCInputProfile::setManufacturer方法的具体用法?C++ QLCInputProfile::setManufacturer怎么用?C++ QLCInputProfile::setManufacturer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QLCInputProfile
的用法示例。
在下文中一共展示了QLCInputProfile::setManufacturer方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: manufacturer
void QLCInputProfile_Test::manufacturer()
{
QLCInputProfile ip;
QVERIFY(ip.manufacturer() == QString::null);
ip.setManufacturer("Behringer");
QVERIFY(ip.manufacturer() == "Behringer");
}
示例2: manufacturer
void QLCInputProfile_Test::manufacturer()
{
QLCInputProfile ip;
QVERIFY(ip.manufacturer().isEmpty());
ip.setManufacturer("Behringer");
QVERIFY(ip.manufacturer() == "Behringer");
}
示例3: name
void QLCInputProfile_Test::name()
{
QLCInputProfile ip;
QVERIFY(ip.name() == " ");
ip.setManufacturer("Behringer");
QVERIFY(ip.name() == "Behringer ");
ip.setModel("BCF2000");
QVERIFY(ip.name() == "Behringer BCF2000");
}
示例4: assign
void QLCInputProfile_Test::assign()
{
QLCInputProfile ip;
ip.setManufacturer("Behringer");
ip.setModel("BCF2000");
QLCInputChannel* ich1 = new QLCInputChannel;
ich1->setName("Channel 1");
ip.insertChannel(0, ich1);
QLCInputChannel* ich2 = new QLCInputChannel;
ich2->setName("Channel 2");
ip.insertChannel(5, ich2);
QLCInputChannel* ich3 = new QLCInputChannel;
ich3->setName("Channel 3");
ip.insertChannel(2, ich3);
QLCInputChannel* ich4 = new QLCInputChannel;
ich4->setName("Channel 4");
ip.insertChannel(9000, ich4);
QLCInputProfile ip2;
QLCInputChannel* ich5 = new QLCInputChannel;
ich5->setName("First channel");
ip2.insertChannel(0, ich5);
QCOMPARE(ip2.channels().size(), 1);
/* Test the assignment operator */
ip2 = ip;
QCOMPARE(ip2.channels().size(), 4);
QVERIFY(ip2.channel(0) != NULL);
QVERIFY(ip2.channel(0) != ich1);
QVERIFY(ip2.channel(0) != ip.channel(0));
QCOMPARE(ip2.channel(0)->name(), QString("Channel 1"));
QVERIFY(ip2.channel(5) != NULL);
QVERIFY(ip2.channel(5) != ich2);
QVERIFY(ip2.channel(5) != ip.channel(5));
QCOMPARE(ip2.channel(5)->name(), QString("Channel 2"));
QVERIFY(ip2.channel(2) != NULL);
QVERIFY(ip2.channel(2) != ich3);
QVERIFY(ip2.channel(2) != ip.channel(2));
QCOMPARE(ip2.channel(2)->name(), QString("Channel 3"));
QVERIFY(ip2.channel(9000) != NULL);
QVERIFY(ip2.channel(9000) != ich4);
QVERIFY(ip2.channel(9000) != ip.channel(9000));
QCOMPARE(ip2.channel(9000)->name(), QString("Channel 4"));
}
示例5: copy
void QLCInputProfile_Test::copy()
{
QLCInputProfile ip;
ip.setManufacturer("Behringer");
ip.setModel("BCF2000");
QLCInputChannel* ich1 = new QLCInputChannel();
ich1->setName("Channel 1");
ip.insertChannel(0, ich1);
QLCInputChannel* ich2 = new QLCInputChannel();
ich2->setName("Channel 2");
ip.insertChannel(5, ich2);
QLCInputChannel* ich3 = new QLCInputChannel();
ich3->setName("Channel 3");
ip.insertChannel(2, ich3);
QLCInputChannel* ich4 = new QLCInputChannel();
ich4->setName("Channel 4");
ip.insertChannel(9000, ich4);
QLCInputProfile copy = ip;
QVERIFY(copy.manufacturer() == "Behringer");
QVERIFY(copy.model() == "BCF2000");
QVERIFY(copy.channels().size() == 4);
/* Verify that it's a deep copy */
QVERIFY(copy.channel(0) != ich1);
QVERIFY(copy.channel(0) != NULL);
QVERIFY(copy.channel(0)->name() == "Channel 1");
QVERIFY(copy.channel(5) != ich2);
QVERIFY(copy.channel(5) != NULL);
QVERIFY(copy.channel(5)->name() == "Channel 2");
QVERIFY(copy.channel(2) != ich3);
QVERIFY(copy.channel(2) != NULL);
QVERIFY(copy.channel(2)->name() == "Channel 3");
QVERIFY(copy.channel(9000) != ich4);
QVERIFY(copy.channel(9000) != NULL);
QVERIFY(copy.channel(9000)->name() == "Channel 4");
}
示例6: save
void QLCInputProfile_Test::save()
{
QLCInputProfile ip;
ip.setManufacturer("TestManufacturer");
ip.setModel("TestModel");
QLCInputChannel* ich1 = new QLCInputChannel();
ich1->setName("Channel 1");
ip.insertChannel(0, ich1);
QLCInputChannel* ich2 = new QLCInputChannel();
ich2->setName("Channel 2");
ip.insertChannel(5, ich2);
QLCInputChannel* ich3 = new QLCInputChannel();
ich3->setName("Channel 3");
ip.insertChannel(2, ich3);
QString path("test.qxi");
QVERIFY(ip.saveXML(path) == true);
#if !defined(WIN32) && !defined(Q_OS_WIN)
QFile::Permissions perm = QFile::permissions(path);
QFile::setPermissions(path, 0);
QVERIFY(ip.saveXML(path) == false);
QFile::setPermissions(path, perm);
#endif
QLCInputProfile* prof = QLCInputProfile::loader(path);
QVERIFY(prof != NULL);
QCOMPARE(prof->manufacturer(), ip.manufacturer());
QCOMPARE(prof->model(), ip.model());
QCOMPARE(prof->name(), ip.name());
QCOMPARE(prof->channels().size(), ip.channels().size());
QCOMPARE(prof->channels()[0]->name(), ich1->name());
QCOMPARE(prof->channels()[2]->name(), ich3->name());
QCOMPARE(prof->channels()[5]->name(), ich2->name());
QVERIFY(QFile::remove(path) == true);
delete prof;
}
示例7: profiles
void InputMap_Test::profiles()
{
InputMap im(m_doc, 4);
QVERIFY(im.m_profiles.size() == 0);
QLCInputProfile* prof = new QLCInputProfile();
prof->setManufacturer("Foo");
prof->setModel("Bar");
QVERIFY(im.addProfile(prof) == true);
QVERIFY(im.m_profiles.size() == 1);
QVERIFY(im.addProfile(prof) == false);
QVERIFY(im.m_profiles.size() == 1);
QVERIFY(im.profileNames().size() == 1);
QVERIFY(im.profileNames().at(0) == prof->name());
QVERIFY(im.profile(prof->name()) == prof);
QVERIFY(im.profile("Foobar") == NULL);
QVERIFY(im.removeProfile("Foobar") == false);
QVERIFY(im.m_profiles.size() == 1);
QVERIFY(im.removeProfile(prof->name()) == true);
QVERIFY(im.m_profiles.size() == 0);
}
示例8: setPatch
void InputMap_Test::setPatch()
{
InputMap im(m_doc, 4);
OutputPluginStub* stub = static_cast<OutputPluginStub*>
(m_doc->ioPluginCache()->plugins().at(0));
QVERIFY(stub != NULL);
QLCInputProfile* prof = new QLCInputProfile();
prof->setManufacturer("Foo");
prof->setModel("Bar");
im.addProfile(prof);
QVERIFY(im.patch(0)->plugin() == NULL);
QVERIFY(im.patch(0)->input() == QLCIOPlugin::invalidLine());
QVERIFY(im.patch(0)->profile() == NULL);
QVERIFY(im.mapping(stub->name(), 0) == InputMap::invalidUniverse());
QVERIFY(im.patch(1)->plugin() == NULL);
QVERIFY(im.patch(1)->input() == QLCIOPlugin::invalidLine());
QVERIFY(im.patch(1)->profile() == NULL);
QVERIFY(im.mapping(stub->name(), 1) == InputMap::invalidUniverse());
QVERIFY(im.patch(2)->plugin() == NULL);
QVERIFY(im.patch(2)->input() == QLCIOPlugin::invalidLine());
QVERIFY(im.patch(2)->profile() == NULL);
QVERIFY(im.mapping(stub->name(), 2) == InputMap::invalidUniverse());
QVERIFY(im.patch(3)->plugin() == NULL);
QVERIFY(im.patch(3)->input() == QLCIOPlugin::invalidLine());
QVERIFY(im.patch(3)->profile() == NULL);
QVERIFY(im.mapping(stub->name(), 3) == InputMap::invalidUniverse());
QVERIFY(im.setPatch(0, "Foobar", 0, prof->name()) == true);
QVERIFY(im.patch(0)->plugin() == NULL);
QVERIFY(im.patch(0)->input() == QLCIOPlugin::invalidLine());
QVERIFY(im.patch(0)->profile() == prof);
QVERIFY(im.mapping(stub->name(), 0) == InputMap::invalidUniverse());
QVERIFY(im.patch(1)->plugin() == NULL);
QVERIFY(im.patch(1)->input() == QLCIOPlugin::invalidLine());
QVERIFY(im.patch(1)->profile() == NULL);
QVERIFY(im.mapping(stub->name(), 1) == InputMap::invalidUniverse());
QVERIFY(im.patch(2)->plugin() == NULL);
QVERIFY(im.patch(2)->input() == QLCIOPlugin::invalidLine());
QVERIFY(im.patch(2)->profile() == NULL);
QVERIFY(im.mapping(stub->name(), 2) == InputMap::invalidUniverse());
QVERIFY(im.patch(3)->plugin() == NULL);
QVERIFY(im.patch(3)->input() == QLCIOPlugin::invalidLine());
QVERIFY(im.patch(3)->profile() == NULL);
QVERIFY(im.mapping(stub->name(), 3) == InputMap::invalidUniverse());
QVERIFY(im.setPatch(0, stub->name(), 0) == true);
QVERIFY(im.patch(0)->plugin() == stub);
QVERIFY(im.patch(0)->input() == 0);
QVERIFY(im.patch(0)->profile() == NULL);
QVERIFY(im.mapping(stub->name(), 0) == 0);
QVERIFY(im.patch(1)->plugin() == NULL);
QVERIFY(im.patch(1)->input() == QLCIOPlugin::invalidLine());
QVERIFY(im.patch(1)->profile() == NULL);
QVERIFY(im.mapping(stub->name(), 1) == InputMap::invalidUniverse());
QVERIFY(im.patch(2)->plugin() == NULL);
QVERIFY(im.patch(2)->input() == QLCIOPlugin::invalidLine());
QVERIFY(im.patch(2)->profile() == NULL);
QVERIFY(im.mapping(stub->name(), 2) == InputMap::invalidUniverse());
QVERIFY(im.patch(3)->plugin() == NULL);
QVERIFY(im.patch(3)->input() == QLCIOPlugin::invalidLine());
QVERIFY(im.patch(3)->profile() == NULL);
QVERIFY(im.mapping(stub->name(), 3) == InputMap::invalidUniverse());
QVERIFY(im.setPatch(2, stub->name(), 3, prof->name()) == true);
QVERIFY(im.patch(0)->plugin() == stub);
QVERIFY(im.patch(0)->input() == 0);
QVERIFY(im.patch(0)->profile() == NULL);
QVERIFY(im.mapping(stub->name(), 0) == 0);
QVERIFY(im.patch(1)->plugin() == NULL);
QVERIFY(im.patch(1)->input() == QLCIOPlugin::invalidLine());
QVERIFY(im.patch(1)->profile() == NULL);
QVERIFY(im.mapping(stub->name(), 1) == InputMap::invalidUniverse());
QVERIFY(im.patch(2)->plugin() == stub);
QVERIFY(im.patch(2)->input() == 3);
QVERIFY(im.patch(2)->profile() == prof);
QVERIFY(im.mapping(stub->name(), 2) == InputMap::invalidUniverse());
QVERIFY(im.patch(3)->plugin() == NULL);
QVERIFY(im.patch(3)->input() == QLCIOPlugin::invalidLine());
QVERIFY(im.patch(3)->profile() == NULL);
QVERIFY(im.mapping(stub->name(), 3) == 2);
// Universe out of bounds
QVERIFY(im.setPatch(im.universes(), stub->name(), 0) == false);
}