kivio

kivio_py_stencil_spawner.h
1/*
2 * Kivio - Visual Modelling and Flowcharting
3 * Copyright (C) 2000-2001 theKompany.com & Dave Marotti
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19#ifndef KIVIO_PY_STENCIL_SPAWNER_H
20#define KIVIO_PY_STENCIL_SPAWNER_H
21
22#include <tqdom.h>
23#include <tqptrlist.h>
24#include <tqstring.h>
25
26#include "kivio_stencil_spawner.h"
27#include <config.h>
28
29#ifdef HAVE_PYTHON
30
31class KivioStencilSpawnerSet;
32class KivioStencil;
33class KivioPyStencil;
34class KivioConnectorTarget;
35class TQPainter;
36class TQPixmap;
37class TQRect;
38
39class KivioPyStencilSpawner : public KivioStencilSpawner
40{
41protected:
42 KivioPyStencil *m_pStencil;
43 TQString m_filename;
44
45 // Target list
46 TQPtrList<KivioConnectorTarget>*m_pTargets;
47
48protected:
49 void loadShape( TQDomNode & );
50 TQString readDesc( const TQString & );
51
52public:
53 KivioPyStencilSpawner( KivioStencilSpawnerSet * );
54 virtual ~KivioPyStencilSpawner();
55
56 virtual bool load( const TQString & );
57
58 virtual TQDomElement saveXML( TQDomDocument & );
59
60 virtual TQString &filename() { return m_filename; }
61
62 virtual KivioStencil *newStencil();
63
64 TQPtrList <KivioConnectorTarget> *targets() { return m_pTargets; }
65};
66
67#else // HAVE_PYTHON
68
69 #define KivioPyStencilSpawner KivioStencilSpawner
70
71#endif // HAVE_PYTHON
72
73
74#endif
75
76
77