25#include <tqdatetime.h>
27#include <KoStyleStack.h>
28#include <KoOasisStyles.h>
29#include <KoOasisContext.h>
31#include <KoPictureCollection.h>
41class KoTextZoomHandler;
53 Settings(
const BackType backType,
const TQColor backColor1,
const TQColor backColor2,
54 const BCType bcType,
const bool unbalanced,
const int xfactor,
const int yfactor,
55 const KoPictureKey &key,
const BackView backView )
56 : m_backType( backType )
57 , m_backColor1( backColor1 )
58 , m_backColor2( backColor2 )
60 , m_unbalanced( unbalanced )
61 , m_xfactor( xfactor )
62 , m_yfactor( yfactor )
63 , m_backPictureKey( key )
64 , m_backView( backView )
74 int m_xfactor, m_yfactor;
76 KoPictureKey m_backPictureKey;
80 KPrBackGround( KPrPage *_page );
83 void setBackType( BackType _backType )
86 if (backType==BT_PICTURE || backType==BT_CLIPART)
89 void setBackView( BackView _backView )
90 { backView = _backView; }
91 void setBackColor1(
const TQColor &_color )
92 { removeGradient(); backColor1 = _color; }
93 void setBackColor2(
const TQColor &_color )
94 { removeGradient(); backColor2 = _color; }
95 void setBackColorType( BCType _bcType )
96 { removeGradient(); bcType = _bcType; }
97 void setBackUnbalanced(
bool _unbalanced )
98 { removeGradient(); unbalanced = _unbalanced; }
99 void setBackXFactor(
int _xfactor )
100 { removeGradient(); xfactor = _xfactor; }
101 void setBackYFactor(
int _yfactor )
102 { removeGradient(); yfactor = _yfactor; }
104 void setBackPicture(
const KoPicture& picture );
105 void setBackPicture (
const KoPictureKey& key );
106 void setBackGround(
const struct Settings &settings );
107 struct Settings getBackGround() const;
109 KoPicture picture()
const {
return backPicture;}
111 BackType getBackType()
const
113 BackView getBackView()
const
115 TQColor getBackColor1()
const
116 {
return backColor1; }
117 TQColor getBackColor2()
const
118 {
return backColor2; }
119 BCType getBackColorType()
const
121 KoPictureKey getBackPictureKey()
const
122 {
return backPicture.getKey(); }
123 KoPicture getBackPicture()
const
124 {
return backPicture;}
126 bool getBackUnbalanced()
const
127 {
return unbalanced; }
128 int getBackXFactor()
const
130 int getBackYFactor()
const
135 void drawBackground( TQPainter *_painter,
const KoTextZoomHandler* zoomHandler,
136 const TQRect& crect,
bool _drawBorders );
138 void drawBackground( TQPainter *_painter,
const TQSize& ext,
139 const TQRect& crect,
bool _drawBorders );
143 TQDomElement save( TQDomDocument &doc );
144 void load(
const TQDomElement &element );
145 void loadOasis( KoOasisContext & context );
146 void saveOasisBackgroundPageStyle( KoGenStyle &stylepageauto, KoGenStyles &mainStyles );
149 void drawBackColor( TQPainter *_painter,
const TQSize& ext,
const TQRect& crect );
150 void drawBackPix( TQPainter *_painter,
const TQSize& ext,
const TQRect& crect );
151 void drawBorders( TQPainter *_painter,
const TQSize& ext,
const TQRect& crect );
153 void removeGradient();
155 void generateGradient(
const TQSize& size );
157 KoPictureCollection *pictureCollection()
const;
160 TQString saveOasisPictureStyle( KoGenStyles& mainStyles );
170 KoPicture backPicture;
173 const TQPixmap *gradientPixmap;
181 int xfactor, yfactor;
Class: KPrGradientCollection Holds a collection of gradients, and is able to provide a gradient for a...