kpresenter

KPrGradientCollection.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 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef kpgradientcollection_h
00022 #define kpgradientcollection_h
00023 
00024 #include <qptrlist.h>
00025 #include "global.h"
00026 #include "KPrGradient.h"
00027 
00028 class QPixmap;
00029 
00038 class KPrGradientCollection
00039 {
00040 public:
00041     KPrGradientCollection()
00042         { gradientList.setAutoDelete( true ); }
00043 
00044     ~KPrGradientCollection()
00045         { gradientList.clear(); }
00046 
00048     const QPixmap& getGradient( const QColor &_color1, const QColor &_color2, BCType _bcType, const QSize &_size,
00049                                 bool _unbalanced, int _xfactor, int _yfactor, bool addref = true );
00050 
00052     void removeRef( const QColor &_color1, const QColor &_color2, BCType _bcType, const QSize &_size,
00053                     bool _unbalanced, int _xfactor, int _yfactor );
00054 
00055 protected:
00056     KPrGradient* inGradientList( const QColor &_color1, const QColor &_color2, BCType _bcType, const QSize &_size,
00057                                 bool _unbalanced, int _xfactor, int _yfactor ) const;
00058 
00059 private:
00060     QPtrList<KPrGradient> gradientList;
00061 };
00062 
00063 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys