libs/flake

KoFilterEffectStack.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002  * Copyright (c) 2009 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 Lesser 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 Lesser 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 KOFILTEREFFECTSTACK
00021 #define KOFILTEREFFECTSTACK
00022 
00023 #include "flake_export.h"
00024 
00025 #include <QtCore/QList>
00026 #include <QtCore/QRectF>
00027 
00028 class KoFilterEffect;
00029 class KoXmlWriter;
00030 
00032 class FLAKE_EXPORT KoFilterEffectStack
00033 {
00034 public:
00036     KoFilterEffectStack();
00037     
00039     ~KoFilterEffectStack();
00040 
00046     QList<KoFilterEffect*> filterEffects() const;
00047 
00056     void insertFilterEffect(int index, KoFilterEffect *filter);
00057 
00065     void appendFilterEffect(KoFilterEffect *filter);
00066 
00074     void removeFilterEffect(int index);
00075 
00081     KoFilterEffect* takeFilterEffect(int index);
00082     
00084     void setClipRect(const QRectF &clipRect);
00085 
00087     QRectF clipRect() const;
00088 
00090     QRectF clipRectForBoundingRect(const QRectF &boundingRect) const;
00091 
00093     void addUser();
00095     bool removeUser();
00097     int useCount() const;
00098 
00104     void save(KoXmlWriter &writer, const QString &filterId);
00105 
00106 private:
00107     class Private;
00108     Private * const d;
00109 };
00110 
00111 #endif // KOFILTEREFFECTSTACK