kpresenter

KPrPixmapObjectIface.cpp
1/* This file is part of the KDE project
2 Copyright (C) 2002 Laurent MONTEL <lmontel@mandrakesoft.com>
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 "KPrPixmapObjectIface.h"
21#include "KPrPixmapObject.h"
22#include "KPrObject.h"
23
24#include <tdeapplication.h>
25#include <dcopclient.h>
26
27KPrPixmapObjectIface::KPrPixmapObjectIface( KPrPixmapObject *_obj )
28 : KPrObject2DIface(_obj)
29{
30 obj = _obj;
31}
32
33TQString KPrPixmapObjectIface::fileName() const
34{
35 return obj->getFileName();
36}
37
38bool KPrPixmapObjectIface::swapRGB() const
39{
40 return obj->getPictureSwapRGB();
41}
42
43bool KPrPixmapObjectIface::grayscale() const
44{
45 return obj->getPictureGrayscal();
46}
47
48int KPrPixmapObjectIface::depth() const
49{
50 return obj->getPictureDepth();
51}
52
53int KPrPixmapObjectIface::pictureMirrorType() const
54{
55 return obj->getPictureMirrorType();
56}
57
58int KPrPixmapObjectIface::brightness() const
59{
60 return obj->getPictureBright();
61}
62
63void KPrPixmapObjectIface::setDepth(int depth )
64{
65 obj->setPictureDepth(depth);
66}
67
68void KPrPixmapObjectIface::setBrightness(int bright )
69{
70 obj->setPictureBright(bright);
71}
72
73void KPrPixmapObjectIface::setSwapRGB(bool swapRGB )
74{
75 obj->setPictureSwapRGB(swapRGB);
76}
77
78void KPrPixmapObjectIface::setGrayscale( bool grayscal )
79{
80 obj->setPictureGrayscal(grayscal);
81}
82
83void KPrPixmapObjectIface::loadImage( const TQString & fileName )
84{
85 obj->loadPicture(fileName);
86}
87
88void KPrPixmapObjectIface::setPictureMirrorType(const TQString & _mirror)
89{
90 if ( _mirror.lower()=="normal")
91 obj->setPictureMirrorType( PM_NORMAL);
92 else if ( _mirror.lower()=="horizontal")
93 obj->setPictureMirrorType( PM_HORIZONTAL );
94 else if ( _mirror.lower()=="vertical")
95 obj->setPictureMirrorType( PM_VERTICAL );
96 else if ( _mirror.lower()=="horizontalandvertical")
97 obj->setPictureMirrorType( PM_HORIZONTALANDVERTICAL );
98 else
99 kdDebug(33001)<<" Error in setPictureMirrorType :"<<_mirror<<endl;
100}