kpresenter

KPrClosedLineObject.h

00001 // -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*-
00002 /* This file is part of the KDE project
00003    Copyright (C) 2002 Toshitaka Fujioka <fujioka@kde.org>
00004    Copyright (C) 2005 Thorsten Zachmann <zachmann@kde.org>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef kpclosedlineoject_h
00023 #define kpclosedlineoject_h
00024 
00025 #include <qpointarray.h>
00026 #include "KoPointArray.h"
00027 #include "KPrObject.h"
00028 
00029 class KPrGradient;
00030 class QPainter;
00031 class DCOPObject;
00032 class KPrPointObject;
00033 
00034 class KPrClosedLineObject : public KPr2DObject
00035 {
00036 public:
00037     KPrClosedLineObject();
00038     KPrClosedLineObject( const KoPointArray &_points, const KoSize &_size, const KoPen &_pen, const QBrush &_brush,
00039                         FillType _fillType, const QColor &_gColor1, const QColor &_gColor2, BCType _gType,
00040                         bool _unbalanced, int _xfactor, int _yfactor, const QString _type );
00049     KPrClosedLineObject( const KPrPointObject &object );
00050 
00051     virtual ~KPrClosedLineObject() {}
00052     //virtual DCOPObject* dcopObject();
00053 
00054     KPrClosedLineObject &operator=( const KPrClosedLineObject & );
00055 
00056     virtual void setSize( double _width, double _height );
00057     virtual void setSize( const KoSize & _size ) { setSize( _size.width(), _size.height() ); }
00058 
00059     virtual ObjType getType() const { return OT_CLOSED_LINE; }
00060     virtual QString getTypeString() const { return typeString; }
00061 
00062 
00063     virtual QDomDocumentFragment save( QDomDocument& doc, double offset );
00064     virtual double load( const QDomElement &element );
00065     virtual void loadOasis( const QDomElement &element, KoOasisContext & context, KPrLoadingInfo *info );
00066 
00067     virtual void flip(bool horizontal );
00068     virtual KoSize getRealSize() const;
00069     virtual KoPoint getRealOrig() const;
00070 
00071 protected:
00072     virtual const char * getOasisElementName() const;
00073     virtual bool saveOasisObjectAttributes( KPOasisSaveContext &sc ) const;
00074     virtual void paint( QPainter *_painter,KoTextZoomHandler*_zoomHandler,
00075                         int /* pageNum */, bool drawingShadow, bool drawContour );
00076 
00077     void updatePoints( double _fx, double _fy );
00078 
00079     KoPointArray points;
00080 
00081     QString typeString;
00082 };
00083 
00084 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys