filters

KWDWriter Class Reference

List of all members.

Detailed Description

Definition at line 34 of file kwdwriter.h.


Public Member Functions

 KWDWriter (KoStore *store)
 ~KWDWriter ()
bool writeDoc ()
QDomElement addFrameSet (QDomElement parent, int frametype=1, int frameinfo=0, QString name=QString::null, int visible=1)
bool isInTable () const
int createTable ()
QDomElement createTableCell (int tableno, int nrow, int ncol, int colspan, QRect rect)
QDomElement fetchTableCell (int tableno, int rowno, int colno)
void finishTable (int tableno, QRect rect)
void finishTable (int tableno)
void createInline (QDomElement paragraph, QDomElement toInline)
void createHR (QDomElement paragraph, int width=1)
QDomElement currentLayout (QDomElement paragraph)
QDomElement addFrame (QDomElement frameset, QRect rect, int runaround=0, int copy=0, int newFrameBehaviour=0, int runaroundGap=2)
QDomElement addParagraph (QDomElement parent)
QDomElement addParagraph (QDomElement parent, QDomElement layout)
QDomElement formatAttribute (QDomElement paragraph, QString name, QString attrName, QString attr)
QString getLayoutAttribute (QDomElement paragraph, QString name, QString attrName)
QDomElement layoutAttribute (QDomElement paragraph, QString name, QString attrName, QString attr)
QDomElement startFormat (QDomElement paragraph)
QDomElement startFormat (QDomElement paragraph, QDomElement formatToClone)
void cleanUpParagraph (QDomElement paragraph)
void addText (QDomElement paragraph, QString text, int format_id, bool keep_formatting=false)
QDomElement currentFormat (QDomElement paragraph, bool start_new_one=false)
QDomElement createLink (QDomElement paragraph, QString linkName, QString hrefName)
QDomElement setLayout (QDomElement paragraph, QDomElement layout)
QString getText (QDomElement paragraph)
QRect getRect (QDomElement frameset)
QDomElement mainFrameset ()
void createDocInfo (QString author, QString title)
QDomElement docroot ()
void appendKWordVariable (QDomDocument &doc, QDomElement &format, const QString &text, const QString &key, int type, QDomElement &child)

Protected Attributes

KoStore * _store
QDomElement _mainFrameset
QDomDocument * _doc
QDomDocument * _docinfo
QDomElement _docinfoMain
KoTextZoomHandler * _zoomhandler
int tableNo
bool insidetable

Member Function Documentation

bool KWDWriter::writeDoc (  ) 

writes the document to the koStore

Definition at line 536 of file kwdwriter.cpp.

QDomElement KWDWriter::addFrameSet ( QDomElement  parent,
int  frametype = 1,
int  frameinfo = 0,
QString  name = QString::null,
int  visible = 1 
)

adds a frameset to parent FIXME

Definition at line 281 of file kwdwriter.cpp.

bool KWDWriter::isInTable (  )  const

Returns:
true if we are currently in a table (createTable() got called, but we are still waiting for a finishTable() ).

Definition at line 128 of file kwdwriter.cpp.

int KWDWriter::createTable (  ) 

creates a table

Definition at line 132 of file kwdwriter.cpp.

QDomElement KWDWriter::createTableCell ( int  tableno,
int  nrow,
int  ncol,
int  colspan,
QRect  rect 
)

creates a table cell

Definition at line 171 of file kwdwriter.cpp.

QDomElement KWDWriter::fetchTableCell ( int  tableno,
int  rowno,
int  colno 
)

fetches the cell of a table

Definition at line 188 of file kwdwriter.cpp.

void KWDWriter::finishTable ( int  tableno,
QRect  rect 
)

finishes a table if the arguments x,y,w,h are given, each cell is resized to have a 'right' table.

otherwise, the cell sizes are not touched.

Definition at line 213 of file kwdwriter.cpp.

void KWDWriter::createInline ( QDomElement  paragraph,
QDomElement  toInline 
)

inlines something in a paragraph

Parameters:
paragraph,: the paragraph the anchor should be placed in
toInLline,: the element that should be inlined

Definition at line 153 of file kwdwriter.cpp.

void KWDWriter::createHR ( QDomElement  paragraph,
int  width = 1 
)

create a horizontal ruler layout

Definition at line 209 of file kwdwriter.cpp.

QDomElement KWDWriter::addFrame ( QDomElement  frameset,
QRect  rect,
int  runaround = 0,
int  copy = 0,
int  newFrameBehaviour = 0,
int  runaroundGap = 2 
)

adds a frame to frameset FIXME

Definition at line 519 of file kwdwriter.cpp.

QDomElement KWDWriter::addParagraph ( QDomElement  parent  ) 

adds a paragraph

Definition at line 298 of file kwdwriter.cpp.

QDomElement KWDWriter::formatAttribute ( QDomElement  paragraph,
QString  name,
QString  attrName,
QString  attr 
)

adds/changes an attribute to/of the current format

Definition at line 378 of file kwdwriter.cpp.

QString KWDWriter::getLayoutAttribute ( QDomElement  paragraph,
QString  name,
QString  attrName 
)

get a layout attribute

Definition at line 396 of file kwdwriter.cpp.

QDomElement KWDWriter::layoutAttribute ( QDomElement  paragraph,
QString  name,
QString  attrName,
QString  attr 
)

adds/changes an attribute to/of the current layout

Definition at line 406 of file kwdwriter.cpp.

QDomElement KWDWriter::startFormat ( QDomElement  paragraph  ) 

creates a new format in the current paragraph.

do this before adding text FIXME: you can only do addText once per format

Definition at line 465 of file kwdwriter.cpp.

void KWDWriter::cleanUpParagraph ( QDomElement  paragraph  ) 

cleans up the current paragraph (throw away unused formats) FIXME: find a better solution

Definition at line 506 of file kwdwriter.cpp.

void KWDWriter::addText ( QDomElement  paragraph,
QString  text,
int  format_id,
bool  keep_formatting = false 
)

adds some text to the current format in this paragraph

Definition at line 425 of file kwdwriter.cpp.

QDomElement KWDWriter::currentFormat ( QDomElement  paragraph,
bool  start_new_one = false 
)

returns the current format if start_new_one is true, a new format will be started if needed

Definition at line 490 of file kwdwriter.cpp.

QDomElement KWDWriter::createLink ( QDomElement  paragraph,
QString  linkName,
QString  hrefName 
)

create a Link (URL)

Definition at line 319 of file kwdwriter.cpp.

QDomElement KWDWriter::setLayout ( QDomElement  paragraph,
QDomElement  layout 
)

copy the given layout, and set it as layout of the given paragraph

Definition at line 331 of file kwdwriter.cpp.

QString KWDWriter::getText ( QDomElement  paragraph  ) 

returns the text of this paragraph.

Definition at line 457 of file kwdwriter.cpp.

QRect KWDWriter::getRect ( QDomElement  frameset  ) 

returns the rectangle of the first frame of this frameset

QDomElement KWDWriter::mainFrameset (  ) 

returns the 'main' frameset of this document.

Definition at line 559 of file kwdwriter.cpp.

void KWDWriter::createDocInfo ( QString  author,
QString  title 
)

mark document as being written by author, and having title title

Definition at line 137 of file kwdwriter.cpp.

QDomElement KWDWriter::docroot (  ) 

returns the document root

Definition at line 532 of file kwdwriter.cpp.

void KWDWriter::appendKWordVariable ( QDomDocument &  doc,
QDomElement &  format,
const QString &  text,
const QString &  key,
int  type,
QDomElement &  child 
)

creates a KWord Variable (Link, .

..)

Definition at line 303 of file kwdwriter.cpp.


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