lib

KoTextFormatInterface Class Reference

#include <KoTextObject.h>

Inheritance diagram for KoTextFormatInterface:

KoTextObject KoTextView List of all members.

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

 KoTextFormatInterface ()
virtual ~KoTextFormatInterface ()
virtual KoTextFormatcurrentFormat () const =0
virtual bool rtl () const =0
virtual KCommandsetFormatCommand (const KoTextFormat *format, int flags, bool zoomFont=false)=0
virtual const KoParagLayoutcurrentParagLayoutFormat () const =0
virtual KCommandsetParagLayoutFormatCommand (KoParagLayout *newLayout, int flags, int marginIndex=-1)=0
virtual KCommandsetChangeCaseOfTextCommand (KoChangeCaseDia::TypeOfCase _type)=0
KoTextDocCommanddeleteTextCommand (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)
KCommandsetBoldCommand (bool on)
KCommandsetItalicCommand (bool on)
KCommandsetUnderlineCommand (bool on)
KCommandsetDoubleUnderlineCommand (bool on)
KCommandsetUnderlineColorCommand (const QColor &color)
KCommandsetStrikeOutCommand (bool on)
KCommandsetTextColorCommand (const QColor &color)
KCommandsetPointSizeCommand (int s)
KCommandsetFamilyCommand (const QString &font)
KCommandsetTextSubScriptCommand (bool on)
KCommandsetTextSuperScriptCommand (bool on)
KCommandsetDefaultFormatCommand ()
KCommandsetTextBackgroundColorCommand (const QColor &)
KCommandsetAlignCommand (int align)
KCommandsetMarginCommand (QStyleSheetItem::Margin m, double margin)
KCommandsetTabListCommand (const KoTabulatorList &tabList)
KCommandsetBackgroundColorCommand (const QColor &color)
KCommandsetCounterCommand (const KoParagCounter &counter)
KCommandsetLanguageCommand (const QString &)
KCommandsetShadowTextCommand (double shadowDistanceX, double shadowDistanceY, const QColor &shadowColor)
KCommandsetHyphenationCommand (bool _b)
KCommandsetFontAttributeCommand (KoTextFormat::AttributeStyle _att)
KCommandsetRelativeTextSizeCommand (double _size)
KCommandsetOffsetFromBaseLineCommand (int _offset)
KCommandsetWordByWordCommand (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]
 

Interface for accessing the current format.

Implemented in KoTextObject, and KoTextView.

virtual const KoParagLayout* KoTextFormatInterface::currentParagLayoutFormat  )  const [pure virtual]
 

Interface for accessing the current parag layout.

Implemented in KoTextObject, and KoTextView.

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 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:
KDE Home | KDE Accessibility Home | Description of Access Keys