kpresenter

KPrPixmapObjectIface.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) 2002 Laurent MONTEL <lmontel@mandrakesoft.com>
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 "KPrPixmapObjectIface.h"
00022 #include "KPrPixmapObject.h"
00023 #include "KPrObject.h"
00024 
00025 #include <kapplication.h>
00026 #include <dcopclient.h>
00027 
00028 KPrPixmapObjectIface::KPrPixmapObjectIface( KPrPixmapObject *_obj )
00029     : KPrObject2DIface(_obj)
00030 {
00031     obj = _obj;
00032 }
00033 
00034 QString KPrPixmapObjectIface::fileName() const
00035 {
00036     return obj->getFileName();
00037 }
00038 
00039 bool KPrPixmapObjectIface::swapRGB() const
00040 {
00041     return obj->getPictureSwapRGB();
00042 }
00043 
00044 bool KPrPixmapObjectIface::grayscale() const
00045 {
00046     return obj->getPictureGrayscal();
00047 }
00048 
00049 int KPrPixmapObjectIface::depth() const
00050 {
00051     return obj->getPictureDepth();
00052 }
00053 
00054 int KPrPixmapObjectIface::pictureMirrorType() const
00055 {
00056     return obj->getPictureMirrorType();
00057 }
00058 
00059 int KPrPixmapObjectIface::brightness() const
00060 {
00061     return obj->getPictureBright();
00062 }
00063 
00064 void KPrPixmapObjectIface::setDepth(int depth )
00065 {
00066     obj->setPictureDepth(depth);
00067 }
00068 
00069 void KPrPixmapObjectIface::setBrightness(int bright )
00070 {
00071     obj->setPictureBright(bright);
00072 }
00073 
00074 void KPrPixmapObjectIface::setSwapRGB(bool swapRGB )
00075 {
00076     obj->setPictureSwapRGB(swapRGB);
00077 }
00078 
00079 void KPrPixmapObjectIface::setGrayscale( bool grayscal )
00080 {
00081     obj->setPictureGrayscal(grayscal);
00082 }
00083 
00084 void KPrPixmapObjectIface::loadImage( const QString & fileName )
00085 {
00086     obj->loadPicture(fileName);
00087 }
00088 
00089 void KPrPixmapObjectIface::setPictureMirrorType(const QString & _mirror)
00090 {
00091     if ( _mirror.lower()=="normal")
00092         obj->setPictureMirrorType( PM_NORMAL);
00093     else if ( _mirror.lower()=="horizontal")
00094         obj->setPictureMirrorType( PM_HORIZONTAL );
00095     else if ( _mirror.lower()=="vertical")
00096         obj->setPictureMirrorType( PM_VERTICAL );
00097     else if ( _mirror.lower()=="horizontalandvertical")
00098         obj->setPictureMirrorType( PM_HORIZONTALANDVERTICAL );
00099     else
00100         kdDebug(33001)<<" Error in setPictureMirrorType :"<<_mirror<<endl;
00101 }
KDE Home | KDE Accessibility Home | Description of Access Keys