kivio

kivio_py_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_PY_STENCIL_SPAWNER_H
00020 #define KIVIO_PY_STENCIL_SPAWNER_H
00021 
00022 #include <qdom.h>
00023 #include <qptrlist.h>
00024 #include <qstring.h>
00025 
00026 #include "kivio_stencil_spawner.h"
00027 #include <config.h>
00028 
00029 #ifdef HAVE_PYTHON
00030 
00031 class KivioStencilSpawnerSet;
00032 class KivioStencil;
00033 class KivioPyStencil;
00034 class KivioConnectorTarget;
00035 class QPainter;
00036 class QPixmap;
00037 class QRect;
00038 
00039 class KivioPyStencilSpawner : public KivioStencilSpawner
00040 {
00041 protected:
00042     KivioPyStencil *m_pStencil;
00043     QString m_filename;
00044 
00045     // Target list
00046     QPtrList<KivioConnectorTarget>*m_pTargets;
00047 
00048 protected:
00049     void loadShape( QDomNode & );
00050     QString readDesc( const QString & );
00051 
00052 public:
00053     KivioPyStencilSpawner( KivioStencilSpawnerSet * );
00054     virtual ~KivioPyStencilSpawner();
00055 
00056     virtual bool load( const QString & );
00057 
00058     virtual QDomElement saveXML( QDomDocument & );
00059 
00060     virtual QString &filename() { return m_filename; }
00061 
00062     virtual KivioStencil *newStencil();
00063 
00064     QPtrList <KivioConnectorTarget> *targets() { return m_pTargets; }
00065 };
00066 
00067 #else // HAVE_PYTHON
00068 
00069   #define KivioPyStencilSpawner KivioStencilSpawner
00070 
00071 #endif // HAVE_PYTHON
00072 
00073 
00074 #endif
00075 
00076 
00077 
KDE Home | KDE Accessibility Home | Description of Access Keys