本文整理汇总了C++中Universe::id方法的典型用法代码示例。如果您正苦于以下问题:C++ Universe::id方法的具体用法?C++ Universe::id怎么用?C++ Universe::id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Universe
的用法示例。
在下文中一共展示了Universe::id方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setBlackout
void InputOutputMap::setBlackout(bool blackout)
{
/* Don't do blackout twice */
if (m_blackout == blackout)
return;
m_blackout = blackout;
if (blackout == true)
{
QByteArray zeros(512, 0);
for (quint32 i = 0; i < universes(); i++)
{
Universe *universe = m_universeArray.at(i);
if (universe->outputPatch() != NULL)
universe->outputPatch()->dump(universe->id(), zeros);
}
}
else
{
/* Force writing of values back to the plugins */
m_universeChanged = true;
}
emit blackoutChanged(m_blackout);
}
示例2: setBlackout
void InputOutputMap::setBlackout(bool blackout)
{
/* Don't do blackout twice */
if (m_blackout == blackout)
return;
QMutexLocker locker(&m_universeMutex);
m_blackout = blackout;
QByteArray zeros(512, 0);
for (quint32 i = 0; i < universesCount(); i++)
{
Universe *universe = m_universeArray.at(i);
if (universe->outputPatch() != NULL)
{
if (blackout == true)
universe->outputPatch()->dump(universe->id(), zeros);
// notify the universe listeners that some channels have changed
}
locker.unlock();
if (blackout == true)
emit universesWritten(i, zeros);
else
{
const QByteArray postGM = universe->postGMValues()->mid(0, universe->usedChannels());
emit universesWritten(i, postGM);
}
locker.relock();
}
emit blackoutChanged(m_blackout);
}
示例3: removeUniverse
bool InputOutputMap::removeUniverse(int index)
{
QMutexLocker locker(&m_universeMutex);
if (index < 0 || index >= m_universeArray.count())
return false;
Universe *delUni = m_universeArray.takeAt(index);
quint32 id = delUni->id();
delete delUni;
if (m_universeArray.count() == 0)
m_latestUniverseId = invalidUniverse();
locker.unlock();
emit universeRemoved(id);
return true;
}