本文整理汇总了C++中EFXFixture::head方法的典型用法代码示例。如果您正苦于以下问题:C++ EFXFixture::head方法的具体用法?C++ EFXFixture::head怎么用?C++ EFXFixture::head使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EFXFixture
的用法示例。
在下文中一共展示了EFXFixture::head方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeFixture
bool EFX::removeFixture(quint32 fxi, int head)
{
for (int i = 0; i < m_fixtures.count(); i++)
{
EFXFixture *ef = m_fixtures.at(i);
if (ef->head().fxi == fxi && ef->head().head == head)
{
m_fixtures.removeAt(i);
return true;
}
}
return false;
}
示例2: loadXML
bool EFX::loadXML(QXmlStreamReader &root)
{
if (root.name() != KXMLQLCFunction)
{
qWarning() << "Function node not found!";
return false;
}
if (root.attributes().value(KXMLQLCFunctionType).toString() != typeToString(Function::EFX))
{
qWarning("Function is not an EFX!");
return false;
}
/* Load EFX contents */
while (root.readNextStartElement())
{
if (root.name() == KXMLQLCBus)
{
/* Bus */
QString str = root.attributes().value(KXMLQLCBusRole).toString();
if (str == KXMLQLCBusFade)
m_legacyFadeBus = root.readElementText().toUInt();
else if (str == KXMLQLCBusHold)
m_legacyHoldBus = root.readElementText().toUInt();
}
else if (root.name() == KXMLQLCFunctionSpeed)
{
loadXMLSpeed(root);
}
else if (root.name() == KXMLQLCEFXFixture)
{
EFXFixture* ef = new EFXFixture(this);
ef->loadXML(root);
if (ef->head().isValid())
{
if (addFixture(ef) == false)
delete ef;
}
}
else if (root.name() == KXMLQLCEFXPropagationMode)
{
/* Propagation mode */
setPropagationMode(stringToPropagationMode(root.readElementText()));
}
else if (root.name() == KXMLQLCEFXAlgorithm)
{
/* Algorithm */
setAlgorithm(stringToAlgorithm(root.readElementText()));
}
else if (root.name() == KXMLQLCFunctionDirection)
{
loadXMLDirection(root);
}
else if (root.name() == KXMLQLCFunctionRunOrder)
{
loadXMLRunOrder(root);
}
else if (root.name() == KXMLQLCEFXWidth)
{
/* Width */
setWidth(root.readElementText().toInt());
}
else if (root.name() == KXMLQLCEFXHeight)
{
/* Height */
setHeight(root.readElementText().toInt());
}
else if (root.name() == KXMLQLCEFXRotation)
{
/* Rotation */
setRotation(root.readElementText().toInt());
}
else if (root.name() == KXMLQLCEFXStartOffset)
{
/* StartOffset */
setStartOffset(root.readElementText().toInt());
}
else if (root.name() == KXMLQLCEFXIsRelative)
{
/* IsRelative */
setIsRelative(root.readElementText().toInt() != 0);
}
else if (root.name() == KXMLQLCEFXAxis)
{
/* Axes */
loadXMLAxis(root);
}
else
{
qWarning() << "Unknown EFX tag:" << root.name();
root.skipCurrentElement();
}
}
return true;
}
示例3: loadXML
bool EFX::loadXML(const QDomElement& root)
{
if (root.tagName() != KXMLQLCFunction)
{
qWarning() << "Function node not found!";
return false;
}
if (root.attribute(KXMLQLCFunctionType) != typeToString(Function::EFX))
{
qWarning("Function is not an EFX!");
return false;
}
/* Load EFX contents */
QDomNode node = root.firstChild();
while (node.isNull() == false)
{
QDomElement tag = node.toElement();
if (tag.tagName() == KXMLQLCBus)
{
/* Bus */
QString str = tag.attribute(KXMLQLCBusRole);
if (str == KXMLQLCBusFade)
m_legacyFadeBus = tag.text().toUInt();
else if (str == KXMLQLCBusHold)
m_legacyHoldBus = tag.text().toUInt();
}
else if (tag.tagName() == KXMLQLCFunctionSpeed)
{
loadXMLSpeed(tag);
}
else if (tag.tagName() == KXMLQLCEFXFixture)
{
EFXFixture* ef = new EFXFixture(this);
ef->loadXML(tag);
if (ef->head().isValid())
{
if (addFixture(ef) == false)
delete ef;
}
}
else if (tag.tagName() == KXMLQLCEFXPropagationMode)
{
/* Propagation mode */
setPropagationMode(stringToPropagationMode(tag.text()));
}
else if (tag.tagName() == KXMLQLCEFXAlgorithm)
{
/* Algorithm */
setAlgorithm(stringToAlgorithm(tag.text()));
}
else if (tag.tagName() == KXMLQLCFunctionDirection)
{
loadXMLDirection(tag);
}
else if (tag.tagName() == KXMLQLCFunctionRunOrder)
{
loadXMLRunOrder(tag);
}
else if (tag.tagName() == KXMLQLCEFXWidth)
{
/* Width */
setWidth(tag.text().toInt());
}
else if (tag.tagName() == KXMLQLCEFXHeight)
{
/* Height */
setHeight(tag.text().toInt());
}
else if (tag.tagName() == KXMLQLCEFXRotation)
{
/* Rotation */
setRotation(tag.text().toInt());
}
else if (tag.tagName() == KXMLQLCEFXStartOffset)
{
/* StartOffset */
setStartOffset(tag.text().toInt());
}
else if (tag.tagName() == KXMLQLCEFXIsRelative)
{
/* IsRelative */
setIsRelative(tag.text().toInt() != 0);
}
else if (tag.tagName() == KXMLQLCEFXAxis)
{
/* Axes */
loadXMLAxis(tag);
}
else
{
qWarning() << "Unknown EFX tag:" << tag.tagName();
}
node = node.nextSibling();
}
return true;
//.........这里部分代码省略.........