本文整理汇总了C++中FixtureGroup::id方法的典型用法代码示例。如果您正苦于以下问题:C++ FixtureGroup::id方法的具体用法?C++ FixtureGroup::id怎么用?C++ FixtureGroup::id使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FixtureGroup
的用法示例。
在下文中一共展示了FixtureGroup::id方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addFixtureGroup
void Doc_Test::addFixtureGroup()
{
QSignalSpy spy(m_doc, SIGNAL(fixtureGroupAdded(quint32)));
QCOMPARE(m_doc->fixtureGroups().size(), 0);
QCOMPARE(m_doc->m_latestFixtureGroupId, quint32(0));
FixtureGroup* grp = new FixtureGroup(m_doc);
QCOMPARE(m_doc->addFixtureGroup(grp), true);
QCOMPARE(grp->id(), quint32(0));
QCOMPARE(m_doc->m_latestFixtureGroupId, quint32(0));
QCOMPARE(m_doc->fixtureGroups().size(), 1);
QCOMPARE(spy.size(), 1);
QCOMPARE(spy[0].size(), 1);
QCOMPARE(spy[0][0].toUInt(), quint32(0));
QCOMPARE(m_doc->addFixtureGroup(grp, 0), false);
QCOMPARE(m_doc->fixtureGroups().size(), 1);
grp = new FixtureGroup(m_doc);
QCOMPARE(m_doc->addFixtureGroup(grp, 0), false);
QCOMPARE(m_doc->addFixtureGroup(grp, 15), true);
QCOMPARE(m_doc->m_latestFixtureGroupId, quint32(0));
QCOMPARE(m_doc->fixtureGroups().size(), 2);
QCOMPARE(spy.size(), 2);
QCOMPARE(spy[1].size(), 1);
QCOMPARE(spy[1][0].toUInt(), quint32(15));
grp = new FixtureGroup(m_doc);
QCOMPARE(m_doc->addFixtureGroup(grp), true);
QCOMPARE(grp->id(), quint32(1));
QCOMPARE(m_doc->m_latestFixtureGroupId, quint32(1));
QCOMPARE(m_doc->fixtureGroups().size(), 3);
QCOMPARE(spy.size(), 3);
QCOMPARE(spy[2].size(), 1);
QCOMPARE(spy[2][0].toUInt(), quint32(1));
}
示例2: clearContents
void Doc::clearContents()
{
emit clearing();
// Delete all function instances
QListIterator <quint32> funcit(m_functions.keys());
while (funcit.hasNext() == true)
{
Function* func = m_functions.take(funcit.next());
emit functionRemoved(func->id());
delete func;
}
// Delete all fixture instances
QListIterator <quint32> fxit(m_fixtures.keys());
while (fxit.hasNext() == true)
{
Fixture* fxi = m_fixtures.take(fxit.next());
emit fixtureRemoved(fxi->id());
delete fxi;
}
// Delete all fixture groups
QListIterator <quint32> grpit(m_fixtureGroups.keys());
while (grpit.hasNext() == true)
{
FixtureGroup* grp = m_fixtureGroups.take(grpit.next());
emit fixtureGroupRemoved(grp->id());
delete grp;
}
m_latestFunctionId = 0;
m_latestFixtureId = 0;
m_latestFixtureGroupId = 0;
m_addresses.clear();
emit cleared();
}
示例3: clearContents
void Doc::clearContents()
{
emit clearing();
m_clipboard->resetContents();
if (m_monitorProps != NULL)
m_monitorProps->reset();
destroyAudioCapture();
// Delete all function instances
QListIterator <quint32> funcit(m_functions.keys());
while (funcit.hasNext() == true)
{
Function* func = m_functions.take(funcit.next());
if (func == NULL)
continue;
emit functionRemoved(func->id());
delete func;
}
// Delete all fixture groups
QListIterator <quint32> grpit(m_fixtureGroups.keys());
while (grpit.hasNext() == true)
{
FixtureGroup* grp = m_fixtureGroups.take(grpit.next());
quint32 grpID = grp->id();
delete grp;
emit fixtureGroupRemoved(grpID);
}
// Delete all fixture instances
QListIterator <quint32> fxit(m_fixtures.keys());
while (fxit.hasNext() == true)
{
Fixture* fxi = m_fixtures.take(fxit.next());
quint32 fxID = fxi->id();
delete fxi;
emit fixtureRemoved(fxID);
}
// Delete all channels groups
QListIterator <quint32> grpchans(m_channelsGroups.keys());
while (grpchans.hasNext() == true)
{
ChannelsGroup* grp = m_channelsGroups.take(grpchans.next());
emit channelsGroupRemoved(grp->id());
delete grp;
}
m_orderedGroups.clear();
m_latestFunctionId = 0;
m_latestFixtureId = 0;
m_latestFixtureGroupId = 0;
m_latestChannelsGroupId = 0;
m_addresses.clear();
emit cleared();
}