kivio

kivio_common.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_COMMON_H
00020 #define KIVIO_COMMON_H
00021 
00022 #include <qdom.h>
00023 #include <qcolor.h>
00024 
00025 class KivioConnectorPoint;
00026 class KoPoint;
00027 class KoRect;
00028 
00029 extern "C" {
00030 
00031    KoRect XmlReadRect( const QDomElement &, const QString &, const KoRect & );
00032    void  XmlWriteRect( QDomElement &, const QString &, const KoRect & );
00033    
00034    QColor XmlReadColor( const QDomElement &, const QString &, const QColor & );
00035    void  XmlWriteColor( QDomElement &, const QString &, const QColor & );
00036    
00037    int XmlReadInt( const QDomElement &, const QString &, const int & );
00038    void  XmlWriteInt( QDomElement &, const QString &, const int & );
00039    
00040    uint XmlReadUInt( const QDomElement &, const QString &, const uint & );
00041    void  XmlWriteUInt( QDomElement &, const QString &, const uint & );
00042    
00043    double XmlReadDouble( const QDomElement &, const QString &, const double & );
00044    void  XmlWriteDouble( QDomElement &, const QString &, const double & );
00045    
00046    float XmlReadFloat( const QDomElement &, const QString &, const float & );
00047    void  XmlWriteFloat( QDomElement &, const QString &, const float & );
00048    
00049    QString XmlReadString( const QDomElement &, const QString &, const QString & );
00050    void    XmlWriteString( QDomElement &,  const QString &, const QString & );
00051    
00052    bool PointInPoly( KoPoint *points, int numPoints, KoPoint *hitPos );
00053    
00054    float shortestDistance( KivioConnectorPoint *pStart, KivioConnectorPoint *pEnd, KivioConnectorPoint *q );
00055 
00056 }
00057 
00058 #endif
00059 
00060 
KDE Home | KDE Accessibility Home | Description of Access Keys