kpresenter

KPrAutoformObject.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) 1998, 1999 Reginald Stadlbauer <reggie@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 kpautoformobject_h
00023 #define kpautoformobject_h
00024 
00025 #include <qpixmap.h>
00026 #include <KoBrush.h>
00027 
00028 #include "KPrObject.h"
00029 #include "global.h"
00030 #include "autoformEdit/ATFInterpreter.h"
00031 
00032 class KPrGradient;
00033 class DCOPObject;
00034 
00035 class KPrAutoformObject : public KPr2DObject, public KPrStartEndLine
00036 {
00037 public:
00038     KPrAutoformObject();
00039     KPrAutoformObject( const KoPen & _pen, const QBrush &_brush, const QString &_filename, LineEnd _lineBegin, LineEnd _lineEnd,
00040                       FillType _fillType, const QColor &_gColor1, const QColor &_gColor2, BCType _gType,
00041                       bool _unbalanced, int _xfactor, int _yfactor);
00042     virtual ~KPrAutoformObject() {}
00043 
00044     KPrAutoformObject &operator=( const KPrAutoformObject & );
00045 
00046     virtual DCOPObject* dcopObject();
00047 
00048     virtual void setFileName( const QString &_filename );
00049     virtual void setLineBegin( LineEnd _lineBegin )
00050         { lineBegin = _lineBegin; }
00051     virtual void setLineEnd( LineEnd _lineEnd )
00052         { lineEnd = _lineEnd; }
00053 
00054     virtual ObjType getType() const
00055         { return OT_AUTOFORM; }
00056     virtual QString getTypeString() const
00057         { return i18n("Autoform"); }
00058 
00059     QString getFileName() const
00060         { return filename; }
00061     virtual LineEnd getLineBegin() const
00062         { return lineBegin; }
00063     virtual LineEnd getLineEnd() const
00064         { return lineEnd; }
00065 
00066     virtual QDomDocumentFragment save( QDomDocument& doc,double offset );
00067 
00068     virtual double load(const QDomElement &element);
00069 protected:
00070     virtual const char * getOasisElementName() const;
00071     virtual bool saveOasisObjectAttributes( KPOasisSaveContext &sc ) const;
00072     virtual void fillStyle( KoGenStyle& styleObjectAuto, KoGenStyles& mainStyles ) const;
00073 
00074     virtual void paint( QPainter *_painter, KoTextZoomHandler *_zoomHandler,
00075                         int /* pageNum */, bool drawingShadow, bool drawContour = FALSE );
00076 
00077     QString filename;
00078 
00079     ATFInterpreter atfInterp;
00080 };
00081 
00082 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys