00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
#ifndef KOTEXTVIEW_IFACE_H
00021
#define KOTEXTVIEW_IFACE_H
00022
00023
#include <KoDocumentIface.h>
00024
#include <dcopref.h>
00025
00026
#include <qstring.h>
00027
#include <qcolor.h>
00028
#include <korichtext.h>
00029
class KoTextView;
00030
00031
class KoTextViewIface :
public DCOPObject
00032 {
00033 K_DCOP
00034
public:
00035 KoTextViewIface(
KoTextView *_textview );
00036
00037 k_dcop:
00038
void insertSoftHyphen();
00039
void insertNonbreakingSpace();
00040
void insertText(
const QString &text );
00041
void newParagraph();
00042
void setBold(
bool b);
00043
void setItalic(
bool on);
00044
void setUnderline(
bool on);
00045
void setDoubleUnderline(
bool on);
00046
void setStrikeOut(
bool on);
00047
void setPointSize(
int s );
00048
void setTextSubScript(
bool on);
00049
void setTextSuperScript(
bool on);
00050
void setUnderlineColor(
const QColor & color );
00051
void setDefaultFormat();
00052
void setRelativeTextSize(
double _size);
00053
00054
QColor textColor() const;
00055
QString textFontFamily()const;
00056
QColor textBackgroundColor()const;
00057
QColor textUnderlineColor() const;
00058
bool textDoubleUnderline() const;
00059
00060
bool textItalic() const;
00061
bool textBold() const;
00062
bool textUnderline()const;
00063
bool textStrikeOut()const;
00064
bool textSubScript() const;
00065
bool textSuperScript() const;
00066
00067
double relativeTextSize() const;
00068
bool wordByWord() const;
00069
00070
void setWordByWord(
bool _b );
00071
void setTextColor(const
QColor &color);
00072
void setTextBackgroundColor(const
QColor &);
00073
void setAlign(
int align);
00074
void setAlign(const
QString &);
00075
00076
bool isReadWrite() const ;
00077
void setReadWrite(
bool b );
00078
00079
void hideCursor();
00080
void showCursor();
00081
00082
void moveCursorLeft(
bool select);
00083
void moveCursorRight(
bool select);
00084
void moveCursorUp(
bool select);
00085
void moveCursorDown(
bool select);
00086
void moveCursorHome(
bool select);
00087
void moveCursorEnd(
bool select);
00088
void moveCursorWordRight(
bool select);
00089
void moveCursorWordLeft(
bool select);
00090
void moveCursorLineEnd(
bool select);
00091
void moveCursorLineStart(
bool select);
00092
00093
bool paragraphHasBorder() const;
00094
00095
00096
double lineSpacing() const;
00097
00098
double rightMargin() const;
00099
double leftMargin() const;
00100
double marginFirstLine() const;
00101
double spaceAfterParag() const;
00102
double spaceBeforeParag() const;
00103
00104
void setMarginFirstLine(
double pt);
00105
void setLineSpacing(
double pt);
00106
void setLeftMargin(
double pt);
00107
void setRightMargin(
double pt);
00108
void setSpaceBeforeParag(
double pt);
00109
void setSpaceAfterParag(
double pt);
00110
00111
00112
void setLeftBorder( const QColor & c,
double width );
00113
void setRightBorder( const QColor & c,
double width );
00114
00115
void setTopBorder( const QColor & c,
double width );
00116
void setBottomBorder(const QColor & c,
double width );
00117
00118
void setLeftBorderColor( const QColor & c );
00119
void setRightBorderColor( const QColor & c );
00120
void setTopBorderColor( const QColor & c);
00121
void setBottomBorderColor(const QColor & c );
00122
void setLeftBorderWidth(
double _witdh );
00123
void setRightBorderWidth(
double _witdh );
00124
void setTopBorderWidth(
double _witdh );
00125
void setBottomBorderWidth(
double _witdh );
00126
00127
00128
00129
double leftBorderWidth() const ;
00130
double rightBorderWidth() const;
00131
double topBorderWidth() const;
00132
double bottomBorderWidth() const;
00133
00134 QColor leftBorderColor() const ;
00135 QColor rightBorderColor() const;
00136 QColor topBorderColor() const;
00137 QColor bottomBorderColor() const;
00138
00139
void changeCaseOfText( const QString & caseType);
00140
bool isALinkVariable() const;
00141
00142
bool changeLinkVariableUrl( const QString & _url) const;
00143
00144
bool changeLinkVariableName( const QString & _name) const;
00145
00146
00147
00148 QString linkVariableUrl( ) const;
00149 QString linkVariableName( ) const;
00150
00151
bool isANoteVariable() const ;
00152 QString noteVariableText() const;
00153
00154
bool setNoteVariableText(const QString & note) const;
00155
00156
void removeComment();
00157 QString underlineStyle() const;
00158 QString strikeOutStyle()const;
00159
00160
void setLanguage(const QString & _lang);
00161 QString language() const;
00162
void addBookmarks(const QString &url);
00163
void copyLink();
00164
void removeLink();
00165
void copyTextOfComment();
00166 QString fontAttibute()const;
00167 private:
00168
KoTextView *m_textView;
00169 protected:
00170
00171 };
00172
00173 #endif