kivio
kivio_sml_stencil_spawner.h
00001 /* 00002 * Kivio - Visual Modelling and Flowcharting 00003 * Copyright (C) 2000-2001 theKompany.com & Dave Marotti 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00018 */ 00019 #ifndef KIVIO_SML_STENCIL_SPAWNER_H 00020 #define KIVIO_SML_STENCIL_SPAWNER_H 00021 00022 #include <qdom.h> 00023 #include <qptrlist.h> 00024 #include <qstring.h> 00025 00026 #include "kivio_stencil_spawner.h" 00027 00028 class KivioStencilSpawnerSet; 00029 class KivioStencil; 00030 class KivioSMLStencil; 00031 class KivioConnectorTarget; 00032 class QPainter; 00033 class QPixmap; 00034 class QRect; 00035 00036 class KivioSMLStencilSpawner : public KivioStencilSpawner 00037 { 00038 protected: 00039 KivioSMLStencil *m_pStencil; 00040 QString m_filename; 00041 00042 // Target list 00043 QPtrList<KivioConnectorTarget>*m_pTargets; 00044 00045 protected: 00046 void loadShape( QDomNode & ); 00047 QString readDesc( const QString & ); 00048 00049 public: 00050 KivioSMLStencilSpawner( KivioStencilSpawnerSet * ); 00051 virtual ~KivioSMLStencilSpawner(); 00052 00053 virtual bool load( const QString & ); 00054 virtual bool loadXML( const QString &, QDomDocument & ); 00055 00056 virtual QDomElement saveXML( QDomDocument & ); 00057 00058 virtual QString &filename() { return m_filename; } 00059 00060 virtual KivioStencil *newStencil(); 00061 00062 QPtrList <KivioConnectorTarget> *targets() { return m_pTargets; } 00063 }; 00064 00065 #endif 00066 00067