kpresenter

KPrLineObject.h
1/* This file is part of the KDE project
2 Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
3 Copyright (C) 2005 Thorsten Zachmann <zachmann@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library 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 GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20
21#ifndef kplineobject_h
22#define kplineobject_h
23
24#include "KPrObject.h"
25#include <KoStyleStack.h>
26
27class TQPainter;
28class DCOPObject;
29class KoXmlWriter;
30
31class KPrLineObject : public KPrShadowObject, public KPrStartEndLine
32{
33public:
34 KPrLineObject();
35 KPrLineObject( const KoPen &_pen, LineEnd _lineBegin,
36 LineEnd _lineEnd, LineType _lineType );
37 virtual ~KPrLineObject()
38 {}
39
40 virtual DCOPObject* dcopObject();
41
42 KPrLineObject &operator=( const KPrLineObject & );
43
44 virtual void setLineBegin( LineEnd _lineBegin )
45 { lineBegin = _lineBegin; }
46 virtual void setLineEnd( LineEnd _lineEnd )
47 { lineEnd = _lineEnd; }
48 virtual void setLineType( LineType _lineType )
49 { lineType = _lineType; }
50
51 virtual ObjType getType() const
52 { return OT_LINE; }
53 virtual TQString getTypeString() const
54 { return i18n("Line"); }
55 virtual LineEnd getLineBegin() const
56 { return lineBegin; }
57 virtual LineEnd getLineEnd() const
58 { return lineEnd; }
59 virtual LineType getLineType() const
60 { return lineType; }
61
62 virtual TQDomDocumentFragment save( TQDomDocument& doc, double offset );
63 virtual double load(const TQDomElement &element);
64 virtual void loadOasis(const TQDomElement &element, KoOasisContext & context, KPrLoadingInfo *info);
65
66 virtual void flip(bool horizontal );
67
68 virtual KoSize getRealSize() const;
69 virtual KoPoint getRealOrig() const;
70
71protected:
72 virtual const char * getOasisElementName() const;
73 virtual bool saveOasisObjectAttributes( KPOasisSaveContext &sc ) const;
74 virtual void saveOasisPosObject( KoXmlWriter &xmlWriter, int indexObj ) const;
75
76 virtual void fillStyle( KoGenStyle& styleObjectAuto, KoGenStyles& mainStyles ) const;
77
78 virtual void paint( TQPainter *_painter, KoTextZoomHandler*_zoomHandler,
79 int /* pageNum */, bool drawingShadow, bool drawContour = false );
80 LineType lineType;
81};
82
83#endif
Temporary information used only during loading.
Base class for objects with a pen and a brush, and which takes care of painting the shadow in draw() ...
Definition KPrObject.h:406