kpresenter

KPrGroupObject.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 kpgroupobject_h
00023 #define kpgroupobject_h
00024 
00025 class KPrDocument;
00026 class KoOasisContext;
00027 class KPrPage;
00028 class KoXmlWriter;
00029 
00030 #include "KPrObject.h"
00031 
00032 class KPrGroupObject : public KPrObject
00033 {
00034 public:
00035     KPrGroupObject();
00036     KPrGroupObject( const QPtrList<KPrObject> &objs );
00037     virtual ~KPrGroupObject() {}
00038 
00039     KPrGroupObject &operator=( const KPrGroupObject & );
00040 
00041     virtual void setSize( double _width, double _height );
00042     virtual void setOrig( const KoPoint &_point );
00043     virtual void setOrig( double _x, double _y );
00044     virtual void moveBy( const KoPoint &_point );
00045     virtual void moveBy( double _dx, double _dy );
00046 
00047     virtual void rotate( float _angle );
00048     virtual void setShadowDistance( int _distance );
00049     virtual void setShadowDirection( ShadowDirection _direction );
00050     virtual void setShadowColor( const QColor &_color );
00051     virtual void setEffect( Effect _effect );
00052     virtual void setEffect2( Effect2 _effect2 );
00053     virtual void setAppearStep( int _appearStep );
00054     virtual void setDisappear( bool b );
00055     virtual void setDisappearStep( int _disappearStep );
00056     virtual void setEffect3( Effect3 _effect3);
00057     virtual void setAppearTimer( int _appearTimer );
00058     virtual void setDisappearTimer( int _disappearTimer );
00059     virtual void setAppearSoundEffect( bool b );
00060     virtual void setDisappearSoundEffect( bool b );
00061     virtual void setAppearSoundEffectFileName( const QString &_a_fileName );
00062     virtual void setDisappearSoundEffectFileName( const QString &_d_fileName );
00063 
00064     virtual void setShadowParameter(int _distance,ShadowDirection _direction,const QColor &_color);
00065 
00066     virtual ObjType getType() const
00067         { return OT_GROUP; }
00068     virtual QString getTypeString() const
00069         { return i18n("Group"); }
00070 
00071     virtual QDomDocumentFragment save( QDomDocument& doc, double offset );
00072     virtual double load(const QDomElement &element, KPrDocument *doc);
00073     virtual void loadOasisGroupObject( KPrDocument *doc, KPrPage * newpage, QDomNode &element, KoOasisContext & context, KPrLoadingInfo *info);
00074 
00075     virtual void draw( QPainter *_painter, KoTextZoomHandler *_zoomhandler,
00076                        int pageNum, SelectionMode selectionMode, bool drawContour = FALSE );
00077 
00078     void addObjects( KPrObject * obj );
00079 
00080     void setUpdateObjects( bool b )
00081         { updateObjs = b; }
00082 
00083     QPtrList<KPrObject> getObjects()
00084         { return objects; }
00085     const QPtrList<KPrObject> &objectList() const
00086         { return objects; }
00087     virtual void addTextObjects( QPtrList<KoTextObject> & ) const;
00088 
00089     void selectAllObj();
00090     void deSelectAllObj();
00091 
00092     virtual void setOwnClipping( bool _ownClipping );
00093     virtual void setSubPresStep( int _subPresStep );
00094     virtual void doSpecificEffects( bool _specEffects, bool _onlyCurrStep = true );
00095     virtual void getAllObjectSelectedList(QPtrList<KPrObject> &lst,bool force=false );
00096 
00097     virtual void flip( bool horizontal );
00098     virtual void removeFromObjList();
00099     virtual void addToObjList();
00100     virtual void incCmdRef();
00101     virtual void decCmdRef();
00102 
00103 protected:
00104     virtual const char * getOasisElementName() const;
00105     virtual bool saveOasisObjectAttributes( KPOasisSaveContext &sc ) const;
00106     virtual void saveOasisPosObject( KoXmlWriter &xmlWriter, int indexObj ) const;
00107 
00108     void updateSizes( double fx, double fy );
00109     void updateCoords( double dx, double dy );
00110 
00111     QPtrList<KPrObject> objects;
00112     bool updateObjs;
00113 
00114 };
00115 
00116 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys