Logo Search packages:      
Sourcecode: ktechlab version File versions

ConnectorData Connector::connectorData (  )  const [inherited]

Returns:
connector data describing this connector

Definition at line 417 of file connector.cpp.

References ConRouter::cellPointList(), Node::childId(), Connector::endNode(), Node::id(), Item::id(), Node::parentItem(), Connector::startNode(), and Connector::usesManualPoints().

                                             {
      ConnectorData connectorData;

      if (!startNode() || !endNode()) {
            kdDebug() << k_funcinfo << " m_startNode=" << startNode() << " m_endNode=" << endNode() << endl;
            return connectorData;
      }

      connectorData.manualRoute = usesManualPoints();

      connectorData.route = *m_conRouter->cellPointList();

      if (startNode()->isChildNode()) {
            connectorData.startNodeIsChild = true;
            connectorData.startNodeCId = startNode()->childId();
            connectorData.startNodeParent = startNode()->parentItem()->id();
      } else {
            connectorData.startNodeIsChild = false;
            connectorData.startNodeId = startNode()->id();
      }

      if (endNode()->isChildNode()) {
            connectorData.endNodeIsChild = true;
            connectorData.endNodeCId = endNode()->childId();
            connectorData.endNodeParent = endNode()->parentItem()->id();
      } else {
            connectorData.endNodeIsChild = false;
            connectorData.endNodeId = endNode()->id();
      }

      return connectorData;
}


Generated by  Doxygen 1.6.0   Back to index