本文整理汇总了C++中TStageObject::getGroupId方法的典型用法代码示例。如果您正苦于以下问题:C++ TStageObject::getGroupId方法的具体用法?C++ TStageObject::getGroupId怎么用?C++ TStageObject::getGroupId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TStageObject
的用法示例。
在下文中一共展示了TStageObject::getGroupId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateScene
void StageSchematicScene::updateScene()
{
clearAllItems();
QPointF firstPos = sceneRect().center();
m_nextNodePos = TPointD(firstPos.x(), firstPos.y());
TStageObjectTree *pegTree = m_xshHandle->getXsheet()->getStageObjectTree();
m_nodeTable.clear();
m_GroupTable.clear();
m_groupEditorTable.clear();
m_gridDimension = pegTree->getDagGridDimension();
QMap<int, QList<TStageObject *>> groupedObj;
QMap<int, QList<SchematicNode *>> editedGroup;
// in order to draw the position-specified nodes first
QList<int> modifiedNodeIds;
for (int i = 0; i < pegTree->getStageObjectCount(); i++) {
TStageObject *pegbar = pegTree->getStageObject(i);
if (pegbar->getDagNodePos() == TConst::nowhere)
modifiedNodeIds.push_back(i);
else
modifiedNodeIds.push_front(i);
}
for (int i = 0; i < modifiedNodeIds.size(); i++) {
TStageObject *pegbar = pegTree->getStageObject(modifiedNodeIds.at(i));
if (pegbar->isGrouped() && !pegbar->isGroupEditing()) {
groupedObj[pegbar->getGroupId()].push_back(pegbar);
continue;
}
StageSchematicNode *node = addStageSchematicNode(pegbar);
if (node != 0) {
m_nodeTable[pegbar->getId()] = node;
if (pegbar->isGrouped())
editedGroup[pegbar->getEditingGroupId()].append(node);
}
}
//Motion Path
m_splineTable.clear();
for (int i = 0; i < pegTree->getSplineCount(); i++) {
TStageObjectSpline *spline = pegTree->getSpline(i);
StageSchematicSplineNode *node = addSchematicSplineNode(spline);
if (node != 0) {
m_splineTable[spline] = node;
connect(node, SIGNAL(currentObjectChanged(const TStageObjectId &, bool)), this,
SLOT(onCurrentObjectChanged(const TStageObjectId &, bool)));
}
}