kword

#include <KWTableFrameSet.h>

Inheritance diagram for KWTableFrameSet:
KWFrameSet

Classes

class  Cell
class  Row
class  TableIterator
class  MarkedIterator

Public Types

enum  VisitType { VISIT_GRID = 1 , VISIT_CELL = 2 , CHECKED = 3 }
enum  CellSize { TblAuto = 0 , TblManual }
typedef TableIterator< VISIT_CELL > TableIter
typedef TableIterator< VISIT_GRID > GridIter
typedef TableIterator< CHECKED > CheckedIter
Public Types inherited from KWFrameSet
enum  Info {
  FI_BODY = 0 , FI_FIRST_HEADER = 1 , FI_EVEN_HEADER = 2 , FI_ODD_HEADER = 3 ,
  FI_FIRST_FOOTER = 4 , FI_EVEN_FOOTER = 5 , FI_ODD_FOOTER = 6 , FI_FOOTNOTE = 7
}
enum  UpdateFramesFlags { UpdateFramesInPage = 1 , SortFrames = 2 }

Public Member Functions

virtual FrameSetType type () const
virtual KWordFrameSetIface * dcopObject ()
virtual void addTextFrameSets (TQPtrList< KWTextFrameSet > &lst, bool onlyReadWrite=false)
 KWTableFrameSet (KWDocument *_doc, const TQString &name)
virtual ~KWTableFrameSet ()
virtual KWFrameSetEdit * createFrameSetEdit (KWCanvas *canvas)
virtual void createEmptyRegion (const TQRect &crect, TQRegion &emptyRegion, KWViewMode *viewMode)
void drawBorders (TQPainter &painter, const TQRect &crect, KWViewMode *viewMode)
virtual void drawContents (TQPainter *painter, const TQRect &crect, const TQColorGroup &cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit *edit, KWViewMode *viewMode, KWFrameViewManager *frameViewManager)
virtual void drawFrame (KWFrame *, TQPainter *, const TQRect &, const TQRect &, const TQPoint &, KWFrame *, const TQColorGroup &, 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, TQPtrList< KWFrameSet > listFrameSet=TQPtrList< KWFrameSet >(), TQPtrList< KWFrame >listFrame=TQPtrList< KWFrame >())
void viewFormatting (TQPainter &painter, int zoom)
void validate ()
virtual TQDomElement save (TQDomElement &parentElem, bool saveFrames=true)
virtual void saveOasis (KoXmlWriter &, KoSavingContext &, bool saveFrames) const
void loadOasis (const TQDomElement &tag, KoOasisContext &context)
virtual bool canBeSavedAsInlineCharacter () const
Cell * loadCell (TQDomElement &frameElem, bool loadFrames=true, bool useNames=true)
virtual TQDomElement toXML (TQDomElement &parentElem, bool saveFrames=true)
virtual void fromXML (TQDomElement &framesetElem, bool loadFrames=true, bool useNames=true)
virtual int paragraphs ()
virtual int paragraphsSelected ()
virtual bool statistics (TQProgressDialog *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 ()
TQByteArray convertTableToText ()
virtual void printDebug (KWFrame *frame)
virtual void printDebug ()
void printArrayDebug ()
Public Member Functions inherited from KWFrameSet
 KWFrameSet (KWDocument *doc)
virtual ~KWFrameSet ()
virtual bool ownLine () const
Info frameSetInfo () const
void setFrameSetInfo (Info fi)
bool isAHeader () const
bool isAFooter () const
bool isHeaderOrFooter () const
bool isFootEndNote () const
const char * headerFooterTag () const
virtual bool isFootNote () const
virtual bool isEndNote () const
bool isMainFrameset () const
bool isMoveable () const
virtual void addFrame (KWFrame *_frame, bool recalc=true)
virtual void deleteFrame (unsigned int num, bool remove=true, bool recalc=true)
void deleteFrame (KWFrame *frm, bool remove=true, bool recalc=true)
virtual void frameDeleted (KWFrame *, bool)
void deleteAllFrames ()
void deleteAllCopies ()
KWFrame * frameAtPos (double _x, double _y) const
bool isFrameAtPos (const KWFrame *frame, const TQPoint &nPoint, bool borderOfFrameOnly=false) const
KWFrame * frame (unsigned int _num) const
const TQPtrList< KWFrame > & frameIterator () const
int frameFromPtr (KWFrame *frame)
unsigned int frameCount () const
bool isDeleted () const
void drawFrameAndBorders (KWFrame *frame, TQPainter *painter, const TQRect &crect, const TQColorGroup &cg, bool, bool, KWFrameSetEdit *edit, KWViewMode *viewMode, KWFrame *settingsFrame, bool drawUnderlyingFrames)
void drawFrameBorder (TQPainter *painter, KWFrame *frame, KWFrame *settingsFrame, const TQRect &crect, KWViewMode *viewMode)
virtual void drawFrameContents (KWFrame *frame, TQPainter *painter, const TQRect &fcrect, const TQColorGroup &cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit *edit, KWViewMode *viewMode)
virtual void drawPadding (KWFrame *frame, TQPainter *p, const TQRect &fcrect, const TQColorGroup &cg, KWViewMode *viewMode)
const TQPtrList< KWFrame > & framesInPage (int pageNum) const
bool hasFramesInPageArray () const
virtual void load (TQDomElement &framesetElem, bool loadFrames=true)
KWFrame * loadOasisFrame (const TQDomElement &tag, KoOasisContext &context)
virtual TQString toPlainText () const
KWDocument * kWordDocument () const
void setFloating ()
void setAnchored (KWTextFrameSet *textfs, KoTextParag *parag, int index, bool placeHolderExists=false, bool repaint=true)
void setAnchored (KWTextFrameSet *textfs, int paragId, int index, bool placeHolderExists=false, bool repaint=true)
void setAnchored (KWTextFrameSet *textfs)
void setFixed ()
bool isFloating () const
KWTextFrameSet * anchorFrameset () const
void setAnchorFrameset (KWTextFrameSet *textfs)
KWAnchor * findAnchor (int frameNum)
virtual void setAnchorFormat (KoTextFormat *, int)
KoRect floatingFrameRect (int frameNum=0)
virtual int floatingFrameBaseline (int)
void setGroupManager (KWTableFrameSet *gm)
KWTableFrameSet * groupmanager () const
bool isProtectSize () const
void setProtectSize (bool _b)
bool isVisible (KWViewMode *viewMode=0L) const
TQString name () const
void setName (const TQString &name)
void setFrameBehavior (KWFrame::FrameBehavior fb)
void setNewFrameBehavior (KWFrame::NewFrameBehavior nfb)
bool isPaintedBy (KWFrameSet *fs) const
void setPageManager (KWPageManager *pm)
KWPageManager * pageManager () const

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)
Protected Member Functions inherited from KWFrameSet
void saveCommon (TQDomElement &parentElem, bool saveFrames)
TQRegion frameClipRegion (TQPainter *painter, KWFrame *frame, const TQRect &crect, KWViewMode *viewMode)
void deleteAnchor (KWAnchor *anchor)

Friends

class Cell

Additional Inherited Members

Signals inherited from KWFrameSet
void repaintChanged (KWFrameSet *frameset)
void sigFrameAdded (KWFrame *)
void sigFrameRemoved (KWFrame *)
void sigNameChanged (KWFrameSet *)
Static Public Member Functions inherited from KWFrameSet
static KWFrame * settingsFrame (const KWFrame *frame)
Protected Attributes inherited from KWFrameSet
KWDocument * m_doc
TQPtrList< KWFrame > m_frames
TQPtrVector< TQPtrList< KWFrame > > m_framesInPage
int m_firstPage
TQPtrList< KWFrame > m_emptyList
Info m_info
KWTableFrameSet * m_groupmanager
bool m_visible
bool m_protectSize
TQString m_name
KWTextFrameSet * m_anchorTextFs
KWordFrameSetIface * m_dcop
KWPageManager * m_pageManager

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.

