kpresenter

KPrObjectIface.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    Copyright (C) 2005 Thorsten Zachmann <zachmann@kde.org>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #include "KPrObjectIface.h"
00023 
00024 #include "KPrObject.h"
00025 #include <kdebug.h>
00026 #include <kapplication.h>
00027 #include <dcopclient.h>
00028 
00029 KPrObjectIface::KPrObjectIface( KPrObject *obj_ )
00030     : DCOPObject()
00031 {
00032     obj = obj_;
00033 }
00034 
00035 int KPrObjectIface::getType() const
00036 {
00037     return (int)obj->getType();
00038 }
00039 
00040 bool KPrObjectIface::isSelected() const
00041 {
00042     return obj->isSelected();
00043 }
00044 
00045 float KPrObjectIface::angle() const
00046 {
00047     return obj->getAngle();
00048 }
00049 
00050 int KPrObjectIface::shadowDistance() const
00051 {
00052     return obj->getShadowDistance();
00053 }
00054 
00055 int KPrObjectIface::shadowDirection() const
00056 {
00057     return (int)obj->getShadowDirection();
00058 }
00059 
00060 QColor KPrObjectIface::shadowColor() const
00061 {
00062     return obj->getShadowColor();
00063 }
00064 
00065 int KPrObjectIface::effect() const
00066 {
00067     return (int)obj->getEffect();
00068 }
00069 
00070 int KPrObjectIface::effect2() const
00071 {
00072     return (int)obj->getEffect2();
00073 }
00074 
00075 int KPrObjectIface::appearStep() const
00076 {
00077     return obj->getAppearStep();
00078 }
00079 
00080 int KPrObjectIface::subPresSteps() const
00081 {
00082     return obj->getSubPresSteps();
00083 }
00084 
00085 bool KPrObjectIface::disappear() const
00086 {
00087     return obj->getDisappear();
00088 }
00089 
00090 int KPrObjectIface::disappearStep() const
00091 {
00092     return obj->getDisappearStep();
00093 }
00094 
00095 int KPrObjectIface::effect3() const
00096 {
00097     return (int)obj->getEffect3();
00098 }
00099 
00100 void KPrObjectIface::setSelected( bool _selected )
00101 {
00102     obj->setSelected(_selected);
00103 }
00104 
00105 void KPrObjectIface::rotate( float _angle )
00106 {
00107     obj->rotate(_angle);
00108 }
00109 
00110 void KPrObjectIface::setShadowDistance( int _distance )
00111 {
00112     obj->setShadowDistance(_distance);
00113 }
00114 
00115 void KPrObjectIface::shadowColor( const QColor & _color )
00116 {
00117     obj->setShadowColor(_color);
00118 }
00119 
00120 void KPrObjectIface::setAppearTimer( int _appearTimer )
00121 {
00122     obj->setAppearTimer(_appearTimer);
00123 }
00124 
00125 void KPrObjectIface::setDisappearTimer( int _disappearTimer )
00126 {
00127     obj->setDisappearTimer(_disappearTimer);
00128 }
00129 
00130 void KPrObjectIface::setAppearSoundEffect( bool b )
00131 {
00132     obj->setAppearSoundEffect(b);
00133 }
00134 
00135 void KPrObjectIface::setDisappearSoundEffect( bool b )
00136 {
00137     obj->setDisappearSoundEffect(b);
00138 }
00139 void KPrObjectIface::setAppearSoundEffectFileName( const QString & _a_fileName )
00140 {
00141     obj->setAppearSoundEffectFileName(_a_fileName);
00142 }
00143 void KPrObjectIface::setDisappearSoundEffectFileName( const QString &_d_fileName )
00144 {
00145     obj->setDisappearSoundEffectFileName(_d_fileName);
00146 }
00147 
00148 void KPrObjectIface::setObjectName( const QString &_objectName )
00149 {
00150     obj->setObjectName(_objectName);
00151 }
00152 
00153 void KPrObjectIface::setAppearStep( int _appearStep )
00154 {
00155     obj->setAppearStep(_appearStep);
00156 }
00157 
00158 void KPrObjectIface::setDisappear( bool b )
00159 {
00160     obj->setDisappear(b);
00161 }
00162 
00163 int KPrObjectIface::appearTimer() const
00164 {
00165     return obj->getAppearTimer();
00166 }
00167 
00168 int KPrObjectIface::disappearTimer() const
00169 {
00170     return obj->getDisappearTimer();
00171 }
00172 
00173 bool KPrObjectIface::appearSoundEffect() const
00174 {
00175     return obj->getAppearSoundEffect();
00176 }
00177 
00178 bool KPrObjectIface::disappearSoundEffect() const
00179 {
00180     return obj->getDisappearSoundEffect();
00181 }
00182 
00183 QString KPrObjectIface::appearSoundEffectFileName() const
00184 {
00185     return obj->getAppearSoundEffectFileName();
00186 }
00187 
00188 QString KPrObjectIface::disappearSoundEffectFileName() const
00189 {
00190     return obj->getDisappearSoundEffectFileName();
00191 }
00192 
00193 QString KPrObjectIface::typeString() const
00194 {
00195     return obj->getTypeString();
00196 }
00197 
00198 void KPrObjectIface::setEffect(const QString & effect)
00199 {
00200     if(effect=="NONE")
00201         obj->setEffect(EF_NONE);
00202     else if(effect=="COME_RIGHT")
00203         obj->setEffect(EF_COME_RIGHT);
00204     else if(effect=="COME_LEFT")
00205         obj->setEffect(EF_COME_LEFT);
00206     else if(effect=="COME_TOP")
00207         obj->setEffect(EF_COME_TOP);
00208     else if(effect=="COME_BOTTOM")
00209         obj->setEffect(EF_COME_BOTTOM);
00210     else if(effect=="COME_RIGHT_TOP")
00211         obj->setEffect(EF_COME_RIGHT_TOP);
00212     else if(effect=="COME_RIGHT_BOTTOM")
00213         obj->setEffect(EF_COME_RIGHT_BOTTOM);
00214     else if(effect=="COME_LEFT_TOP")
00215         obj->setEffect(EF_COME_LEFT_TOP);
00216     else if(effect=="COME_LEFT_BOTTOM")
00217         obj->setEffect(EF_COME_LEFT_BOTTOM);
00218     else if(effect=="WIPE_LEFT")
00219         obj->setEffect(EF_WIPE_LEFT);
00220     else if(effect=="WIPE_RIGHT")
00221         obj->setEffect(EF_WIPE_RIGHT);
00222     else if(effect=="WIPE_TOP")
00223         obj->setEffect(EF_WIPE_TOP);
00224     else if(effect=="WIPE_BOTTOM")
00225         obj->setEffect(EF_WIPE_BOTTOM);
00226     else
00227         kdDebug(33001)<<"Error : setEffect()\n";
00228 }
00229 
00230 void KPrObjectIface::setEffect3(const QString & effect)
00231 {
00232     if(effect=="NONE")
00233         obj->setEffect3(EF3_NONE);
00234     else if(effect=="GO_RIGHT")
00235         obj->setEffect3(EF3_GO_RIGHT);
00236     else if(effect=="GO_LEFT")
00237         obj->setEffect3(EF3_GO_LEFT);
00238     else if(effect=="GO_TOP")
00239         obj->setEffect3(EF3_GO_TOP);
00240     else if(effect=="GO_BOTTOM")
00241         obj->setEffect3(EF3_GO_BOTTOM);
00242     else if(effect=="GO_RIGHT_TOP")
00243         obj->setEffect3(EF3_GO_RIGHT_TOP);
00244     else if(effect=="GO_RIGHT_BOTTOM")
00245         obj->setEffect3(EF3_GO_RIGHT_BOTTOM);
00246     else if(effect=="GO_LEFT_TOP")
00247         obj->setEffect3(EF3_GO_LEFT_TOP);
00248     else if(effect=="GO_LEFT_BOTTOM")
00249         obj->setEffect3(EF3_GO_LEFT_BOTTOM);
00250     else if(effect=="WIPE_LEFT")
00251         obj->setEffect3(EF3_WIPE_LEFT);
00252     else if(effect=="WIPE_RIGHT")
00253         obj->setEffect3(EF3_WIPE_RIGHT);
00254     else if(effect=="WIPE_TOP")
00255         obj->setEffect3(EF3_WIPE_TOP);
00256     else if(effect=="WIPE_BOTTOM")
00257         obj->setEffect3(EF3_WIPE_BOTTOM);
00258 }
00259 
00260 void KPrObjectIface::setProtected( bool b )
00261 {
00262     obj->setProtect(b);
00263 }
00264 
00265 bool KPrObjectIface::isProtected() const
00266 {
00267     return obj->isProtect();
00268 }
00269 
00270 void KPrObjectIface::setKeepRatio( bool b )
00271 {
00272     obj->setKeepRatio(b);
00273 }
00274 
00275 bool KPrObjectIface::isKeepRatio() const
00276 {
00277     return obj->isKeepRatio();
00278 }
00279 
00280 void KPrObjectIface::move( double x, double y )
00281 {
00282     obj->setOrig( x, y );
00283 }
00284 
00285 void KPrObjectIface::resize( double width, double height )
00286 {
00287     obj->setSize( width, height );
00288 }
KDE Home | KDE Accessibility Home | Description of Access Keys