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