libs/flake

KoShapeShadow.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002  * Copyright (C) 2008 Jan Hambrecht <jaham@gmx.net>
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 KOSHAPESHADOW_H
00021 #define KOSHAPESHADOW_H
00022 
00023 #include "flake_export.h"
00024 #include <QtCore/QPointF>
00025 #include <QtGui/QColor>
00026 
00027 class KoShape;
00028 class KoGenStyle;
00029 class KoShapeSavingContext;
00030 class QPainter;
00031 class KoViewConverter;
00032 struct KoInsets;
00033 
00034 class FLAKE_EXPORT KoShapeShadow
00035 {
00036 public:
00037     KoShapeShadow();
00038     ~KoShapeShadow();
00039 
00045     void fillStyle(KoGenStyle &style, KoShapeSavingContext &context);
00046 
00054     void paint(KoShape *shape, QPainter &painter, const KoViewConverter &converter);
00055 
00060     void setOffset(const QPointF & offset);
00061 
00063     QPointF offset() const;
00064 
00069     void setColor(const QColor &color);
00070 
00072     QColor color() const;
00073 
00075     void setVisibility(bool visible);
00076 
00078     bool isVisible() const;
00079 
00081     void insets(const KoShape *shape, KoInsets &insets);
00082 
00084     void addUser();
00086     bool removeUser();
00088     int useCount() const;
00089 
00090 private:
00091     class Private;
00092     Private * const d;
00093 };
00094 
00095 #endif // KOSHAPESHADOW_H