lib
KoTextFormatInterface Class Reference
#include <KoTextObject.h>
Inheritance diagram for KoTextFormatInterface:

Detailed Description
The KoTextFormatInterface is a pure interface that allows access to the "current text format".This is implemented by both KoTextObject and KoTextView. For KoTextView, it's the format under the cursor. For KoTextObject, it's the global format. By changing this format and calling setFormat (with the appropriate flags), it's possible to implement "setBold", "setItalic" etc. only once, whether it applies to a text selection or to complete text objects.
Definition at line 48 of file KoTextObject.h.
Public Member Functions | |
virtual KoTextFormat * | currentFormat () const =0 |
virtual bool | rtl () const =0 |
virtual KCommand * | setFormatCommand (const KoTextFormat *format, int flags, bool zoomFont=false)=0 |
virtual const KoParagLayout * | currentParagLayoutFormat () const =0 |
virtual KCommand * | setParagLayoutFormatCommand (KoParagLayout *newLayout, int flags, int marginIndex=-1)=0 |
virtual KCommand * | setChangeCaseOfTextCommand (KoChangeCaseDia::TypeOfCase _type)=0 |
KoTextDocCommand * | deleteTextCommand (KoTextDocument *textdoc, int id, int index, const QMemArray< KoTextStringChar > &str, const CustomItemsMap &customItemsMap, const QValueList< KoParagLayout > &oldParagLayouts) |
void | setParagLayoutFormat (KoParagLayout *newLayout, int flags, int marginIndex=-1) |
void | setFormat (KoTextFormat *newFormat, int flags, bool zoomFont=false) |
KCommand * | setBoldCommand (bool on) |
KCommand * | setItalicCommand (bool on) |
KCommand * | setUnderlineCommand (bool on) |
KCommand * | setDoubleUnderlineCommand (bool on) |
KCommand * | setUnderlineColorCommand (const QColor &color) |
KCommand * | setStrikeOutCommand (bool on) |
KCommand * | setTextColorCommand (const QColor &color) |
KCommand * | setPointSizeCommand (int s) |
KCommand * | setFamilyCommand (const QString &font) |
KCommand * | setTextSubScriptCommand (bool on) |
KCommand * | setTextSuperScriptCommand (bool on) |
KCommand * | setDefaultFormatCommand () |
KCommand * | setTextBackgroundColorCommand (const QColor &) |
KCommand * | setAlignCommand (int align) |
KCommand * | setMarginCommand (QStyleSheetItem::Margin m, double margin) |
KCommand * | setTabListCommand (const KoTabulatorList &tabList) |
KCommand * | setBackgroundColorCommand (const QColor &color) |
KCommand * | setCounterCommand (const KoParagCounter &counter) |
KCommand * | setLanguageCommand (const QString &) |
KCommand * | setShadowTextCommand (double shadowDistanceX, double shadowDistanceY, const QColor &shadowColor) |
KCommand * | setHyphenationCommand (bool _b) |
KCommand * | setFontAttributeCommand (KoTextFormat::AttributeStyle _att) |
KCommand * | setRelativeTextSizeCommand (double _size) |
KCommand * | setOffsetFromBaseLineCommand (int _offset) |
KCommand * | setWordByWordCommand (bool _b) |
QColor | textColor () const |
QFont | textFont () const |
QString | textFontFamily () const |
QString | language () const |
QColor | textBackgroundColor () const |
QColor | textUnderlineColor () const |
KoTextFormat::UnderlineType | underlineType () const |
KoTextFormat::StrikeOutType | strikeOutType () const |
KoTextFormat::UnderlineStyle | underlineStyle () const |
KoTextFormat::StrikeOutStyle | strikeOutStyle () const |
bool | textUnderline () const |
bool | textDoubleUnderline () const |
bool | textBold () const |
bool | textStrikeOut () const |
bool | textItalic () const |
bool | textSubScript () const |
bool | textSuperScript () const |
double | shadowDistanceX () const |
double | shadowDistanceY () const |
QColor | shadowColor () const |
KoTextFormat::AttributeStyle | fontAttribute () const |
double | relativeTextSize () const |
int | offsetFromBaseLine () const |
bool | wordByWord () const |
bool | hyphenation () const |
Member Function Documentation
virtual KoTextFormat* KoTextFormatInterface::currentFormat | ( | ) | const [pure virtual] |
virtual KCommand* KoTextFormatInterface::setFormatCommand | ( | const KoTextFormat * | format, | |
int | flags, | |||
bool | zoomFont = false | |||
) | [pure virtual] |
Interface for setting the modified format.
- Parameters:
-
format can be a temporary format zoomFont set to true if the font size was used-specified (e.g. in KoFontDia) flags see enum KoTextFormat::Flags
Implemented in KoTextObject, and KoTextView.
virtual const KoParagLayout* KoTextFormatInterface::currentParagLayoutFormat | ( | ) | const [pure virtual] |
virtual KCommand* KoTextFormatInterface::setParagLayoutFormatCommand | ( | KoParagLayout * | newLayout, | |
int | flags, | |||
int | marginIndex = -1 | |||
) | [pure virtual] |
Interface for changing the paragraph layout.
- Parameters:
-
newLayout pointer to the new layout to apply flags one of the KoParagLayout flags marginIndex type of margin. Only used if flags==KoParagLayoutMargins
Implemented in KoTextObject, and KoTextView.
The documentation for this class was generated from the following files: