本文整理汇总了C++中Fixture::createConsole方法的典型用法代码示例。如果您正苦于以下问题:C++ Fixture::createConsole方法的具体用法?C++ Fixture::createConsole怎么用?C++ Fixture::createConsole使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fixture
的用法示例。
在下文中一共展示了Fixture::createConsole方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loader
//.........这里部分代码省略.........
{
channels = tag.text().toInt();
}
else if (tag.tagName() == KXMLQLCFixtureConsole)
{
consoletag = tag;
}
else
{
qDebug("Unknown fixture instance tag: %s",
(const char*) tag.tagName());
}
node = node.nextSibling();
}
/* Find the given fixture definition */
fixtureDef = _app->fixtureDef(manufacturer, model);
if (fixtureDef == NULL)
{
qWarning("Fixture definition for [%s - %s] not found!",
(const char*) manufacturer, (const char*) model);
}
else
{
/* Find the given fixture mode */
fixtureMode = fixtureDef->mode(modeName);
if (fixtureMode == NULL)
{
qWarning("Fixture mode [%s] for [%s - %s] not found!",
(const char*) modeName,
(const char*) manufacturer,
(const char*) model);
}
}
/* Number of channels */
if (channels <= 0 || channels > KFixtureChannelsMax)
{
qWarning("Fixture <%s> channels %d out of bounds (%d - %d)!",
(const char*) name, channels, 1, KFixtureChannelsMax);
channels = 1;
}
/* Make sure that address is something sensible */
if (address > 511 || address + (channels - 1) > 511)
{
qWarning("Fixture channel range %d - %d out of DMX " \
"bounds (%d - %d)!",
address + 1, address + channels, 1, 512);
address = 0;
}
/* Make sure that universe is something sensible */
if (universe > KUniverseCount)
{
qWarning("Fixture universe %d out of bounds (%d - %d)!",
universe, 0, KUniverseCount);
universe = 0;
}
/* Check that we have a sensible ID, otherwise we can't continue */
if (id < 0 || id > KFixtureArraySize)
{
qWarning("Fixture ID %d out of bounds (%d - %d)!",
id, 0, KFixtureArraySize);
return NULL;
}
/* Create the fixture */
if (fixtureDef != NULL && fixtureMode != NULL)
{
/* Create a normal fixture */
fxi = new Fixture(fixtureDef, fixtureMode, address, universe,
name, id);
}
else
{
/* Create a generic fixture */
fxi = new Fixture(address, universe, channels, name, id);
}
/* Insert the fixture to Doc's fixture array */
if (_app->doc()->newFixture(fxi) == false)
{
delete fxi;
fxi = NULL;
}
else
{
/* Load the fixture's console settings */
if (consoletag.tagName() == KXMLQLCFixtureConsole)
{
if (fxi->createConsole() == true)
fxi->m_console->loadXML(doc, &tag);
}
}
return fxi;
}