lib
KoTextParag Class Reference
List of all members.Detailed Description
Definition at line 52 of file KoTextParag.h.
Public Member Functions | |
KoTextParag (KoTextDocument *d, KoTextParag *pr=0, KoTextParag *nx=0, bool updateIds=TRUE) | |
virtual | ~KoTextParag () |
KoTextString * | string () const |
KoTextStringChar * | at (int i) const |
int | leftGap () const |
int | length () const |
int | lastCharPos () const |
void | setFormat (KoTextFormat *fm) |
KoTextFormat * | paragFormat () const |
KoTextDocument * | document () const |
QRect | rect () const |
void | setRect (const QRect &rect) |
void | setHeight (int h) |
void | setWidth (int w) |
void | show () |
void | hide () |
bool | isVisible () const |
KoTextParag * | prev () const |
KoTextParag * | next () const |
void | setPrev (KoTextParag *s) |
void | setNext (KoTextParag *s) |
void | insert (int index, const QString &s) |
void | append (const QString &s, bool reallyAtEnd=FALSE) |
void | truncate (int index) |
void | remove (int index, int len) |
void | move (int &dy) |
void | format (int start=-1, bool doMove=TRUE) |
void | invalidate (int chr=0) |
bool | isValid () const |
bool | hasChanged () const |
void | setChanged (bool b, bool recursive=FALSE) |
short int | lineChanged () |
void | setLineChanged (short int line) |
int | lineHeightOfChar (int i, int *bl=0, int *y=0) const |
KoTextStringChar * | lineStartOfChar (int i, int *index=0, int *line=0) const |
int | lines () const |
KoTextStringChar * | lineStartOfLine (int line, int *index=0) const |
int | lineY (int l) const |
int | lineBaseLine (int l) const |
int | lineHeight (int l) const |
void | lineInfo (int l, int &y, int &h, int &bl) const |
void | setSelection (int id, int start, int end) |
void | removeSelection (int id) |
int | selectionStart (int id) const |
int | selectionEnd (int id) const |
bool | hasSelection (int id) const |
bool | hasAnySelection () const |
bool | fullSelected (int id) const |
void | setParagId (int i) |
int | paragId () const |
QMap< int, KoTextParagLineStart * > & | lineStartList () |
void | setFormat (int index, int len, const KoTextFormat *f, bool useCollection=TRUE, int flags=-1) |
void | setAlignment (uint a) |
void | setAlignmentDirect (uint a) |
uint | alignment () const |
virtual void | paint (QPainter &painter, const QColorGroup &cg, KoTextCursor *cursor, bool drawSelections, int clipx, int clipy, int clipw, int cliph) |
int | topMargin () const |
int | bottomMargin () const |
int | leftMargin () const |
int | firstLineMargin () const |
int | rightMargin () const |
int | lineSpacing (int line) const |
int | calculateLineSpacing (int line, int start, int last) const |
void | registerFloatingItem (KoTextCustomItem *i) |
void | unregisterFloatingItem (KoTextCustomItem *i) |
void | setFullWidth (bool b) |
bool | isFullWidth () const |
int | customItems () const |
void | setDocumentRect (const QRect &r) |
int | documentWidth () const |
int | documentX () const |
int | documentY () const |
KoTextFormatCollection * | formatCollection () const |
KoTextFormatterBase * | formatter () const |
int | widthUsed () const |
int | nextTabDefault (int i, int x) |
int | nextTab (int i, int x, int availableWidth) |
int * | tabArray () const |
void | setTabArray (int *a) |
void | setTabStops (int tw) |
void | setNewLinesAllowed (bool b) |
bool | isNewLinesAllowed () const |
virtual void | join (KoTextParag *s) |
virtual void | copyParagData (KoTextParag *parag) |
void | setMovedDown (bool b) |
bool | wasMovedDown () const |
void | setDirection (QChar::Direction d) |
QChar::Direction | direction () const |
void | setPartOfTableOfContents (bool b) |
bool | partOfTableOfContents () const |
void | insertLineStart (int index, KoTextParagLineStart *ls) |
KoTextDocument * | textDocument () const |
KoTextFormat * | paragraphFormat () const |
virtual void | setParagLayout (const KoParagLayout &layout, int flags=KoParagLayout::All, int marginIndex=-1) |
const KoParagLayout & | paragLayout () |
double | margin (QStyleSheetItem::Margin m) |
const double * | margins () const |
void | setMargin (QStyleSheetItem::Margin m, double _i) |
void | setMargins (const double *_i) |
double | kwLineSpacing () const |
void | setLineSpacing (double _i) |
KoParagLayout::SpacingType | kwLineSpacingType () const |
void | setLineSpacingType (KoParagLayout::SpacingType _type) |
void | setAlign (int align) |
int | resolveAlignment () const |
int | breakableTopMargin () const |
KoBorder | leftBorder () const |
KoBorder | rightBorder () const |
KoBorder | topBorder () const |
KoBorder | bottomBorder () const |
bool | hasBorder () const |
bool | joinBorder () const |
void | setLeftBorder (const KoBorder &_brd) |
void | setRightBorder (const KoBorder &_brd) |
void | setTopBorder (const KoBorder &_brd) |
void | setBottomBorder (const KoBorder &_brd) |
void | setJoinBorder (bool join) |
QColor | backgroundColor () |
void | setBackgroundColor (const QColor &color) |
void | setCounter (const KoParagCounter &counter) |
void | setNoCounter () |
void | setCounter (const KoParagCounter *pCounter) |
KoParagCounter * | counter () |
int | counterWidth () const |
KoParagStyle * | style () const |
void | setStyle (KoParagStyle *style) |
void | applyStyle (KoParagStyle *style) |
const KoTabulatorList & | tabList () const |
void | setTabList (const KoTabulatorList &tabList) |
int | shadowX (KoTextZoomHandler *zh) const |
int | shadowY (KoTextZoomHandler *zh) const |
double | shadowDistanceY () const |
void | setCustomItem (int index, KoTextCustomItem *custom, KoTextFormat *currentFormat) |
void | removeCustomItem (int index) |
int | findCustomItem (const KoTextCustomItem *custom) const |
QMap< int, int > & | tabCache () |
QRect | pixelRect (KoTextZoomHandler *zh) const |
QString | toString (int from=0, int length=0xffffffff) const |
void | fixParagWidth (bool viewFormattingChars) |
virtual void | loadOasis (const QDomElement &e, KoOasisContext &context, KoStyleCollection *styleCollection, uint &pos) |
virtual void | saveOasis (KoXmlWriter &writer, KoSavingContext &context, int from, int to, bool saveAnchorsFramesets=false) const |
void | loadOasisSpan (const QDomElement &parent, KoOasisContext &context, uint &pos) |
void | applyListStyle (KoOasisContext &context, int restartNumbering, bool orderedList, bool heading, int level) |
void | printRTDebug (int) |
Static Public Member Functions | |
static void | drawFontEffects (QPainter *p, KoTextFormat *format, KoTextZoomHandler *zh, QFont font, const QColor &color, int startX, int baseLine, int bw, int y, int h, QChar firstChar) |
Protected Types | |
enum | { FormattingSpace = 1, FormattingBreak = 2, FormattingEndParag = 4, FormattingTabs = 8, AllFormattingChars = FormattingSpace | FormattingBreak | FormattingEndParag | FormattingTabs } |
Protected Member Functions | |
void | drawLabel (QPainter *p, int x, int y, int w, int h, int base, const QColorGroup &cg) |
void | drawCursorDefault (QPainter &painter, KoTextCursor *cursor, int curx, int cury, int curh, const QColorGroup &cg) |
void | drawCursor (QPainter &painter, KoTextCursor *cursor, int curx, int cury, int curh, const QColorGroup &cg) |
void | invalidateCounters () |
bool | lineHyphenated (int l) const |
void | paintLines (QPainter &painter, const QColorGroup &cg, KoTextCursor *cursor, bool drawSelections, int clipx, int clipy, int clipw, int cliph) |
void | drawParagString (QPainter &painter, const QString &str, int start, int len, int startX, int lastY, int baseLine, int bw, int h, bool drawSelections, KoTextFormat *lastFormat, const QMemArray< int > &selectionStarts, const QMemArray< int > &selectionEnds, const QColorGroup &cg, bool rightToLeft, int line) |
void | drawParagStringInternal (QPainter &painter, const QString &s, int start, int len, int startX, int lastY, int baseLine, int bw, int h, bool drawSelections, KoTextFormat *lastFormat, const QMemArray< int > &selectionStarts, const QMemArray< int > &selectionEnds, const QColorGroup &cg, bool rightToLeft, int line, KoTextZoomHandler *zh, bool drawingShadow) |
virtual void | drawFormattingChars (QPainter &painter, int start, int len, int lastY_pix, int baseLine_pix, int h_pix, bool drawSelections, KoTextFormat *format, const QMemArray< int > &selectionStarts, const QMemArray< int > &selectionEnds, const QColorGroup &cg, bool rightToLeft, int line, KoTextZoomHandler *zh, int whichFormattingChars) |
Protected Attributes | |
KoParagLayout | m_layout |
QMap< int, int > | m_tabCache |
Friends | |
class | KoTextDocument |
class | KoTextCursor |
Member Enumeration Documentation
|
Bitfield for drawFormattingChars's "whichFormattingChars" param.
Definition at line 358 of file KoTextParag.h. |
Member Function Documentation
|
Applies the style directly (without undo/redo! See KoTextObject for undo/redo).
Definition at line 2210 of file KoTextParag.cpp. |
|
The part of the top margin that can be broken by a page break Obviously the non-breakable part (e.g. border width) is topMargin()-breakableTopMargin() Definition at line 1231 of file KoTextParag.cpp. |
|
The space required to draw the complete counter label (i.e. the Counter for this paragraph, as well as the Counters for any paragraphs above us in the numbering hierarchy).
Definition at line 1056 of file KoTextParag.cpp. |
|
Draw the cursor mark. Reimplemented from KoTextParag to convert coordinates first. Definition at line 2003 of file KoTextParag.cpp. |
|
draw underline and double underline. Static because it's used for draw double/simple in variable. Definition at line 2432 of file KoTextParag.cpp. |
|
Called by drawParagStringInternal to draw the formatting characters, if the kotextdocument drawingflag for it was set. The last arg is a bit special: drawParagStringInternal always sets it to "all", but reimplementations can change its value. Definition at line 3068 of file KoTextParag.cpp. |
|
Find a custom item that we know is somewhere in this paragraph Returns the index in the paragraph.
Definition at line 2282 of file KoTextParag.cpp. |
|
The app should call this during formatting - e.g. in formatVertically.
Definition at line 3056 of file KoTextParag.cpp. |
|
'changed' tells the painting code what it needs to paint
Definition at line 440 of file KoTextParag.h. |
|
Call this to ensure that format() will be called on this paragraph later on.
Definition at line 157 of file KoTextParag.cpp. |
|
Return whether '
Definition at line 567 of file KoTextParag.h. |
|
Returns false if format() needs to be called on this paragraph.
Definition at line 435 of file KoTextParag.h. |
|
Line spacing in pt if >=0, can also be one of the LS_* values.
Definition at line 229 of file KoTextParag.h. |
|
Load from XML.
Definition at line 2803 of file KoTextParag.cpp. |
|
"Reimplemented" (compared to nextTabDefault) to implement non-left-aligned tabs
Definition at line 2086 of file KoTextParag.cpp. |
|
Definition at line 1366 of file KoTextParag.cpp. |
|
Remove the custom item from position
Definition at line 2272 of file KoTextParag.cpp. |
|
Return the real alignment: Auto is resolved to either Left or Right.
Definition at line 968 of file KoTextParag.cpp. |
|
Save to XML By default the whole paragraph is saved. from/to allow to save only a portion of it. The 'from' and 'to' characters are both included. Definition at line 2826 of file KoTextParag.cpp. |
|
Use this to change the paragraph alignment, not KoTextParag::setAlignment !
Definition at line 960 of file KoTextParag.cpp. |
|
Set a
Definition at line 2258 of file KoTextParag.cpp. |
|
Set whether '
Definition at line 562 of file KoTextParag.h. |
|
Sets all or some parameters from a paragLayout struct.
Definition at line 2218 of file KoTextParag.cpp. |
|
Mark a paragraph as being part of the table of contents (kword only).
Definition at line 193 of file KoTextParag.h. |
|
Sets the style in this paragraph, but doesn't _apply_ it, only sets a reference.
Definition at line 283 of file KoTextParag.h. |
|
Set tabulator positions.
Definition at line 2063 of file KoTextParag.cpp. |
|
Return the Y for the shadow distance in pt.
|
|
Return the X for the shadow distance in pixels (zoomed).
|
|
Return the Y for the shadow distance in pixels (zoomed).
|
|
Style used by this paragraph.
Definition at line 281 of file KoTextParag.h. |
|
Cache to find a tab by char index, QMap<char index, tab index>.
Definition at line 309 of file KoTextParag.h. |
|
Get tabulator positions.
Definition at line 288 of file KoTextParag.h. |
|
We extend KoTextParag with more (zoom-aware) features, like linespacing, borders, counter, tabulators, etc. This also implements WYSIWYG text drawing. Definition at line 210 of file KoTextParag.h. |
|
a bit more clever than KoTextString::toString, e.g. with numbered lists Definition at line 2643 of file KoTextParag.cpp. |
The documentation for this class was generated from the following files: