karbon

vgroup.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2002, 2003 The Karbon Developers
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 __VGROUP_H__
00021 #define __VGROUP_H__
00022 
00023 #include <qptrlist.h>
00024 
00025 #include "vobject.h"
00026 #include <koffice_export.h>
00027 typedef QPtrList<VObject> VObjectList;
00028 typedef QPtrListIterator<VObject> VObjectListIterator;
00029 
00034 class KARBONBASE_EXPORT VGroup : public VObject
00035 {
00036 public:
00045     VGroup( VObject* parent, VState state = normal );
00046 
00052     VGroup( const VGroup& group );
00053 
00057     virtual ~VGroup();
00058 
00059     virtual void draw( VPainter* painter, const KoRect* rect = 0L ) const;
00060 
00061     virtual const KoRect& boundingBox() const;
00062 
00063     virtual void setStroke( const VStroke& stroke );
00064     virtual void setFill( const VFill& fill );
00065 
00066     virtual void setState( const VState state );
00067 
00068     virtual void save( QDomElement& element ) const;
00069     virtual void saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index ) const;
00070     virtual void load( const QDomElement& element );
00071     virtual bool loadOasis( const QDomElement &element, KoOasisLoadingContext &context );
00072 
00073     virtual VGroup* clone() const;
00074 
00075     virtual void accept( VVisitor& visitor );
00076 
00082     void take( const VObject& object );
00083 
00089     void append( VObject* object );
00090 
00098     virtual void insertInfrontOf( VObject* newObject, VObject* oldObject );
00099 
00103     void clear();
00104 
00110     const VObjectList& objects() const { return m_objects; }
00111 
00112 protected:
00113     VObjectList m_objects; 
00114 };
00115 
00116 #endif
00117 
KDE Home | KDE Accessibility Home | Description of Access Keys