kivio_shape.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_SHAPE_H
20#define KIVIO_SHAPE_H
21
22#include "kivio_shape_data.h"
23#include <tqdom.h>
24
25
26class KivioShape
27{
28protected:
29 KivioShapeData m_shapeData; // The data inside this shape
30
31public:
32 KivioShape();
33 KivioShape( const KivioShape & );
34
35 virtual ~KivioShape();
36
37 void copyInto( KivioShape * ) const;
38
39 bool loadXML( const TQDomElement & );
40 TQDomElement saveXML( TQDomDocument & );
41
42 KivioShapeData::KivioShapeType shapeType() { return m_shapeData.shapeType(); }
43
44 KivioShapeData *shapeData() { return &m_shapeData; }
45
46 static KivioShape *loadShapeArc( const TQDomElement & );
47 static KivioShape *loadShapeClosedPath( const TQDomElement & );
48 static KivioShape *loadShapeBezier( const TQDomElement & );
49 static KivioShape *loadShapeEllipse( const TQDomElement & );
50 static KivioShape *loadShapeLineArray( const TQDomElement & );
51 static KivioShape *loadShapeOpenPath( const TQDomElement & );
52 static KivioShape *loadShapePie( const TQDomElement & );
53 static KivioShape *loadShapePolygon( const TQDomElement & );
54 static KivioShape *loadShapePolyline( const TQDomElement & );
55 static KivioShape *loadShapeRectangle( const TQDomElement & );
56 static KivioShape *loadShapeRoundRectangle( const TQDomElement & );
57 static KivioShape *loadShapeTextBox( const TQDomElement & );
58};
59
60#endif
61
62
A class containing all the data for a KivioShape.
KivioShapeType
The possible shape types.