Member Typedef Documentation

◆ CheckedIter

typedef TableIterator<CHECKED> KWTableFrameSet::CheckedIter

Definition at line 281 of file KWTableFrameSet.h.

◆ GridIter

typedef TableIterator<VISIT_GRID> KWTableFrameSet::GridIter

Definition at line 280 of file KWTableFrameSet.h.

◆ TableIter

typedef TableIterator<VISIT_CELL> KWTableFrameSet::TableIter

Definition at line 279 of file KWTableFrameSet.h.

Member Enumeration Documentation

◆ CellSize

enum KWTableFrameSet::CellSize

Definition at line 338 of file KWTableFrameSet.h.

◆ VisitType

The three different types of TableIterators.

Enumerator
VISIT_GRID 

This iterator visits each grid position once, ie every location in the m_rowArray rows.

When some cells are joined, this iterator will visit those cells more than once.

VISIT_CELL 

This iterator visits each cell in the table once, whether or not some of the cells are joined.

If you want to visit all the cells fast and perform some read-only operation, this is the one to use.

CHECKED 

Like VISIT_CELL it also visits each cell once, but has some other benefits.

Slower.

Definition at line 170 of file KWTableFrameSet.h.

Constructor & Destructor Documentation

◆ KWTableFrameSet()

KWTableFrameSet::KWTableFrameSet ( KWDocument * _doc,
const TQString & name )

constructor

Definition at line 58 of file KWTableFrameSet.cpp.

◆ ~KWTableFrameSet()

KWTableFrameSet::~KWTableFrameSet ( )
virtual

destructor

Definition at line 71 of file KWTableFrameSet.cpp.

Member Function Documentation

◆ addCell()

void KWTableFrameSet::addCell ( Cell * cell)

Add a cell to this table, the cell should already have info like row, col and should already have a frame.

Definition at line 169 of file KWTableFrameSet.cpp.

◆ addTextFrameSets()

void KWTableFrameSet::addTextFrameSets ( TQPtrList< KWTextFrameSet > & lst,
bool onlyReadWrite = false )
virtual

Reimplemented from KWFrameSet.

Definition at line 2220 of file KWTableFrameSet.cpp.

◆ anchoredObjectCreateCommand()

KCommand * KWTableFrameSet::anchoredObjectCreateCommand ( int frameNum)
virtual

Store command for creating an anchored object.

Reimplemented from KWFrameSet.

Definition at line 129 of file KWTableFrameSet.cpp.

◆ anchoredObjectDeleteCommand()

KCommand * KWTableFrameSet::anchoredObjectDeleteCommand ( int frameNum)
virtual

Store command for deleting an anchored object.

Reimplemented from KWFrameSet.

Definition at line 134 of file KWTableFrameSet.cpp.

◆ boundingRect()

KoRect KWTableFrameSet::boundingRect ( )

Calculate the absolute size of the complete table.

From the first cell to the last, including page breaks et.

Returns
KoRect which outlines the whole of the table.

Definition at line 232 of file KWTableFrameSet.cpp.

◆ canBeSavedAsInlineCharacter()

virtual bool KWTableFrameSet::canBeSavedAsInlineCharacter ( ) const
inlinevirtual

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 459 of file KWTableFrameSet.h.

◆ canRemovePage()

bool KWTableFrameSet::canRemovePage ( int num)
virtual

Return true if page num can be removed, as far as this frameset is concerned.

Reimplemented from KWFrameSet.

Definition at line 2206 of file KWTableFrameSet.cpp.

◆ cell()

KWTableFrameSet::Cell * KWTableFrameSet::cell ( unsigned int row,
unsigned int column ) const

Definition at line 275 of file KWTableFrameSet.cpp.

◆ cellByPos()

KWTableFrameSet::Cell * KWTableFrameSet::cellByPos ( double x,
double y ) const

Definition at line 290 of file KWTableFrameSet.cpp.

◆ columnEdgeAt()

int KWTableFrameSet::columnEdgeAt ( double x) const

