kpresenter

KPrPointObject.h
1/* This file is part of the KDE project
2 Copyright (C) 2004-2005 Thorsten Zachmann <zachmann@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef kppointobject_h
21#define kppointobject_h
22
23#include "KPrObject.h"
24#include <KoStyleStack.h>
25
26class KPrPointObject : public KPrShadowObject, public KPrStartEndLine
27{
28public:
29 KPrPointObject();
30 KPrPointObject( const KoPen &_pen, LineEnd _lineBegin, LineEnd _lineEnd );
31
32 virtual KoSize getRealSize() const;
33 virtual KoPoint getRealOrig() const;
34
35 virtual TQDomDocumentFragment save( TQDomDocument& doc, double offset );
36
37 virtual double load( const TQDomElement &element );
38 virtual void loadOasis( const TQDomElement &element, KoOasisContext & context, KPrLoadingInfo* info );
39
40 virtual void setLineBegin( LineEnd _lineBegin ) { lineBegin = _lineBegin; }
41 virtual void setLineEnd( LineEnd _lineEnd ) { lineEnd = _lineEnd; }
42
43 virtual LineEnd getLineBegin() const { return lineBegin; }
44 virtual LineEnd getLineEnd() const { return lineEnd; }
45
46 virtual void setSize( double _width, double _height );
47 virtual void setSize( const KoSize & _size )
48 { setSize( _size.width(), _size.height() ); }
49
50 virtual void flip( bool horizontal );
51
57 virtual const KoPointArray getPoints() const { return getDrawingPoints(); }
58
59protected:
60 virtual const char * getOasisElementName() const;
61
62 void loadOasisMarker( KoOasisContext & context );
63 virtual void fillStyle( KoGenStyle& styleObjectAuto, KoGenStyles& mainStyles ) const;
64
65 virtual void paint( TQPainter *_painter,KoTextZoomHandler*_zoomHandler,
66 int /* pageNum */, bool drawingShadow, bool drawContour = false );
67 virtual void updatePoints( double _fx, double _fy );
68 virtual KoPointArray getDrawingPoints() const;
69
70 KoPointArray points;
71};
72
73#endif
Base class for objects with a pen and a brush, and which takes care of painting the shadow in draw() ...
Definition KPrObject.h:406