Logo Search packages:      
Sourcecode: ktechlab version File versions

void Node::setVisible ( bool  yes  )  [virtual]

Sets the node's visibility, as well as updating the visibility of the attached connectors as appropriate

Definition at line 81 of file node.cpp.

References Connector::endNode(), Connector::setVisible(), and Connector::startNode().

Referenced by NodeGroup::addNode(), NodeGroup::nodeRemoved(), and FlowContainer::updateContainedVisibility().

{
      if ( isVisible() == yes )
            return;
      
      QCanvasPolygon::setVisible(yes);
      
      const ConnectorList::iterator inputEnd = m_inputConnectorList.end();
      for ( ConnectorList::iterator it = m_inputConnectorList.begin(); it != inputEnd; ++it )
      {
            Connector *connector = *it;
            if (connector)
            {
                  if ( isVisible() )
                        connector->setVisible(true);
                  
                  else
                  {
                        Node *node = connector->startNode();
                        connector->setVisible( node && node->isVisible() );
                  }
            }
      }
      
      const ConnectorList::iterator outputEnd = m_outputConnectorList.end();
      for ( ConnectorList::iterator it = m_outputConnectorList.begin(); it != outputEnd; ++it )
      {
            Connector *connector = *it;
            if (connector)
            {
                  if ( isVisible() )
                        connector->setVisible(true);
                  
                  else
                  {
                        Node *node = connector->endNode();
                        connector->setVisible( node && node->isVisible() );
                  }
            }
      }
}


Generated by  Doxygen 1.6.0   Back to index