1
/***************************************************************************
3
* This program is free software; you can redistribute it and/or modify *
4
* it under the terms of the GNU General Public License as published by *
5
* the Free Software Foundation; either version 2 of the License, or *
6
* (at your option) any later version. *
8
* copyright (C) 2002-2006 *
9
* Umbrello UML Modeller Authors <uml-devel@uml.sf.net> *
10
***************************************************************************/
12
#include "cmd_create_componentdiag.h"
21
cmdCreateComponentDiag::cmdCreateComponentDiag(UMLDoc* doc, const QString& name):m_pUMLDoc(doc),m_pUMLView(NULL),m_Name(name)
23
setText(i18n("Create component diagram"));
26
cmdCreateComponentDiag::~cmdCreateComponentDiag()
30
void cmdCreateComponentDiag::redo()
32
UMLFolder* temp = m_pUMLDoc->getRootFolder(Uml::mt_Component);
33
m_pUMLView = m_pUMLDoc->createDiagram(temp, Uml::dt_Component);
36
void cmdCreateComponentDiag::undo()
40
m_pUMLDoc->removeDiagram(m_pUMLView->getID());