~ubuntu-branches/ubuntu/edgy/koffice/edgy-updates

« back to all changes in this revision

Viewing changes to kpresenter/KPPieObjectIface.cc

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20040509113300-xi5t1z4yxe7n03x7
Tags: upstream-1.3.1
ImportĀ upstreamĀ versionĀ 1.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
 
4
 
 
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.
 
9
 
 
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.
 
14
 
 
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.
 
19
*/
 
20
 
 
21
#include "KPPieObjectIface.h"
 
22
#include "kppieobject.h"
 
23
#include "kpobject.h"
 
24
#include "kpresenter_utils.h"
 
25
#include <kapplication.h>
 
26
#include <dcopclient.h>
 
27
#include <kdebug.h>
 
28
 
 
29
KPPieObjectIface::KPPieObjectIface( KPPieObject *_obj )
 
30
    : KPresenterObject2DIface(_obj)
 
31
{
 
32
    obj = _obj;
 
33
}
 
34
 
 
35
void KPPieObjectIface::setPieAngle( int _p_angle )
 
36
{
 
37
    obj->setPieAngle(_p_angle);
 
38
}
 
39
 
 
40
void KPPieObjectIface::setPieLength( int _p_len )
 
41
{
 
42
    obj->setPieLength(_p_len);
 
43
}
 
44
 
 
45
int KPPieObjectIface::pieAngle() const
 
46
{
 
47
    return obj->getPieAngle();
 
48
}
 
49
 
 
50
int KPPieObjectIface::pieLength() const
 
51
{
 
52
    return obj->getPieLength();
 
53
}
 
54
 
 
55
void KPPieObjectIface::setPieType( const QString & type )
 
56
{
 
57
    if( type =="Pie")
 
58
        obj->setPieType(PT_PIE);
 
59
    else if(type=="Arc")
 
60
        obj->setPieType(PT_ARC);
 
61
    else if(type=="Chord")
 
62
        obj->setPieType(PT_CHORD);
 
63
}
 
64
 
 
65
void KPPieObjectIface::setLineBegin( const QString & type)
 
66
{
 
67
    obj->setLineBegin(lineEndBeginFromString( type ));
 
68
}
 
69
 
 
70
void KPPieObjectIface::setLineEnd( const QString & type)
 
71
{
 
72
    obj->setLineEnd(lineEndBeginFromString( type ));
 
73
}
 
74
 
 
75
void KPPieObjectIface::horizontalFlip()
 
76
{
 
77
    obj->flip( true);
 
78
}
 
79
 
 
80
void KPPieObjectIface::verticalFlip()
 
81
{
 
82
    obj->flip( false );
 
83
}