AddNodeUndoCommand(const QDomElement& node, const QDomElement& parent, AttachmentTreeModel* model, const QString& text) : QAddXmlNodeUndoCommand(node, parent, model, text) { QXmlTreeNode* sceneNode = model->sceneNodeParent(); m_sceneXmlNode = sceneNode->xmlNode(); m_model = static_cast<QXmlTreeModel*>(sceneNode->model()); }
RemoveNodeUndoCommand(QXmlTreeNode* node, const QString& text) : QRemoveXmlNodeUndoCommand(node, text) { QXmlTreeNode* sceneNode = qobject_cast<AttachmentTreeModel*>(node->model())->sceneNodeParent(); m_sceneXmlNode = sceneNode->xmlNode(); m_model = static_cast<QXmlTreeModel*>(sceneNode->model()); }