return the number of the column edge closest to x (between 0 and getCols()+1)

Definition at line 697 of file KWTableFrameSet.cpp.

◆ columnSize()

double KWTableFrameSet::columnSize ( unsigned int col)

Definition at line 726 of file KWTableFrameSet.cpp.

◆ convertTableToText()

TQByteArray KWTableFrameSet::convertTableToText ( )

Definition at line 2265 of file KWTableFrameSet.cpp.

◆ createAnchor()

KWAnchor * KWTableFrameSet::createAnchor ( KoTextDocument * txt,
int frameNum )
virtual

Create an anchor for the floating frame identified by frameNum.

Reimplemented from KWFrameSet.

Definition at line 139 of file KWTableFrameSet.cpp.

◆ createAnchors()

void KWTableFrameSet::createAnchors ( KoTextParag * parag,
int index,
bool placeHolderExists = false,
bool repaint = true )
protectedvirtual

Reimplemented from KWFrameSet.

Definition at line 145 of file KWTableFrameSet.cpp.

◆ createEmptyRegion()

void KWTableFrameSet::createEmptyRegion ( const TQRect & crect,
TQRegion & emptyRegion,
KWViewMode * viewMode )
virtual
Parameters
emptyRegionThe region is modified to subtract the areas painted, thus allowing the caller to determine which areas remain to be painted.
crectthe clip rect, outside which nothing is important
viewModethe current view mode

Reimplemented from KWFrameSet.

Definition at line 1469 of file KWTableFrameSet.cpp.

◆ createFrameSetEdit()

KWFrameSetEdit * KWTableFrameSet::createFrameSetEdit ( KWCanvas * )
virtual

Create a framesetedit object to edit this frameset in canvas.

Reimplemented from KWFrameSet.

Definition at line 85 of file KWTableFrameSet.cpp.

◆ dcopObject()

KWordFrameSetIface * KWTableFrameSet::dcopObject ( )
virtual

Reimplemented from KWFrameSet.

Definition at line 76 of file KWTableFrameSet.cpp.

◆ deleteAnchors()

void KWTableFrameSet::deleteAnchors ( )
protectedvirtual

Reimplemented from KWFrameSet.

Definition at line 161 of file KWTableFrameSet.cpp.

◆ deleteColumn()

void KWTableFrameSet::deleteColumn ( uint _idx,
RemovedColumn & rc )

remove all the cells in a certain column

Definition at line 1090 of file KWTableFrameSet.cpp.

◆ deleteRow()

void KWTableFrameSet::deleteRow ( uint _idx,
RemovedRow & rr,
bool _recalc = true )

Remove all the cells in a certain row.

Definition at line 918 of file KWTableFrameSet.cpp.

◆ drawBorders()

void KWTableFrameSet::drawBorders ( TQPainter & painter,
const TQRect & crect,
KWViewMode * viewMode )

Definition at line 1492 of file KWTableFrameSet.cpp.

◆ drawContents()

void KWTableFrameSet::drawContents ( TQPainter * painter,
const TQRect & crect,
const TQColorGroup & cg,
bool onlyChanged,
bool resetChanged,
KWFrameSetEdit * edit,
KWViewMode * viewMode,
KWFrameViewManager * frameViewManager )
virtual

Paint this frameset.

Parameters
painterThe painter in which to draw the contents of the frameset
crectThe rectangle (in scrollview "contents coordinates", i.e. "view coords") to be painted
cgThe colorgroup from which to get the colors
onlyChangedIf true, only redraw what has changed (see KWCanvas::repaintChanged)
resetChangedIf true, set the changed flag to false after drawing.
editIf set, this frameset is being edited, so a cursor is needed.
viewModeFor coordinate conversion, always set.
frameViewManagerthe frameViewManager;

The way this "onlyChanged/resetChanged" works is: when something changes, all views are asked to redraw themselves with onlyChanged=true. But all views except the last one shouldn't reset the changed flag to false, otherwise the other views wouldn't repaint anything. So resetChanged is called with "false" for all views except the last one, and with "true" for the last one, so that it resets the flag.

Framesets shouldn't reimplement this one in theory [but KWTableFrameSet has to].

Reimplemented from KWFrameSet.

Definition at line 1754 of file KWTableFrameSet.cpp.

◆ drawFrame()

virtual void KWTableFrameSet::drawFrame ( KWFrame * ,
TQPainter * ,
const TQRect & ,
const TQRect & ,
const TQPoint & ,
KWFrame * ,
const TQColorGroup & ,
bool ,
bool ,
KWFrameSetEdit * ,
KWViewMode * ,
bool  )
inlinevirtual

Dummy since we reimplement drawContents.

Reimplemented from KWFrameSet.

Definition at line 329 of file KWTableFrameSet.h.

◆ finalize()

void KWTableFrameSet::finalize ( )
virtual

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 2172 of file KWTableFrameSet.cpp.

◆ floatingFrameSize()

KoSize KWTableFrameSet::floatingFrameSize ( int frameNum = 0)
virtual

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 124 of file KWTableFrameSet.cpp.

◆ fromXML()

void KWTableFrameSet::fromXML ( TQDomElement & framesetElem,
bool loadFrames = true,
bool = true )
virtual

load from XML - when pasting from clipboard

Reimplemented from KWFrameSet.

Definition at line 2032 of file KWTableFrameSet.cpp.

◆ getColumns()

unsigned int KWTableFrameSet::getColumns ( ) const
inline

returns the number of columns

Definition at line 394 of file KWTableFrameSet.h.

◆ getNumCells()

unsigned int KWTableFrameSet::getNumCells ( ) const
inline

returns the number of cells the table contains, this includes temporary headers.

Definition at line 398 of file KWTableFrameSet.h.

◆ getRows()

unsigned int KWTableFrameSet::getRows ( ) const
inline

returns the number of rows

Definition at line 392 of file KWTableFrameSet.h.

◆ group()

void KWTableFrameSet::group ( )

Definition at line 1256 of file KWTableFrameSet.cpp.

◆ insertNewColumn()

void KWTableFrameSet::insertNewColumn ( uint _idx,
double width = KWTableFrameSet::m_sDefaultColWidth )

insert a column of new cells use the getRows() call to decide how many cells are created

Definition at line 1199 of file KWTableFrameSet.cpp.

◆ insertNewRow()

void KWTableFrameSet::insertNewRow ( uint _idx,
bool _recalc = true,
bool _removeable = false )

insert a row of new cells, use the getCols() call to decide how many cells are created

Definition at line 1014 of file KWTableFrameSet.cpp.

◆ invalidate()

void KWTableFrameSet::invalidate ( )
virtual

Reimplemented from KWFrameSet.

Definition at line 2192 of file KWTableFrameSet.cpp.

◆ isActive()

bool KWTableFrameSet::isActive ( ) const
inline

Definition at line 426 of file KWTableFrameSet.h.

◆ joinCells()

KCommand * KWTableFrameSet::joinCells ( unsigned int firstColumn,
unsigned int firstRow,
unsigned int endColumn,
unsigned int endRow )

merge cells to one cell.

Will loose all text not in top-left cell

Parameters
firstColumnthe first column of the square of columns that will be used to merge
firstRowthe first row
endColumnthe last column that will end up in the merged cell
endRowlast row

Definition at line 1265 of file KWTableFrameSet.cpp.

◆ layout()

void KWTableFrameSet::layout ( )
virtual

relayout text in frames, so that it flows correctly around other frames

Reimplemented from KWFrameSet.

Definition at line 2186 of file KWTableFrameSet.cpp.

◆ leftWithoutBorder()

double KWTableFrameSet::leftWithoutBorder ( )

Calculate the top postion of the cell(s) in the top row.

Returns
double table top position

Definition at line 263 of file KWTableFrameSet.cpp.

◆ loadCell()

KWTableFrameSet::Cell * KWTableFrameSet::loadCell ( TQDomElement & frameElem,
bool loadFrames = true,
bool useNames = true )

load one cell

Definition at line 2045 of file KWTableFrameSet.cpp.

◆ loadOasis()

void KWTableFrameSet::loadOasis ( const TQDomElement & tag,
KoOasisContext & context )

Definition at line 1854 of file KWTableFrameSet.cpp.

◆ moveBy()

void KWTableFrameSet::moveBy ( double dx,
double dy )

move the whole of the table, this is mainly for anchored frames.

Definition at line 890 of file KWTableFrameSet.cpp.

◆ moveFloatingFrame()

void KWTableFrameSet::moveFloatingFrame ( int frameNum,
const KoPoint & position )
virtual

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.

◆ nextTextObject()

KWTextFrameSet * KWTableFrameSet::nextTextObject ( KWFrameSet * obj)
virtual

Reimplemented from KWFrameSet.

Definition at line 2227 of file KWTableFrameSet.cpp.

◆ paragraphs()

int KWTableFrameSet::paragraphs ( )
virtual

Contribute to the document statistics.

Reimplemented from KWFrameSet.

Definition at line 2145 of file KWTableFrameSet.cpp.

◆ paragraphsSelected()

int KWTableFrameSet::paragraphsSelected ( )
virtual

Reimplemented from KWFrameSet.

Definition at line 2153 of file KWTableFrameSet.cpp.

◆ printArrayDebug()

void KWTableFrameSet::printArrayDebug ( )

Definition at line 2290 of file KWTableFrameSet.cpp.

◆ printDebug() [1/2]

void KWTableFrameSet::printDebug ( )
virtual

Reimplemented from KWFrameSet.

Definition at line 2301 of file KWTableFrameSet.cpp.

◆ printDebug() [2/2]

void KWTableFrameSet::printDebug ( KWFrame * frame)
virtual

Reimplemented from KWFrameSet.

Definition at line 2278 of file KWTableFrameSet.cpp.

◆ protectContent()

virtual bool KWTableFrameSet::protectContent ( ) const
inlinevirtual

Implements KWFrameSet.

Definition at line 502 of file KWTableFrameSet.h.

◆ recalcCols()

void KWTableFrameSet::recalcCols ( uint column,
uint row )

resize and position all cells

Definition at line 297 of file KWTableFrameSet.cpp.

◆ recalcRows()

void KWTableFrameSet::recalcRows ( uint column,
uint row )

Definition at line 352 of file KWTableFrameSet.cpp.

◆ reInsertColumn()

void KWTableFrameSet::reInsertColumn ( RemovedColumn & col)

replace a column that was removed with deleteColumn()

Definition at line 1155 of file KWTableFrameSet.cpp.

◆ reInsertRow()

void KWTableFrameSet::reInsertRow ( RemovedRow & row)

replace a row that was removed with deleteRow()

Definition at line 961 of file KWTableFrameSet.cpp.

◆ removeCell()

void KWTableFrameSet::removeCell ( Cell * cell)

Remove a cell from this table (either to delete it, or to move it).

Definition at line 184 of file KWTableFrameSet.cpp.

◆ resizeColumn()

void KWTableFrameSet::resizeColumn ( unsigned int col,
double x )

move a column edge (i.e.

col can be 0 to getCols()+1)

Definition at line 736 of file KWTableFrameSet.cpp.

◆ resizeRow()

void KWTableFrameSet::resizeRow ( unsigned int row,
double y )

move a row edge (i.e.

row can be 0 to getRows()+1)

Definition at line 756 of file KWTableFrameSet.cpp.

◆ resizeWidth()

void KWTableFrameSet::resizeWidth ( double width)

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 783 of file KWTableFrameSet.cpp.

◆ rowEdgeAt()

int KWTableFrameSet::rowEdgeAt ( double y) const

return the number of the row edge closest to x (between 0 and getRows()+1)

Definition at line 713 of file KWTableFrameSet.cpp.

◆ rowSize()

double KWTableFrameSet::rowSize ( unsigned int col)

Definition at line 731 of file KWTableFrameSet.cpp.

◆ save()

TQDomElement KWTableFrameSet::save ( TQDomElement & parentElem,
bool saveFrames = true )
virtual

override save so we save in table style.

Implements KWFrameSet.

Definition at line 2012 of file KWTableFrameSet.cpp.

◆ saveOasis()

void KWTableFrameSet::saveOasis ( KoXmlWriter & writer,
KoSavingContext & context,
bool saveFrames ) const
virtual

Save to OASIS format.

Implements KWFrameSet.

Definition at line 1779 of file KWTableFrameSet.cpp.

◆ setBoundingRect()

void KWTableFrameSet::setBoundingRect ( KoRect rect,
CellSize widthMode,
CellSize heightMode )

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 802 of file KWTableFrameSet.cpp.

◆ setProtectContent()

virtual void KWTableFrameSet::setProtectContent ( bool )
inlinevirtual

Implements KWFrameSet.

Definition at line 501 of file KWTableFrameSet.h.

◆ setVisible()

void KWTableFrameSet::setVisible ( bool v)
virtual

set the visibility of the frameset.

Reimplemented from KWFrameSet.

Definition at line 2198 of file KWTableFrameSet.cpp.

◆ setZOrder()

void KWTableFrameSet::setZOrder ( )
virtual

Sets zOrder for all cells in this table.

Reimplemented from KWFrameSet.

Definition at line 2255 of file KWTableFrameSet.cpp.

◆ splitCell()

KCommand * KWTableFrameSet::splitCell ( unsigned int intoRows,
unsigned int intoColumns,
unsigned int column,
unsigned int row,
TQPtrList< KWFrameSet > listFrameSet = TQPtrList<KWFrameSet>(),
TQPtrList< KWFrame > listFrame = TQPtrList<KWFrame>() )

split one cell into a number of cells and return a command for undo purposes.

Parameters
intoRowsthe amount of rows the cell should be split into
intoColumnsthe amount of columns the cell should be split into
columnthe column of the cell to be split
rowthe row of the cell to be split
listFrameSetneeded for undo reasons
listFrameneeded for undo reasons

Definition at line 1301 of file KWTableFrameSet.cpp.

◆ statistics()

bool KWTableFrameSet::statistics ( TQProgressDialog * progress,
ulong & charsWithSpace,
ulong & charsWithoutSpace,
ulong & words,
ulong & sentences,
ulong & syllables,
ulong & lines,
bool selected )
virtual

Reimplemented from KWFrameSet.

Definition at line 2161 of file KWTableFrameSet.cpp.

◆ topWithoutBorder()

double KWTableFrameSet::topWithoutBorder ( )

Calculate the top postion of the cell(s) in the leftmost column.

Returns
double table leftmost position

Definition at line 251 of file KWTableFrameSet.cpp.

◆ toXML()

TQDomElement KWTableFrameSet::toXML ( TQDomElement & parentElem,
bool saveFrames = true )
virtual

from and to XML - used when copying and pasting a table

Reimplemented from KWFrameSet.

Definition at line 2021 of file KWTableFrameSet.cpp.

◆ type()

virtual FrameSetType KWTableFrameSet::type ( ) const
inlinevirtual

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 303 of file KWTableFrameSet.h.

◆ ungroup()

void KWTableFrameSet::ungroup ( )

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 1247 of file KWTableFrameSet.cpp.

◆ updateFrames()

void KWTableFrameSet::updateFrames ( int flags = 0xff)
virtual

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.

◆ validate()

void KWTableFrameSet::validate ( )

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 1443 of file KWTableFrameSet.cpp.

◆ viewFormatting()

void KWTableFrameSet::viewFormatting ( TQPainter & painter,
int zoom )

display formatting information

Definition at line 1439 of file KWTableFrameSet.cpp.

◆ Cell

friend class Cell
friend

Definition at line 147 of file KWTableFrameSet.h.

Member Data Documentation

◆ m_sDefaultColWidth

const uint KWTableFrameSet::m_sDefaultColWidth = 60
static

Definition at line 517 of file KWTableFrameSet.h.


The documentation for this class was generated from the following files: