lib

KoParagLayout Class Reference

#include <KoParagLayout.h>

List of all members.


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 KoParagStyle.

Definition at line 39 of file KoParagLayout.h.


Public Types

enum  {
  Alignment = 1, BulletNumber = 2, Margins = 4, LineSpacing = 8,
  Borders = 16, Tabulator = 32, PageBreaking = 64, BackgroundColor = 128,
  All
}
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 KoTabulatorList & tabList () const
void operator= (const KoParagLayout &)
int compare (const KoParagLayout &layout) const
void saveParagLayout (QDomElement &parentElem, int alignment) const
void saveOasis (KoGenStyle &gs, KoSavingContext &context, bool savingStyle) const

Static Public Member Functions

static void loadParagLayout (KoParagLayout &layout, const QDomElement &parentElem, int docVersion=2)
static void loadOasisParagLayout (KoParagLayout &layout, KoOasisContext &context)
static Qt::AlignmentFlags loadOasisAlignment (const QCString &str)
static QCString saveOasisAlignment (Qt::AlignmentFlags alignment)

Public Attributes

enum KoParagLayout:: { ... }  Flags
double margins [5]
SpacingType lineSpacingType
bool joinBorder:1
bool unused:7
char pageBreaking
char direction
char alignment
KoBorder leftBorder
KoBorder rightBorder
KoBorder topBorder
KoBorder bottomBorder
QColor backgroundColor
KoParagCountercounter
KoParagStylestyle

Static Public Attributes

static QString * shadowCssCompat = 0L

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 49 of file KoParagLayout.h.

anonymous enum

Page breaking flags.

Definition at line 63 of file KoParagLayout.h.

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 86 of file KoParagLayout.h.


Member Function Documentation

void KoParagLayout::operator= ( const KoParagLayout layout  ) 

Assignment operator for KoParagLayout.

Copy a paragraph layout.

If you're modifying this, you might also need to modify KoTextParag::setParagLayout

Definition at line 47 of file KoParagLayout.cpp.

int KoParagLayout::compare ( const KoParagLayout layout  )  const

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

Definition at line 70 of file KoParagLayout.cpp.

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 661 of file KoParagLayout.cpp.

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 144 of file KoParagLayout.cpp.

void KoParagLayout::loadOasisParagLayout ( KoParagLayout layout,
KoOasisContext context 
) [static]

Load this parag layout from Oasis XML.

Definition at line 437 of file KoParagLayout.cpp.

void KoParagLayout::saveOasis ( KoGenStyle gs,
KoSavingContext context,
bool  savingStyle 
) const

Save this parag layout to Oasis XML.

Parameters:
savingStyle true if this is saved as part of a user style, false when saving a paragraph
gs the style where all the properties will be saved to
context the current context

Definition at line 807 of file KoParagLayout.cpp.

Qt::AlignmentFlags KoParagLayout::loadOasisAlignment ( const QCString &  str  )  [static]

Convert an alignment string into an alignment flag (load).

Definition at line 414 of file KoParagLayout.cpp.

QCString KoParagLayout::saveOasisAlignment ( Qt::AlignmentFlags  alignment  )  [static]

Convert an alignment flag into an alignment string (save).

Definition at line 428 of file KoParagLayout.cpp.


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)

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

Definition at line 74 of file KoParagLayout.h.

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

Definition at line 99 of file KoParagLayout.h.

The background color of the paragraph.

The background color is used for text that has no background color set, and for parts of the paragraph that are not covered by text. In theory anyway: the background colour isn't used in rendering text yet, but it's nice to preserve the value.

Definition at line 109 of file KoParagLayout.h.

can be 0 if no counter set

Definition at line 112 of file KoParagLayout.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys