Logo Search packages:      
Sourcecode: ktechlab version File versions

bool CNItemGroup::addQCanvasItem ( QCanvasItem *  qcanvasItem  )  [virtual]

If the item is a a CNItem, Node or Connector, returns the status for that particular add function, else returns false

Implements ItemGroup.

Definition at line 84 of file cnitemgroup.cpp.

References addConnector(), addItem(), and addNode().

Referenced by setItems().

      if (!qcanvasItem) return false;
      Item *item = dynamic_cast<Item*>(qcanvasItem);
      if (item)
            return addItem(item);
      Node *node = dynamic_cast<Node*>(qcanvasItem);
      if (node)
            return addNode(node);
      Connector *connector = dynamic_cast<Connector*>(qcanvasItem);
      if (!connector)
            ConnectorLine *connectorLine = dynamic_cast<ConnectorLine*>(qcanvasItem);
            if (connectorLine)
                  connector = connectorLine->parent();
      if (connector)
            return addConnector(connector);
      return false;

Generated by  Doxygen 1.6.0   Back to index