karbon

vshadowdecorator.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2001, 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 __VSHADOWDECORATOR_H__
00021 #define __VSHADOWDECORATOR_H__
00022 
00023 
00024 #include "vobject.h"
00025 #include <koffice_export.h>
00026 
00029 class KARBONBASE_EXPORT VShadowDecorator : public VObject
00030 {
00031 public:
00032     VShadowDecorator( VObject* object, VObject* parent, int distance = 2, int angle = 0, float opacity = 1.0 );
00033     VShadowDecorator( const VShadowDecorator& obj );
00034 
00035     virtual ~VShadowDecorator();
00036 
00037     virtual void draw( VPainter* /*painter*/, const KoRect* /*rect*/ = 0L ) const;
00038 
00039     virtual const KoRect& boundingBox() const { return m_object->boundingBox(); }
00040     VStroke* stroke() const { return m_object->stroke(); }
00041     virtual void setStroke( const VStroke& stroke );
00042     VFill* fill() const { return m_object->fill(); }
00043     virtual void setFill( const VFill& fill );
00044 
00045     virtual void accept( VVisitor& /*visitor*/ );
00046 
00047     virtual void save( QDomElement& ) const;
00048     virtual void load( const QDomElement& ) {}
00049 
00050     virtual VObject* clone() const;
00051     
00052     VState state() const { return m_state; }
00053     virtual void setState( const VState state );
00054     
00055     void setShadow( int distance = 2, int angle = 0, float opacity = 1.0 );
00056 protected:
00057     VObject *m_object;
00058     int     m_distance;
00059     int     m_angle;
00060     float   m_opacity;
00061 };
00062 
00063 #endif
00064 
KDE Home | KDE Accessibility Home | Description of Access Keys