kpresenter

KPrPieObjectIface.cpp
1/* This file is part of the KDE project
2 Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#include "KPrPieObjectIface.h"
21#include "KPrPieObject.h"
22#include "KPrObject.h"
23#include "KPrUtils.h"
24#include <tdeapplication.h>
25#include <dcopclient.h>
26#include <kdebug.h>
27
28KPrPieObjectIface::KPrPieObjectIface( KPrPieObject *_obj )
29 : KPrObject2DIface(_obj)
30{
31 obj = _obj;
32}
33
34void KPrPieObjectIface::setPieAngle( int _p_angle )
35{
36 obj->setPieAngle(_p_angle);
37}
38
39void KPrPieObjectIface::setPieLength( int _p_len )
40{
41 obj->setPieLength(_p_len);
42}
43
44int KPrPieObjectIface::pieAngle() const
45{
46 return obj->getPieAngle();
47}
48
49int KPrPieObjectIface::pieLength() const
50{
51 return obj->getPieLength();
52}
53
54void KPrPieObjectIface::setPieType( const TQString & type )
55{
56 if( type =="Pie")
57 obj->setPieType(PT_PIE);
58 else if(type=="Arc")
59 obj->setPieType(PT_ARC);
60 else if(type=="Chord")
61 obj->setPieType(PT_CHORD);
62}
63
64void KPrPieObjectIface::setLineBegin( const TQString & type)
65{
66 obj->setLineBegin(lineEndBeginFromString( type ));
67}
68
69void KPrPieObjectIface::setLineEnd( const TQString & type)
70{
71 obj->setLineEnd(lineEndBeginFromString( type ));
72}
73
74void KPrPieObjectIface::horizontalFlip()
75{
76 obj->flip( true);
77}
78
79void KPrPieObjectIface::verticalFlip()
80{
81 obj->flip( false );
82}