kpresenter

KPrPieObjectIface.cpp

00001 // -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*-
00002 /* This file is part of the KDE project
00003    Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #include "KPrPieObjectIface.h"
00022 #include "KPrPieObject.h"
00023 #include "KPrObject.h"
00024 #include "KPrUtils.h"
00025 #include <kapplication.h>
00026 #include <dcopclient.h>
00027 #include <kdebug.h>
00028 
00029 KPrPieObjectIface::KPrPieObjectIface( KPrPieObject *_obj )
00030     : KPrObject2DIface(_obj)
00031 {
00032     obj = _obj;
00033 }
00034 
00035 void KPrPieObjectIface::setPieAngle( int _p_angle )
00036 {
00037     obj->setPieAngle(_p_angle);
00038 }
00039 
00040 void KPrPieObjectIface::setPieLength( int _p_len )
00041 {
00042     obj->setPieLength(_p_len);
00043 }
00044 
00045 int KPrPieObjectIface::pieAngle() const
00046 {
00047     return obj->getPieAngle();
00048 }
00049 
00050 int KPrPieObjectIface::pieLength() const
00051 {
00052     return obj->getPieLength();
00053 }
00054 
00055 void KPrPieObjectIface::setPieType( const QString & type )
00056 {
00057     if( type =="Pie")
00058         obj->setPieType(PT_PIE);
00059     else if(type=="Arc")
00060         obj->setPieType(PT_ARC);
00061     else if(type=="Chord")
00062         obj->setPieType(PT_CHORD);
00063 }
00064 
00065 void KPrPieObjectIface::setLineBegin( const QString & type)
00066 {
00067     obj->setLineBegin(lineEndBeginFromString( type ));
00068 }
00069 
00070 void KPrPieObjectIface::setLineEnd( const QString & type)
00071 {
00072     obj->setLineEnd(lineEndBeginFromString( type ));
00073 }
00074 
00075 void KPrPieObjectIface::horizontalFlip()
00076 {
00077     obj->flip( true);
00078 }
00079 
00080 void KPrPieObjectIface::verticalFlip()
00081 {
00082     obj->flip( false );
00083 }
KDE Home | KDE Accessibility Home | Description of Access Keys