kpresenter
KPrObject2DIface.cpp00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "KPrObject2DIface.h"
00022 #include "KPrObjectIface.h"
00023
00024 #include "KPrObject.h"
00025 #include <kdebug.h>
00026 #include <kapplication.h>
00027 #include <dcopclient.h>
00028
00029 KPrObject2DIface::KPrObject2DIface(KPr2DObject *obj_)
00030 : KPrObjectIface(obj_)
00031 {
00032 obj = obj_;
00033 }
00034
00035 QColor KPrObject2DIface::gradientColor1() const
00036 {
00037 return obj->getGColor1();
00038 }
00039
00040 QColor KPrObject2DIface::gradientColor2() const
00041 {
00042 return obj->getGColor2();
00043 }
00044
00045 void KPrObject2DIface::setGUnbalanced( bool b )
00046 {
00047 obj->setGUnbalanced(b);
00048 }
00049
00050 void KPrObject2DIface::setGXFactor( int f )
00051 {
00052 obj->setGXFactor(f);
00053 }
00054
00055 void KPrObject2DIface::setGYFactor( int f )
00056 {
00057 obj->setGYFactor(f);
00058 }
00059
00060 int KPrObject2DIface::xGradientFactor() const
00061 {
00062 return obj->getGXFactor();
00063 }
00064
00065 int KPrObject2DIface::yGradientFactor() const
00066 {
00067 return obj->getGYFactor();
00068 }
00069
00070 QString KPrObject2DIface::gradientFillType() const
00071 {
00072 switch(obj->getFillType())
00073 {
00074 case FT_BRUSH:
00075 return QString("BRUSH");
00076 case FT_GRADIENT:
00077 return QString("GRADIENT");
00078 }
00079 return QString::null;
00080 }
00081
00082 void KPrObject2DIface::setGradientType( const QString & type)
00083 {
00084 if(type=="PLAIN")
00085 obj->setGType(BCT_PLAIN);
00086 else if(type=="GHORZ")
00087 obj->setGType(BCT_GHORZ);
00088 else if(type=="GVERT")
00089 obj->setGType(BCT_GVERT);
00090 else if(type=="GDIAGONAL1")
00091 obj->setGType(BCT_GDIAGONAL1);
00092 else if(type=="GDIAGONAL2")
00093 obj->setGType(BCT_GDIAGONAL2);
00094 else if(type=="GCIRCLE")
00095 obj->setGType(BCT_GCIRCLE);
00096 else if(type=="GRECT")
00097 obj->setGType(BCT_GRECT);
00098 else if(type=="GPIPECROSS")
00099 obj->setGType(BCT_GPIPECROSS);
00100 else if(type=="GPYRAMID")
00101 obj->setGType(BCT_GPYRAMID);
00102 else
00103 kdDebug(33001)<<"Error KPrObject2DIface::setGradientType\n";
00104 }
00105
00106 void KPrObject2DIface::setFillType( const QString & type)
00107 {
00108 if(type=="BRUSH")
00109 obj->setFillType(FT_BRUSH);
00110 else if(type=="GRADIENT")
00111 obj->setFillType(FT_GRADIENT);
00112 else
00113 kdDebug(33001)<<"Error KPrObject2DIface::setFillType\n";
00114 }
00115
00116 void KPrObject2DIface::setGradientColor1( const QColor &col )
00117 {
00118 obj->setGColor1( col );
00119 }
00120
00121 void KPrObject2DIface::setGradientColor2( const QColor &col )
00122 {
00123 obj->setGColor2( col );
00124 }
|