lib Library API Documentation

KoParagLayout Class Reference

This class holds the paragraph-specific formatting information It's separated from KoTextParag so that it can be copied in the undo/redo history, and in KoStyle. More...

#include <koparaglayout.h>

List of all members.

Public Types

enum  {
  Alignment = 1, BulletNumber = 2, Margins = 4, LineSpacing = 8,
  Borders = 16, Tabulator = 32, PageBreaking = 64, All = Alignment | BulletNumber | Margins | LineSpacing | Borders | Tabulator | PageBreaking
}
enum  {
  BreakBetweenLines = 0, KeepLinesTogether = 1, HardFrameBreakBefore = 2, HardFrameBreakAfter = 4,
  KeepWithPrevious = 8, KeepWithNext = 16
}
enum  SpacingType {
  LS_SINGLE = 0, LS_ONEANDHALF = -1, LS_DOUBLE = -2, LS_CUSTOM = -3,
  LS_AT_LEAST = -4, LS_MULTIPLE = -5, LS_FIXED = -6
}

Public Member Functions

 KoParagLayout (const KoParagLayout &layout)
double lineSpacingValue () const
void setLineSpacingValue (double _value)
bool hasBorder () const
void setTabList (const KoTabulatorList &tabList)
const KoTabulatorListtabList () const
void operator= (const KoParagLayout &)
int compare (const KoParagLayout &layout) const
void saveParagLayout (QDomElement &parentElem, int alignment) const

Static Public Member Functions

void loadParagLayout (KoParagLayout &layout, const QDomElement &parentElem, int docVersion=2)

Public Attributes

enum KoParagLayout:: { ... }  Flags
int alignment
double margins [5]
SpacingType lineSpacingType
char unused
char pageBreaking
char direction
char unused2
KoBorder leftBorder
KoBorder rightBorder
KoBorder topBorder
KoBorder bottomBorder
KoParagCountercounter
KoStylestyle

Static Public Attributes

QStringshadowCssCompat = 0L


Detailed Description

This class holds the paragraph-specific formatting information It's separated from KoTextParag so that it can be copied in the undo/redo history, and in KoStyle.

Definition at line 33 of file koparaglayout.h.


Member Enumeration Documentation

anonymous enum
 

This enum is used to mark parts of a KoParagLayout as changed (i.e.

when changing them in the dialog/stylist)

Definition at line 43 of file koparaglayout.h.

anonymous enum
 

Page breaking flags.

Definition at line 55 of file koparaglayout.h.

enum KoParagLayout::SpacingType
 

Line spacing values Assuming h is the height of the biggest char in the line, and v is the linespacing value, the total line height is:.

Single: h 1.5/2/multiple: v*h Custom (aka "line distance"): h + v At least: >= v Fixed: v

Definition at line 82 of file koparaglayout.h.


Member Function Documentation

int KoParagLayout::compare const KoParagLayout layout  )  const
 

Return a set of flags showing the differences between this and 'layout'.

Definition at line 58 of file koparaglayout.cc.

References alignment, bottomBorder, compare(), counter, leftBorder, lineSpacing, lineSpacingType, m_tabList, margins, KoParagCounter::numbering(), pageBreaking, rightBorder, and topBorder.

Referenced by compare().

void KoParagLayout::saveParagLayout QDomElement parentElem,
int  alignment
const
 

Save this parag layout to XML.

This format is used by KWord for paragraphs, and by KPresenter+KWord for styles.

Definition at line 392 of file koparaglayout.cc.

References bottomBorder, counter, direction, leftBorder, lineSpacing, lineSpacingType, margins, KoParagCounter::numbering(), pageBreaking, KoBorder::penWidth(), rightBorder, KoParagCounter::save(), KoBorder::save(), saveParagLayout(), style, tabList(), and topBorder.

Referenced by saveParagLayout().

void KoParagLayout::loadParagLayout KoParagLayout layout,
const QDomElement parentElem,
int  docVersion = 2
[static]
 

Load this parag layout from XML.

This format is used by KWord for paragraphs, and by KPresenter+KWord for styles.

Definition at line 127 of file koparaglayout.cc.

References KoTabulator::alignChar, alignment, bottomBorder, counter, direction, KoTabulator::filling, leftBorder, lineSpacing, lineSpacingType, KoParagCounter::load(), loadParagLayout(), margins, pageBreaking, KoTabulator::ptPos, KoTabulator::ptWidth, rightBorder, KoBorder::setPenWidth(), setTabList(), KoTextFormat::shadowAsCss(), topBorder, and KoTabulator::type.

Referenced by loadParagLayout().


Member Data Documentation

enum { ... } KoParagLayout::Flags
 

This enum is used to mark parts of a KoParagLayout as changed (i.e.

when changing them in the dialog/stylist)

int KoParagLayout::alignment
 

Alignment flag (AlignAuto/AlignLeft/AlignRight/AlignJustify).

Definition at line 68 of file koparaglayout.h.

Referenced by compare(), loadParagLayout(), and KoTextView::setParagLayoutFormatCommand().

double KoParagLayout::margins[5]
 

left, right, top, bottom, firstLineSpacing - in pt

Definition at line 70 of file koparaglayout.h.

Referenced by KoTextObject::applyStyleChange(), compare(), loadParagLayout(), saveParagLayout(), and KoTextView::setParagLayoutFormatCommand().

KoParagCounter* KoParagLayout::counter
 

can be 0 if no counter set

Definition at line 95 of file koparaglayout.h.

Referenced by KoTextObject::applyStyleChange(), compare(), loadParagLayout(), saveParagLayout(), and KoTextView::setParagLayoutFormatCommand().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for lib Library Version 1.3.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Sep 24 18:22:31 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003