kspread

kspread_brush.h
1/* This file is part of the KDE project
2 Copyright (C) 2005-2006 Thorsten Zachmann <zachmann@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 KSPREADBRUSH_H
21#define KSPREADBRUSH_H
22
23#include <tqbrush.h>
24
25#include "kspread_global.h"
26
27class KoGenStyle;
28class KoGenStyles;
29class KoOasisContext;
30class TQDomElement;
31
32class KSpreadBrush
33{
34public:
35 KSpreadBrush();
36 KSpreadBrush( const TQBrush &brush, const TQColor &gColor1, const TQColor &gColor2,
37 BCType gType, FillType fillType, bool unbalanced,
38 int xfactor, int yfactor );
39
40 KSpreadBrush &operator=( const KSpreadBrush &brush );
41
42 void setBrush( const TQBrush &brush )
43 { m_brush = brush; }
44 void setGColor1( const TQColor &gColor1 )
45 { m_gColor1 = gColor1; }
46 void setGColor2( const TQColor &gColor2 )
47 { m_gColor2 = gColor2; }
48 void setGType( BCType gType )
49 { m_gType = gType; }
50 void setFillType( FillType fillType )
51 { m_fillType = fillType; }
52 void setGUnbalanced( bool unbalanced )
53 { m_unbalanced = unbalanced; }
54 void setGXFactor( int xfactor )
55 { m_xfactor = xfactor; }
56 void setGYFactor( int yfactor )
57 { m_yfactor = yfactor; }
58
59 TQBrush getBrush() const
60 { return m_brush; }
61 TQColor getGColor1() const
62 { return m_gColor1; }
63 TQColor getGColor2() const
64 { return m_gColor2; }
65 BCType getGType() const
66 { return m_gType; }
67 FillType getFillType() const
68 { return m_fillType; }
69 bool getGUnbalanced() const
70 { return m_unbalanced; }
71 int getGXFactor() const
72 { return m_xfactor; }
73 int getGYFactor() const
74 { return m_yfactor; }
75
76 void saveOasisFillStyle( KoGenStyle &styleObjectAuto, KoGenStyles& mainStyles ) const;
77 void loadOasisFillStyle( KoOasisContext &context, const char * propertyType );
78
79private:
80 //TQString saveOasisGradientStyle( KoGenStyles& mainStyles ) const;
81 TQBrush m_brush;
82 TQColor m_gColor1;
83 TQColor m_gColor2;
84 BCType m_gType;
85 FillType m_fillType;
86 bool m_unbalanced;
87 int m_xfactor;
88 int m_yfactor;
89};
90
91#endif /* KSPREADBRUSH_H */
92