void Connector::deactivateAll(CanvasItemSet& selSet) { // Is a connector. QPair<CPoint, CPoint> connpts = get_connpts(); if (connpts.first.shape) { if (selSet.find(connpts.first.shape) == selSet.end()) { // The connected shape is outside the selection, so: disconnect_from(connpts.first.shape); } } if (connpts.second.shape) { if (selSet.find(connpts.second.shape) == selSet.end()) { // The connected shape is outside the selection, so: disconnect_from(connpts.second.shape); } } if (avoidRef) { avoidRef->makeInactive(); } }
void Guideline::findAttachedSet(CanvasItemSet& objSet) { if (objSet.find(this) != objSet.end()) { // Already seen this node. return; } objSet.insert(this); RelsList::iterator finish = relationships.end(); for (RelsList::iterator r = relationships.begin(); r != finish; r++) { if ((*r)->shape) { (*r)->shape->findAttachedSet(objSet); } } }
void Guideline::addAttachedShapesToSet(CanvasItemSet& objSet) { // Add pointers to all shapes attached to this guideline into the objSet. RelsList::iterator finish = relationships.end(); for (RelsList::iterator r = relationships.begin(); r != finish; r++) { if ((*r)->shape) { objSet.insert((*r)->shape); } } }