kpresenter

KPrAutoformObject.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 kpautoformobject_h
22#define kpautoformobject_h
23
24#include <tqpixmap.h>
25#include <KoBrush.h>
26
27#include "KPrObject.h"
28#include "global.h"
29#include "autoformEdit/ATFInterpreter.h"
30
31class KPrGradient;
32class DCOPObject;
33
34class KPrAutoformObject : public KPr2DObject, public KPrStartEndLine
35{
36public:
37 KPrAutoformObject();
38 KPrAutoformObject( const KoPen & _pen, const TQBrush &_brush, const TQString &_filename, LineEnd _lineBegin, LineEnd _lineEnd,
39 FillType _fillType, const TQColor &_gColor1, const TQColor &_gColor2, BCType _gType,
40 bool _unbalanced, int _xfactor, int _yfactor);
41 virtual ~KPrAutoformObject() {}
42
43 KPrAutoformObject &operator=( const KPrAutoformObject & );
44
45 virtual DCOPObject* dcopObject();
46
47 virtual void setFileName( const TQString &_filename );
48 virtual void setLineBegin( LineEnd _lineBegin )
49 { lineBegin = _lineBegin; }
50 virtual void setLineEnd( LineEnd _lineEnd )
51 { lineEnd = _lineEnd; }
52
53 virtual ObjType getType() const
54 { return OT_AUTOFORM; }
55 virtual TQString getTypeString() const
56 { return i18n("Autoform"); }
57
58 TQString getFileName() const
59 { return filename; }
60 virtual LineEnd getLineBegin() const
61 { return lineBegin; }
62 virtual LineEnd getLineEnd() const
63 { return lineEnd; }
64
65 virtual TQDomDocumentFragment save( TQDomDocument& doc,double offset );
66
67 virtual double load(const TQDomElement &element);
68protected:
69 virtual const char * getOasisElementName() const;
70 virtual bool saveOasisObjectAttributes( KPOasisSaveContext &sc ) const;
71 virtual void fillStyle( KoGenStyle& styleObjectAuto, KoGenStyles& mainStyles ) const;
72
73 virtual void paint( TQPainter *_painter, KoTextZoomHandler *_zoomHandler,
74 int /* pageNum */, bool drawingShadow, bool drawContour = false );
75
76 TQString filename;
77
78 ATFInterpreter atfInterp;
79};
80
81#endif
Class: KPrGradient.
Definition KPrGradient.h:40