kpresenter

KPrPartObject.h
1/* This file is part of the KDE project
2 Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef kppartobject_h
21#define kppartobject_h
22
23#include <KoChild.h>
24
25#include "KPrObject.h"
26
27class KPrChild;
28class KoXmlWriter;
29class KoStore;
30
31class KPrPartObject : public TQObject, public KPr2DObject
32{
33 TQ_OBJECT
34
35public:
36 KPrPartObject( KPrChild *_child );
37 virtual ~KPrPartObject() {}
38
39 KPrPartObject &operator=( const KPrPartObject & );
40 virtual void rotate( float _angle );
41
42 virtual ObjType getType() const { return OT_PART; }
43 virtual TQString getTypeString() const { return i18n("Embedded Object"); }
44
45 virtual void draw( TQPainter *_painter, KoTextZoomHandler *_zoomhandler,
46 int pageNum, SelectionMode selectionMode, bool drawContour = false );
47
48 void activate( TQWidget *_widget );
49 void deactivate();
50
51 KPrChild *getChild() const { return child; }
52 void enableDrawing( bool f ) { _enableDrawing = f; }
53 virtual void loadOasis(const TQDomElement &element, KoOasisContext &context, KPrLoadingInfo *info);
54
55public slots:
56 void slot_changed( KoChild *_koChild );
57
58protected:
59 virtual const char * getOasisElementName() const;
60 virtual bool saveOasisObjectAttributes( KPOasisSaveContext &sc ) const;
61
62 void updateChildGeometry();
63 virtual void paint( TQPainter *_painter,KoTextZoomHandler*_zoomHandler,
64 int /* pageNum */, bool drawingShadow, bool drawContour = false );
65
66 bool _enableDrawing;
67 KPrChild *child;
68};
69
70#endif
Temporary information used only during loading.