Logo Search packages:      
Sourcecode: ktechlab version File versions

void CNItemGroup::removeQCanvasItem ( QCanvasItem *  qcanvasItem  )  [virtual]

If the item is a a CNItem, Node or Connector, then attempts to remove it

Implements ItemGroup.

Definition at line 205 of file cnitemgroup.cpp.

References removeConnector(), removeItem(), and removeNode().

Referenced by PinMapDocument::deleteSelection(), FlowICNDocument::flushDeleteList(), and CircuitICNDocument::flushDeleteList().

      if (!qcanvasItem) return;
      Item *item = dynamic_cast<Item*>(qcanvasItem);
      if (item)
            return removeItem(item);
      Node *node = dynamic_cast<Node*>(qcanvasItem);
      if (node)
            return removeNode(node);
      Connector *connector = dynamic_cast<Connector*>(qcanvasItem);
      if (!connector)
            ConnectorLine *connectorLine = dynamic_cast<ConnectorLine*>(qcanvasItem);
            if (connectorLine)
                  connector = connectorLine->parent();
      if (connector)
            return removeConnector(connector);

Generated by  Doxygen 1.6.0   Back to index