kword
KWTableFrameSet Class Reference
#include <KWTableFrameSet.h>
Inheritance diagram for KWTableFrameSet:

Detailed Description
This class implements tables by acting as the manager for the frame(set)s which make up the table cells.We have a cell structure which contains one frameset, because of the nature of the table this frameset will always hold exactly one frame. Therefore the terms cell, frameSet and frame can be used to describe the same thing: one table-cell
Definition at line 58 of file KWTableFrameSet.h.
Public Types | |
typedef TableIterator< VISIT_CELL > | TableIter |
typedef TableIterator< VISIT_GRID > | GridIter |
typedef TableIterator< CHECKED > | CheckedIter |
enum | VisitType { VISIT_GRID = 1, VISIT_CELL = 2, CHECKED = 3 } |
enum | CellSize { TblAuto = 0, TblManual } |
Public Member Functions | |
virtual FrameSetType | type () const |
virtual KWordFrameSetIface * | dcopObject () |
virtual void | addTextFrameSets (QPtrList< KWTextFrameSet > &lst, bool onlyReadWrite=false) |
KWTableFrameSet (KWDocument *_doc, const QString &name) | |
virtual | ~KWTableFrameSet () |
virtual KWFrameSetEdit * | createFrameSetEdit (KWCanvas *canvas) |
virtual void | createEmptyRegion (const QRect &crect, QRegion &emptyRegion, KWViewMode *viewMode) |
void | drawBorders (QPainter &painter, const QRect &crect, KWViewMode *viewMode) |
virtual void | drawContents (QPainter *painter, const QRect &crect, const QColorGroup &cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit *edit, KWViewMode *viewMode, KWFrameViewManager *frameViewManager) |
virtual void | drawFrame (KWFrame *, QPainter *, const QRect &, const QRect &, const QPoint &, KWFrame *, const QColorGroup &, bool, bool, KWFrameSetEdit *, KWViewMode *, bool) |
Cell * | cell (unsigned int row, unsigned int column) const |
Cell * | cellByPos (double x, double y) const |
KoRect | boundingRect () |
void | setBoundingRect (KoRect rect, CellSize widthMode, CellSize heightMode) |
double | topWithoutBorder () |
double | leftWithoutBorder () |
void | resizeWidth (double width) |
void | recalcCols (uint column, uint row) |
void | recalcRows (uint column, uint row) |
void | resizeColumn (unsigned int col, double x) |
void | resizeRow (unsigned int row, double y) |
double | columnSize (unsigned int col) |
double | rowSize (unsigned int col) |
int | columnEdgeAt (double x) const |
int | rowEdgeAt (double y) const |
unsigned int | getRows () const |
unsigned int | getColumns () const |
unsigned int | getNumCells () const |
void | moveBy (double dx, double dy) |
void | insertNewRow (uint _idx, bool _recalc=true, bool _removeable=false) |
void | insertNewColumn (uint _idx, double width=KWTableFrameSet::m_sDefaultColWidth) |
void | deleteRow (uint _idx, RemovedRow &rr, bool _recalc=true) |
void | deleteColumn (uint _idx, RemovedColumn &rc) |
void | reInsertRow (RemovedRow &row) |
void | reInsertColumn (RemovedColumn &col) |
void | ungroup () |
void | group () |
bool | isActive () const |
KCommand * | joinCells (unsigned int firstColumn, unsigned int firstRow, unsigned int endColumn, unsigned int endRow) |
KCommand * | splitCell (unsigned int intoRows, unsigned int intoColumns, unsigned int column, unsigned int row, QPtrList< KWFrameSet > listFrameSet=QPtrList< KWFrameSet >(), QPtrList< KWFrame >listFrame=QPtrList< KWFrame >()) |
void | viewFormatting (QPainter &painter, int zoom) |
void | validate () |
virtual QDomElement | save (QDomElement &parentElem, bool saveFrames=true) |
virtual void | saveOasis (KoXmlWriter &, KoSavingContext &, bool saveFrames) const |
void | loadOasis (const QDomElement &tag, KoOasisContext &context) |
virtual bool | canBeSavedAsInlineCharacter () const |
Cell * | loadCell (QDomElement &frameElem, bool loadFrames=true, bool useNames=true) |
virtual QDomElement | toXML (QDomElement &parentElem, bool saveFrames=true) |
virtual void | fromXML (QDomElement &framesetElem, bool loadFrames=true, bool useNames=true) |
virtual int | paragraphs () |
virtual int | paragraphsSelected () |
virtual bool | statistics (QProgressDialog *progress, ulong &charsWithSpace, ulong &charsWithoutSpace, ulong &words, ulong &sentences, ulong &syllables, ulong &lines, bool selected) |
virtual void | finalize () |
virtual void | invalidate () |
virtual void | layout () |
virtual void | updateFrames (int flags=0xff) |
virtual void | moveFloatingFrame (int frameNum, const KoPoint &position) |
virtual KoSize | floatingFrameSize (int frameNum=0) |
virtual KCommand * | anchoredObjectCreateCommand (int frameNum) |
virtual KCommand * | anchoredObjectDeleteCommand (int frameNum) |
virtual KWAnchor * | createAnchor (KoTextDocument *txt, int frameNum) |
virtual void | setVisible (bool v) |
virtual bool | canRemovePage (int num) |
void | addCell (Cell *cell) |
void | removeCell (Cell *cell) |
virtual void | setProtectContent (bool) |
virtual bool | protectContent () const |
virtual KWTextFrameSet * | nextTextObject (KWFrameSet *) |
void | setZOrder () |
QByteArray | convertTableToText () |
virtual void | printDebug (KWFrame *frame) |
virtual void | printDebug () |
void | printArrayDebug () |
Static Public Attributes | |
static const uint | m_sDefaultColWidth = 60 |
Protected Member Functions | |
virtual void | deleteAnchors () |
virtual void | createAnchors (KoTextParag *parag, int index, bool placeHolderExists=false, bool repaint=true) |
Friends | |
class | Cell |
Classes | |
class | Cell |
Table cell. More... | |
class | MarkedIterator |
This iterator does not look at the Cell instance variables during traversal, (except m_marker), so they can be safely changed during the traversal. More... | |
class | Row |
Represents a row, for direct access to cells with m_rowArray[row][column]. More... | |
class | TableIterator |
All the TableIterator templates are the same, except for the pre-increment operator (operator++). More... |
Member Enumeration Documentation
|
The three different types of TableIterators.
Definition at line 169 of file KWTableFrameSet.h. |
Constructor & Destructor Documentation
|
constructor
Definition at line 58 of file KWTableFrameSet.cpp. |
|
destructor
Definition at line 71 of file KWTableFrameSet.cpp. |
Member Function Documentation
|
Add a cell to this table, the cell should already have info like row, col and should already have a frame.
Definition at line 166 of file KWTableFrameSet.cpp. |
|
Store command for creating an anchored object.
Reimplemented from KWFrameSet. Definition at line 126 of file KWTableFrameSet.cpp. |
|
Store command for deleting an anchored object.
Reimplemented from KWFrameSet. Definition at line 131 of file KWTableFrameSet.cpp. |
|
Calculate the absolute size of the complete table. From the first cell to the last, including page breaks et.
Definition at line 229 of file KWTableFrameSet.cpp. |
|
If the frameset is inline, is it ok to save it inside an oasis <text:p>? If not, KWAnchor will create a textbox around it.
Reimplemented from KWFrameSet. Definition at line 458 of file KWTableFrameSet.h. |
|
Return true if page
Reimplemented from KWFrameSet. Definition at line 2200 of file KWTableFrameSet.cpp. |
|
return the number of the column edge closest to x (between 0 and getCols()+1)
Definition at line 694 of file KWTableFrameSet.cpp. |
|
Create an anchor for the floating frame identified by frameNum.
Reimplemented from KWFrameSet. Definition at line 136 of file KWTableFrameSet.cpp. |
|
Reimplemented from KWFrameSet. Definition at line 1463 of file KWTableFrameSet.cpp. |
|
Create a framesetedit object to edit this frameset in
Reimplemented from KWFrameSet. Definition at line 85 of file KWTableFrameSet.cpp. |
|
remove all the cells in a certain column
Definition at line 1087 of file KWTableFrameSet.cpp. |
|
Remove all the cells in a certain row.
|
|
Paint this frameset.
Framesets shouldn't reimplement this one in theory [but KWTableFrameSet has to]. Reimplemented from KWFrameSet. Definition at line 1748 of file KWTableFrameSet.cpp. |
|
Dummy since we reimplement drawContents.
Reimplemented from KWFrameSet. Definition at line 328 of file KWTableFrameSet.h. |
|
Called once the frameset has been completely loaded or constructed. The default implementation calls updateFrames() and zoom(). Call the parent :) Reimplemented from KWFrameSet. Definition at line 2166 of file KWTableFrameSet.cpp. |
|
Get the size of the "floating frame" identified by frameNum. By default a real frame but not for tables. Reimplemented from KWFrameSet. Definition at line 121 of file KWTableFrameSet.cpp. |
|
load from XML - when pasting from clipboard
Reimplemented from KWFrameSet. Definition at line 2026 of file KWTableFrameSet.cpp. |
|
returns the number of columns
Definition at line 393 of file KWTableFrameSet.h. |
|
returns the number of cells the table contains, this includes temporary headers.
Definition at line 397 of file KWTableFrameSet.h. |
|
returns the number of rows
Definition at line 391 of file KWTableFrameSet.h. |
|
insert a column of new cells use the getRows() call to decide how many cells are created
Definition at line 1196 of file KWTableFrameSet.cpp. |
|
insert a row of new cells, use the getCols() call to decide how many cells are created
Definition at line 1011 of file KWTableFrameSet.cpp. |
|
merge cells to one cell. Will loose all text not in top-left cell
Definition at line 1262 of file KWTableFrameSet.cpp. |
|
relayout text in frames, so that it flows correctly around other frames
Reimplemented from KWFrameSet. Definition at line 2180 of file KWTableFrameSet.cpp. |
|
Calculate the top postion of the cell(s) in the top row.
Definition at line 260 of file KWTableFrameSet.cpp. |
|
load one cell
Definition at line 2039 of file KWTableFrameSet.cpp. |
|
move the whole of the table, this is mainly for anchored frames.
Definition at line 887 of file KWTableFrameSet.cpp. |
|
Move the frame frameNum to the given position - this is called when the frame is anchored and the anchor moves (see KWAnchor).
Reimplemented from KWFrameSet. Definition at line 103 of file KWTableFrameSet.cpp. |
|
Contribute to the document statistics.
Reimplemented from KWFrameSet. Definition at line 2139 of file KWTableFrameSet.cpp. |
|
resize and position all cells
|
|
replace a column that was removed with deleteColumn()
Definition at line 1152 of file KWTableFrameSet.cpp. |
|
replace a row that was removed with deleteRow()
Definition at line 958 of file KWTableFrameSet.cpp. |
|
Remove a cell from this table (either to delete it, or to move it).
Definition at line 181 of file KWTableFrameSet.cpp. |
|
move a column edge (i.e. col can be 0 to getCols()+1) Definition at line 733 of file KWTableFrameSet.cpp. |
|
move a row edge (i.e. row can be 0 to getRows()+1) Definition at line 753 of file KWTableFrameSet.cpp. |
|
change the width of the table, keeping the proportions of the cells (if one is wider than the others, it is still wider after resize)
Definition at line 780 of file KWTableFrameSet.cpp. |
|
return the number of the row edge closest to x (between 0 and getRows()+1)
Definition at line 710 of file KWTableFrameSet.cpp. |
|
override save so we save in table style.
Implements KWFrameSet. Definition at line 2006 of file KWTableFrameSet.cpp. |
|
Save to OASIS format.
Implements KWFrameSet. Definition at line 1773 of file KWTableFrameSet.cpp. |
|
Layout all cells to fit inside the rect, cells will however use a minimum size, so the table might end up bigger.
Definition at line 799 of file KWTableFrameSet.cpp. |
|
set the visibility of the frameset.
Reimplemented from KWFrameSet. Definition at line 2192 of file KWTableFrameSet.cpp. |
|
Sets zOrder for all cells in this table.
Reimplemented from KWFrameSet. Definition at line 2249 of file KWTableFrameSet.cpp. |
|
split one cell into a number of cells and return a command for undo purposes.
Definition at line 1295 of file KWTableFrameSet.cpp. |
|
Calculate the top postion of the cell(s) in the leftmost column.
Definition at line 248 of file KWTableFrameSet.cpp. |
|
from and to XML - used when copying and pasting a table
Reimplemented from KWFrameSet. Definition at line 2015 of file KWTableFrameSet.cpp. |
|
The type of frameset. Use this to differentiate between different instantiations of the framesets. Each implementation will return a different frameType. Reimplemented from KWFrameSet. Definition at line 302 of file KWTableFrameSet.h. |
|
release the constrains of the table and allow all frames to be edited apart from each other. (ps. there is no way back..) Definition at line 1244 of file KWTableFrameSet.cpp. |
|
Called when our frames change, or when another frameset's frames change. Framesets can reimplement it, but should always call the parent method. Reimplemented from KWFrameSet. Definition at line 90 of file KWTableFrameSet.cpp. |
|
do a number of complex tests to test the validity of the table. Missing/duplicate cells and wrong values will be detected (and corrected) Definition at line 1437 of file KWTableFrameSet.cpp. |
|
display formatting information
Definition at line 1433 of file KWTableFrameSet.cpp. |
The documentation for this class was generated from the following files: