00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KOBRUSH_H
00022 #define KOBRUSH_H
00023
00024 #include <QBrush>
00025
00026 #include "koffice_export.h"
00027
00028 class KoGenStyle;
00029 class KoGenStyles;
00030 class KoOasisContext;
00031 class QDomElement;
00032
00033
00034 enum BCType {
00035 BCT_PLAIN = 0,
00036 BCT_GHORZ = 1,
00037 BCT_GVERT = 2,
00038 BCT_GDIAGONAL1 = 3,
00039 BCT_GDIAGONAL2 = 4,
00040 BCT_GCIRCLE = 5,
00041 BCT_GRECT = 6,
00042 BCT_GPIPECROSS = 7,
00043 BCT_GPYRAMID = 8
00044 };
00045
00046 enum FillType
00047 {
00048 FT_BRUSH = 0,
00049 FT_GRADIENT = 1
00050 };
00051
00052 class KOFFICEUI_EXPORT KoBrush
00053 {
00054 public:
00055 KoBrush();
00056 KoBrush( const QBrush &brush, const QColor &gColor1, const QColor &gColor2,
00057 BCType gType, FillType fillType, bool unbalanced,
00058 int xfactor, int yfactor );
00059
00060 KoBrush &operator=( const KoBrush &brush );
00061
00062 void setBrush( const QBrush &brush )
00063 { m_brush = brush; }
00064 void setGColor1( const QColor &gColor1 )
00065 { m_gColor1 = gColor1; }
00066 void setGColor2( const QColor &gColor2 )
00067 { m_gColor2 = gColor2; }
00068 void setGType( BCType gType )
00069 { m_gType = gType; }
00070 void setFillType( FillType fillType )
00071 { m_fillType = fillType; }
00072 void setGUnbalanced( bool unbalanced )
00073 { m_unbalanced = unbalanced; }
00074 void setGXFactor( int xfactor )
00075 { m_xfactor = xfactor; }
00076 void setGYFactor( int yfactor )
00077 { m_yfactor = yfactor; }
00078
00079 QBrush getBrush() const
00080 { return m_brush; }
00081 QColor getGColor1() const
00082 { return m_gColor1; }
00083 QColor getGColor2() const
00084 { return m_gColor2; }
00085 BCType getGType() const
00086 { return m_gType; }
00087 FillType getFillType() const
00088 { return m_fillType; }
00089 bool getGUnbalanced() const
00090 { return m_unbalanced; }
00091 int getGXFactor() const
00092 { return m_xfactor; }
00093 int getGYFactor() const
00094 { return m_yfactor; }
00095
00096 private:
00097 QBrush m_brush;
00098 QColor m_gColor1;
00099 QColor m_gColor2;
00100 BCType m_gType;
00101 FillType m_fillType;
00102 bool m_unbalanced;
00103 int m_xfactor;
00104 int m_yfactor;
00105 };
00106
00107 #endif
00108