kpresenter
KPrRectObject.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef kprectobject_h
00023 #define kprectobject_h
00024
00025 #include <KoBrush.h>
00026
00027 #include "KPrObject.h"
00028
00029 class KPrGradient;
00030 class DCOPObject;
00031
00032 class KPrRectObject : public KPr2DObject
00033 {
00034 public:
00035 KPrRectObject();
00036 KPrRectObject( const KoPen &_pen, const QBrush &_brush, FillType _fillType,
00037 const QColor &_gColor1, const QColor &_gColor2,
00038 BCType _gType, int _xRnd, int _yRnd,
00039 bool _unbalanced, int _xfactor, int _yfactor );
00040 virtual ~KPrRectObject() {}
00041 virtual DCOPObject* dcopObject();
00042
00043 KPrRectObject &operator=( const KPrRectObject & );
00044
00045 virtual void setRnds( int _xRnd, int _yRnd )
00046 { xRnd = _xRnd; yRnd = _yRnd; m_redrawGradientPix = true; }
00047
00048 virtual ObjType getType() const
00049 { return OT_RECT; }
00050 virtual QString getTypeString() const
00051 { return i18n("Rectangle"); }
00052 virtual void getRnds( int &_xRnd, int &_yRnd ) const
00053 { _xRnd = xRnd; _yRnd = yRnd; }
00054
00055 virtual QDomDocumentFragment save( QDomDocument& doc, double offset );
00056 virtual double load(const QDomElement &element);
00057 virtual void loadOasis(const QDomElement &element, KoOasisContext &context, KPrLoadingInfo *info);
00058
00059 protected:
00060 virtual const char * getOasisElementName() const;
00061 virtual bool saveOasisObjectAttributes( KPOasisSaveContext &sc ) const;
00062
00063 virtual void paint( QPainter *_painter,KoTextZoomHandler*_zoomHandler,
00064 int , bool drawingShadow, bool drawContour );
00065
00066 int xRnd, yRnd;
00067 private:
00072 QPointArray boundingRegion( int x, int y, int w, int h, int _xRnd, int _yRnd) const;
00073 };
00074
00075 #endif
|