KoBrush.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 KOBRUSH_H
21#define KOBRUSH_H
22
23#include <tqbrush.h>
24
25class KoGenStyle;
26class KoGenStyles;
27class KoOasisContext;
28class TQDomElement;
29
30
31enum BCType {
32 BCT_PLAIN = 0,
33 BCT_GHORZ = 1,
34 BCT_GVERT = 2,
35 BCT_GDIAGONAL1 = 3,
36 BCT_GDIAGONAL2 = 4,
37 BCT_GCIRCLE = 5,
38 BCT_GRECT = 6,
39 BCT_GPIPECROSS = 7,
40 BCT_GPYRAMID = 8
41};
42
43enum FillType
44{
45 FT_BRUSH = 0,
46 FT_GRADIENT = 1
47};
48
49class KoBrush
50{
51public:
52 KoBrush();
53 KoBrush( const TQBrush &brush, const TQColor &gColor1, const TQColor &gColor2,
54 BCType gType, FillType fillType, bool unbalanced,
55 int xfactor, int yfactor );
56
57 KoBrush &operator=( const KoBrush &brush );
58
59 void setBrush( const TQBrush &brush )
60 { m_brush = brush; }
61 void setGColor1( const TQColor &gColor1 )
62 { m_gColor1 = gColor1; }
63 void setGColor2( const TQColor &gColor2 )
64 { m_gColor2 = gColor2; }
65 void setGType( BCType gType )
66 { m_gType = gType; }
67 void setFillType( FillType fillType )
68 { m_fillType = fillType; }
69 void setGUnbalanced( bool unbalanced )
70 { m_unbalanced = unbalanced; }
71 void setGXFactor( int xfactor )
72 { m_xfactor = xfactor; }
73 void setGYFactor( int yfactor )
74 { m_yfactor = yfactor; }
75
76 TQBrush getBrush() const
77 { return m_brush; }
78 TQColor getGColor1() const
79 { return m_gColor1; }
80 TQColor getGColor2() const
81 { return m_gColor2; }
82 BCType getGType() const
83 { return m_gType; }
84 FillType getFillType() const
85 { return m_fillType; }
86 bool getGUnbalanced() const
87 { return m_unbalanced; }
88 int getGXFactor() const
89 { return m_xfactor; }
90 int getGYFactor() const
91 { return m_yfactor; }
92
93private:
94 TQBrush m_brush;
95 TQColor m_gColor1;
96 TQColor m_gColor2;
97 BCType m_gType;
98 FillType m_fillType;
99 bool m_unbalanced;
100 int m_xfactor;
101 int m_yfactor;
102};
103
104#endif /* KOBRUSH_H */
105
A generic style, i.e.
Repository of styles used during saving of OASIS/OOo file.
Definition KoGenStyles.h:60
Used during loading of Oasis format (and discarded at the end of the loading).