00001 /* -*- c++ -*- (for Emacs) 00002 * 00003 * diagramelementfactory.h 00004 * Digest 00005 * 00006 * Imported into Digest by Aidan Lane on Thu Jun 9 2005. 00007 * Modifications Copyright (c) 2005 Optimisation and Constraint Solving Group, 00008 * Monash University. All rights reserved. 00009 * 00010 * Nodal file: 00011 * 00012 * parcattributefactory.h 00013 * Nodal 00014 * 00015 * Created by Aidan Lane on Tue May 24 2005. 00016 * Copyright (c) 2005 CEMA, Monash University. All rights reserved. 00017 * 00018 * This program is free software; you can redistribute it and/or modify 00019 * it under the terms of the GNU General Public License as published by 00020 * the Free Software Foundation; either version 2 of the License, or 00021 * (at your option) any later version. 00022 * 00023 * This program is distributed in the hope that it will be useful, 00024 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00025 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00026 * GNU General Public License for more details. 00027 * 00028 * You should have received a copy of the GNU General Public License 00029 * along with this program; if not, write to the Free Software 00030 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00031 */ 00032 00033 #ifndef DIAGRAMELEMENTFACTORY_H 00034 #define DIAGRAMELEMENTFACTORY_H 00035 00036 00037 #include <QList> 00038 00039 #include "abstractdiagramelement.h" 00040 00041 class QByteArray; 00042 00043 00058 class DiagramElementFactory { 00059 public: 00060 static AbstractDiagramElement* create( MvcDiagram::ElementType type, 00061 qint32 instanceId, 00062 ElementDoc* parent ); 00063 static AbstractDiagramElement* create( MvcDiagram::ElementType type, 00064 ElementDoc* parent ); 00065 static AbstractDiagramElement* create( const QByteArray& key, 00066 qint32 instanceId, 00067 ElementDoc* parent ); 00068 static AbstractDiagramElement* create( const QByteArray& key, 00069 ElementDoc* parent ); 00070 static const QList<QByteArray>& keys(); 00071 static int type( const QByteArray& key ); 00072 static const QString& title( const QByteArray& key ); 00073 }; 00074 00075 00076 #endif // ! DIAGRAMELEMENTFACTORY_H
1.5.2