kivio

kivio_plugin_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_PLUGIN_STENCIL_H
00020 #define KIVIO_PLUGIN_STENCIL_H
00021 
00022 class KivioIntraStencilData;
00023 class KivioStencil;
00024 class KivioStencilFactory;
00025 class QDomDocument;
00026 
00027 #include "kivio_stencil_spawner.h"
00028 #include "kivio_stencil_spawner_info.h"
00029 #include <qpixmap.h>
00030 
00031 //typedef KivioStencil *(*NewStencilFunc)();
00032 //typedef QPixmap *(*GetIconFunc)();
00033 //typedef KivioStencilSpawnerInfo *(*GetSpawnerInfoFunc)();
00034 
00035 
00036 class KivioPluginStencilSpawner : public KivioStencilSpawner
00037 {
00038 protected:
00039     KivioStencilFactory *fac;
00040     void *m_handle;
00041     QPixmap *m_pIcon;
00042     QString m_filename;
00043     KivioStencilSpawnerInfo *m_pSInfo;
00044 
00045     KivioStencil *(*pNewStencil)();
00046     QPixmap *(*pGetIcon)();
00047     KivioStencilSpawnerInfo *(*pGetSpawnerInfo)();
00048 
00049 public:
00050     KivioPluginStencilSpawner( KivioStencilSpawnerSet * );
00051     virtual ~KivioPluginStencilSpawner();
00052 
00053     virtual bool load( const QString & );
00054     virtual QDomElement saveXML( QDomDocument & );
00055 
00056     virtual KivioStencil *newStencil();
00057     virtual KivioStencil *newStencil(const QString &arg);
00058     virtual KivioStencilSpawnerInfo *info();
00059 
00060     virtual QPixmap *icon() { return m_pIcon; }
00061 };
00062 
00063 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys