kpresenter

KPrPointObject.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) 2004-2005 Thorsten Zachmann  <zachmann@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library 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 GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef kppointobject_h
00022 #define kppointobject_h
00023 
00024 #include "KPrObject.h"
00025 #include <KoStyleStack.h>
00026 
00027 class KPrPointObject : public KPrShadowObject,  public KPrStartEndLine
00028 {
00029 public:
00030     KPrPointObject();
00031     KPrPointObject( const KoPen &_pen, LineEnd _lineBegin, LineEnd _lineEnd );
00032 
00033     virtual KoSize getRealSize() const;
00034     virtual KoPoint getRealOrig() const;
00035 
00036     virtual QDomDocumentFragment save( QDomDocument& doc, double offset );
00037 
00038     virtual double load( const QDomElement &element );
00039     virtual void loadOasis( const QDomElement &element, KoOasisContext & context, KPrLoadingInfo* info );
00040 
00041     virtual void setLineBegin( LineEnd _lineBegin ) { lineBegin = _lineBegin; }
00042     virtual void setLineEnd( LineEnd _lineEnd ) { lineEnd = _lineEnd; }
00043 
00044     virtual LineEnd getLineBegin() const { return lineBegin; }
00045     virtual LineEnd getLineEnd() const { return lineEnd; }
00046 
00047     virtual void setSize( double _width, double _height );
00048     virtual void setSize( const KoSize & _size )
00049         { setSize( _size.width(), _size.height() ); }
00050 
00051     virtual void flip( bool horizontal );
00052 
00058     virtual const KoPointArray getPoints() const { return getDrawingPoints(); }
00059 
00060 protected:
00061     virtual const char * getOasisElementName() const;
00062 
00063     void loadOasisMarker( KoOasisContext & context );
00064     virtual void fillStyle( KoGenStyle& styleObjectAuto, KoGenStyles& mainStyles ) const;
00065 
00066     virtual void paint( QPainter *_painter,KoTextZoomHandler*_zoomHandler,
00067                         int /* pageNum */, bool drawingShadow, bool drawContour = FALSE );
00068     virtual void updatePoints( double _fx, double _fy );
00069     virtual KoPointArray getDrawingPoints() const;
00070 
00071     KoPointArray points;
00072 };
00073 
00074 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys