kpresenter

KPrPartObject.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef kppartobject_h
00021 #define kppartobject_h
00022 
00023 #include <KoChild.h>
00024 
00025 #include "KPrObject.h"
00026 
00027 class KPrChild;
00028 class KoXmlWriter;
00029 class KoStore;
00030 
00031 class KPrPartObject : public QObject, public KPr2DObject
00032 {
00033     Q_OBJECT
00034 public:
00035     KPrPartObject( KPrChild *_child );
00036     virtual ~KPrPartObject() {}
00037 
00038     KPrPartObject &operator=( const KPrPartObject & );
00039     virtual void rotate( float _angle );
00040 
00041     virtual ObjType getType() const { return OT_PART; }
00042     virtual QString getTypeString() const { return i18n("Embedded Object"); }
00043 
00044     virtual void draw( QPainter *_painter, KoTextZoomHandler *_zoomhandler,
00045                        int pageNum, SelectionMode selectionMode, bool drawContour = FALSE );
00046 
00047     void activate( QWidget *_widget );
00048     void deactivate();
00049 
00050     KPrChild *getChild() const { return child; }
00051     void enableDrawing( bool f ) { _enableDrawing = f; }
00052     virtual void loadOasis(const QDomElement &element, KoOasisContext &context, KPrLoadingInfo *info);
00053 
00054 public slots:
00055     void slot_changed( KoChild *_koChild );
00056 
00057 protected:
00058     virtual const char * getOasisElementName() const;
00059     virtual bool saveOasisObjectAttributes( KPOasisSaveContext &sc ) const;
00060 
00061     void updateChildGeometry();
00062     virtual void paint( QPainter *_painter,KoTextZoomHandler*_zoomHandler,
00063                         int /* pageNum */, bool drawingShadow, bool drawContour = FALSE );
00064 
00065     bool _enableDrawing;
00066     KPrChild *child;
00067 };
00068 
00069 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys