kpresenter

KPrGradientCollection.h
1/* This file is part of the KDE project
2 Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef kpgradientcollection_h
21#define kpgradientcollection_h
22
23#include <tqptrlist.h>
24#include "global.h"
25#include "KPrGradient.h"
26
27class TQPixmap;
28
38{
39public:
41 { gradientList.setAutoDelete( true ); }
42
44 { gradientList.clear(); }
45
47 const TQPixmap& getGradient( const TQColor &_color1, const TQColor &_color2, BCType _bcType, const TQSize &_size,
48 bool _unbalanced, int _xfactor, int _yfactor, bool addref = true );
49
51 void removeRef( const TQColor &_color1, const TQColor &_color2, BCType _bcType, const TQSize &_size,
52 bool _unbalanced, int _xfactor, int _yfactor );
53
54protected:
55 KPrGradient* inGradientList( const TQColor &_color1, const TQColor &_color2, BCType _bcType, const TQSize &_size,
56 bool _unbalanced, int _xfactor, int _yfactor ) const;
57
58private:
59 TQPtrList<KPrGradient> gradientList;
60};
61
62#endif
Class: KPrGradientCollection Holds a collection of gradients, and is able to provide a gradient for a...
const TQPixmap & getGradient(const TQColor &_color1, const TQColor &_color2, BCType _bcType, const TQSize &_size, bool _unbalanced, int _xfactor, int _yfactor, bool addref=true)
Retrieve or create gradient for the given parameters.
void removeRef(const TQColor &_color1, const TQColor &_color2, BCType _bcType, const TQSize &_size, bool _unbalanced, int _xfactor, int _yfactor)
Remove reference to gradient with the given parameters.
Class: KPrGradient.
Definition KPrGradient.h:40