kpresenter
KPrFreehandObject.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) 2001 Toshitaka Fujioka <fujioka@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 kpfreehandobject_h 00023 #define kpfreehandobject_h 00024 00025 #include "KPrPointObject.h" 00026 00027 class QPainter; 00028 class DCOPObject; 00029 class KoXmlWriter; 00030 00031 class KPrFreehandObject : public KPrPointObject 00032 { 00033 public: 00034 KPrFreehandObject(); 00035 KPrFreehandObject( const KoPointArray &_points, const KoSize &_size, const KoPen &_pen, 00036 LineEnd _lineBegin, LineEnd _lineEnd ); 00037 virtual ~KPrFreehandObject() {} 00038 virtual DCOPObject* dcopObject(); 00039 00040 KPrFreehandObject &operator=( const KPrFreehandObject & ); 00041 00042 virtual ObjType getType() const { return OT_FREEHAND; } 00043 virtual QString getTypeString() const { return i18n("Freehand"); } 00044 00045 virtual QDomDocumentFragment save( QDomDocument& doc,double offset ); 00046 virtual double load( const QDomElement &element ); 00047 virtual void loadOasis( const QDomElement &element, KoOasisContext & context, KPrLoadingInfo* info ); 00048 00049 protected: 00050 virtual const char * getOasisElementName() const; 00051 virtual bool saveOasisObjectAttributes( KPOasisSaveContext &sc ) const; 00052 }; 00053 00054 #endif