void QTextContainer::characters(const char* ch, int length) { if (!getText(NULL)) { // No text has been placed in this container yet... // For convenience, create a new text node to hold this text // There will be no locale set for this created text node if (!QUtil::isWhitespace(ch,length)) { QText *n = new QText(); n->setText(ch,length); addSubnode(n); } } else if (!QUtil::isWhitespace(ch,length)) { // error } }
Node * Node::createSubnode(String name) { Node * subnode = new Node(name); addSubnode(subnode); return subnode; }
SceneNode & SceneNode::createSubnode(String name) { SceneNode * node = new SceneNode(name, getScene()); addSubnode(node); return * node; }