kpresenter
KPrTextObjectIface.h
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 #ifndef KPRESENTER_TEXTOBJECT_IFACE_H 00022 #define KPRESENTER_TEXTOBJECT_IFACE_H 00023 00024 #include <KoDocumentIface.h> 00025 #include <dcopref.h> 00026 #include "KPrObject2DIface.h" 00027 #include <qstring.h> 00028 #include <qcolor.h> 00029 #include <qfont.h> 00030 class KPrTextObject; 00031 00032 class KPrTextObjectIface : public KPrObject2DIface 00033 { 00034 K_DCOP 00035 public: 00036 KPrTextObjectIface( KPrTextObject *_textobject ); 00037 00038 k_dcop: 00039 DCOPRef startEditing(); 00040 bool hasSelection() const; 00041 QString selectedText() const; 00042 void selectAll( bool select ); 00043 void recalcPageNum( ); 00044 00045 void setBoldText( bool b ); 00046 void setItalicText( bool b ); 00047 void setUnderlineText( bool b ); 00048 void setStrikeOutText( bool b ); 00049 void setTextColor( const QColor &col ); 00050 void setTextPointSize( int s ); 00051 void setTextSubScript( bool b ); 00052 void setTextSuperScript( bool b ); 00053 void setTextDefaultFormat(); 00054 void setTextBackgroundColor(const QColor & col); 00055 void setTextFamilyFont(const QString &font); 00056 void changeCaseOfText( const QString & caseType); 00057 void setDoubleUnderlineText(bool on); 00058 void setUnderlineColor( const QColor & color ); 00059 00060 QColor textColor() const; 00061 QFont textFont() const; 00062 QString textFontFamily()const; 00063 QColor textBackgroundColor()const; 00064 QColor textUnderlineColor() const; 00065 00066 bool textItalic() const; 00067 bool textBold() const; 00068 bool textUnderline()const; 00069 bool textStrikeOut()const; 00070 bool textSubScript() const; 00071 bool textSuperScript() const; 00072 00073 void extendTextContentsToHeight(); 00074 void extendTextObjectToContents(); 00075 void setProtectContent ( bool _protect ); 00076 bool isProtectContent() const; 00077 bool textDoubleUnderline()const; 00078 00079 double ptMarginLeft()const; 00080 double ptMarginRight()const; 00081 double ptMarginTop()const; 00082 double ptMarginBottom()const; 00083 00084 void setPtMarginLeft(double val); 00085 void setPtMarginRight(double val); 00086 void setPtMarginTop(double val); 00087 void setPtMarginBottom(double val); 00088 00089 void setVerticalAligment( const QString & type); 00090 QString verticalAlignment() const; 00091 00092 //bool textShadow() const; 00093 //void setTextShadow( bool b ); 00094 00095 double relativeTextSize() const; 00096 void setRelativeTextSize( double _size ); 00097 00098 bool wordByWord() const; 00099 void setWordByWord( bool _b ); 00100 00101 QString fontAttribute()const; 00102 QString underlineLineStyle() const; 00103 QString strikeOutLineStyle()const; 00104 00105 00106 private: 00107 KPrTextObject *m_textobject; 00108 }; 00109 00110 #endif