本文整理汇总了C++中QLCFixtureDef::definitionSourceFile方法的典型用法代码示例。如果您正苦于以下问题:C++ QLCFixtureDef::definitionSourceFile方法的具体用法?C++ QLCFixtureDef::definitionSourceFile怎么用?C++ QLCFixtureDef::definitionSourceFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QLCFixtureDef
的用法示例。
在下文中一共展示了QLCFixtureDef::definitionSourceFile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fixtureDef
void QLCFixtureDefCache_Test::fixtureDef()
{
// check the content of a cached fixture relative path
QString firstManufacturer = cache.m_defs.first()->manufacturer();
QString firstModel = cache.m_defs.first()->model();
QString relPath = QString("%1/%1-%2.qxf").arg(firstManufacturer).arg(firstModel);
relPath.replace(" ", "-");
QVERIFY(cache.m_defs.first()->definitionSourceFile() == relPath);
// request a fixture cached but not yet loaded
QLCFixtureDef *def = cache.fixtureDef("Futurelight", "CY-200");
// check that once loaded, the relative path is reset
QVERIFY(def->definitionSourceFile().isEmpty());
cache.clear();
QLCFixtureDef *def1 = new QLCFixtureDef();
def1->setManufacturer("Martin");
def1->setModel("MAC250");
cache.addFixtureDef(def1);
QLCFixtureDef *def2 = new QLCFixtureDef();
def2->setManufacturer("Martin");
def2->setModel("MAC500");
cache.addFixtureDef(def2);
QLCFixtureDef *def3 = new QLCFixtureDef();
def3->setManufacturer("Robe");
def3->setModel("WL250");
cache.addFixtureDef(def3);
QLCFixtureDef *def4 = new QLCFixtureDef();
def4->setManufacturer("Futurelight");
def4->setModel("DJ Scan 250");
cache.addFixtureDef(def4);
QVERIFY(cache.fixtureDef("Martin", "MAC250") == def1);
QVERIFY(cache.fixtureDef("Martin", "MAC500") == def2);
QVERIFY(cache.fixtureDef("Robe", "WL250") == def3);
QVERIFY(cache.fixtureDef("Futurelight", "DJ Scan 250") == def4);
QVERIFY(cache.fixtureDef("Martin", "MAC 250") == NULL);
QVERIFY(cache.fixtureDef("Mar tin", "MAC250") == NULL);
QVERIFY(cache.fixtureDef("Foobar", "Foobar") == NULL);
QVERIFY(cache.fixtureDef("", "") == NULL);
}