1
// -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*-
2
/* This file is part of the KDE project
3
Copyright (C) 2002 Laurent MONTEL <lmontel@mandrakesoft.com>
5
This library is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Library General Public
7
License as published by the Free Software Foundation; either
8
version 2 of the License, or (at your option) any later version.
10
This library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Library General Public License for more details.
15
You should have received a copy of the GNU Library General Public License
16
along with this library; see the file COPYING.LIB. If not, write to
17
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
Boston, MA 02111-1307, USA.
21
#include "KPresenterObject2DIface.h"
22
#include "KPresenterObjectIface.h"
26
#include <kapplication.h>
27
#include <dcopclient.h>
29
KPresenterObject2DIface::KPresenterObject2DIface(KP2DObject *obj_)
30
: KPresenterObjectIface(obj_)
35
QColor KPresenterObject2DIface::gradientColor1() const
37
return obj->getGColor1();
40
QColor KPresenterObject2DIface::gradientColor2() const
42
return obj->getGColor2();
45
void KPresenterObject2DIface::setGUnbalanced( bool b )
47
obj->setGUnbalanced(b);
50
void KPresenterObject2DIface::setGXFactor( int f )
55
void KPresenterObject2DIface::setGYFactor( int f )
60
int KPresenterObject2DIface::xGradientFactor() const
62
return obj->getGXFactor();
65
int KPresenterObject2DIface::yGradientFactor() const
67
return obj->getGYFactor();
70
QString KPresenterObject2DIface::gradientFillType() const
72
switch(obj->getFillType())
75
return QString("BRUSH");
77
return QString("GRADIENT");
82
void KPresenterObject2DIface::setGradientType( const QString & type)
85
obj->setGType(BCT_PLAIN);
86
else if(type=="GHORZ")
87
obj->setGType(BCT_GHORZ);
88
else if(type=="GVERT")
89
obj->setGType(BCT_GVERT);
90
else if(type=="GDIAGONAL1")
91
obj->setGType(BCT_GDIAGONAL1);
92
else if(type=="GDIAGONAL2")
93
obj->setGType(BCT_GDIAGONAL2);
94
else if(type=="GCIRCLE")
95
obj->setGType(BCT_GCIRCLE);
96
else if(type=="GRECT")
97
obj->setGType(BCT_GRECT);
98
else if(type=="GPIPECROSS")
99
obj->setGType(BCT_GPIPECROSS);
100
else if(type=="GPYRAMID")
101
obj->setGType(BCT_GPYRAMID);
103
kdDebug(33001)<<"Error KPresenterObject2DIface::setGradientType\n";
106
void KPresenterObject2DIface::setFillType( const QString & type)
109
obj->setFillType(FT_BRUSH);
110
else if(type=="GRADIENT")
111
obj->setFillType(FT_GRADIENT);
113
kdDebug(33001)<<"Error KPresenterObject2DIface::setFillType\n";
116
void KPresenterObject2DIface::setGradientColor1( const QColor &col )
118
obj->setGColor1( col );
121
void KPresenterObject2DIface::setGradientColor2( const QColor &col )
123
obj->setGColor2( col );