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

Detailed Description
Class: KWFrameSet Base type, a frameset holds content as well as frames to show that content.The different types of content are implemented in the different types of frameSet implementations (see below)
Definition at line 61 of file KWFrameSet.h.
Public Types | |
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 } |
Signals | |
void | repaintChanged (KWFrameSet *frameset) |
void | sigFrameAdded (KWFrame *) |
void | sigFrameRemoved (KWFrame *) |
void | sigNameChanged (KWFrameSet *) |
Public Member Functions | |
KWFrameSet (KWDocument *doc) | |
virtual | ~KWFrameSet () |
virtual KWordFrameSetIface * | dcopObject () |
virtual FrameSetType | type () const |
virtual void | addTextFrameSets (QPtrList< KWTextFrameSet > &, bool=false) |
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 QPoint &nPoint, bool borderOfFrameOnly=false) const |
KWFrame * | frame (unsigned int _num) const |
const QPtrList< KWFrame > & | frameIterator () const |
int | frameFromPtr (KWFrame *frame) |
unsigned int | frameCount () const |
bool | isDeleted () const |
virtual KWFrameSetEdit * | createFrameSetEdit (KWCanvas *) |
virtual void | createEmptyRegion (const QRect &crect, QRegion &emptyRegion, KWViewMode *viewMode) |
virtual void | drawContents (QPainter *painter, const QRect &crect, const QColorGroup &cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit *edit, KWViewMode *viewMode, KWFrameViewManager *frameViewManager) |
void | drawFrameAndBorders (KWFrame *frame, QPainter *painter, const QRect &crect, const QColorGroup &cg, bool, bool, KWFrameSetEdit *edit, KWViewMode *viewMode, KWFrame *settingsFrame, bool drawUnderlyingFrames) |
void | drawFrameBorder (QPainter *painter, KWFrame *frame, KWFrame *settingsFrame, const QRect &crect, KWViewMode *viewMode) |
virtual void | drawFrame (KWFrame *frame, QPainter *painter, const QRect &fcrect, const QRect &crect, const QPoint &translationOffset, KWFrame *settingsFrame, const QColorGroup &cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit *edit, KWViewMode *viewMode, bool drawUnderlyingFrames) |
virtual void | drawFrameContents (KWFrame *frame, QPainter *painter, const QRect &fcrect, const QColorGroup &cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit *edit, KWViewMode *viewMode) |
virtual void | drawPadding (KWFrame *frame, QPainter *p, const QRect &fcrect, const QColorGroup &cg, KWViewMode *viewMode) |
virtual void | updateFrames (int flags=0xff) |
const QPtrList< KWFrame > & | framesInPage (int pageNum) const |
bool | hasFramesInPageArray () const |
virtual void | layout () |
virtual void | invalidate () |
virtual QDomElement | save (QDomElement &parentElem, bool saveFrames=true)=0 |
virtual QDomElement | toXML (QDomElement &parentElem, bool saveFrames=true) |
virtual void | saveOasis (KoXmlWriter &writer, KoSavingContext &context, bool saveFrames) const =0 |
virtual bool | canBeSavedAsInlineCharacter () const |
virtual void | load (QDomElement &framesetElem, bool loadFrames=true) |
KWFrame * | loadOasisFrame (const QDomElement &tag, KoOasisContext &context) |
virtual void | fromXML (QDomElement &framesetElem, bool loadFrames=true, bool=true) |
virtual QString | toPlainText () const |
virtual void | finalize () |
virtual int | paragraphs () |
virtual int | paragraphsSelected () |
virtual bool | statistics (QProgressDialog *, ulong &, ulong &, ulong &, ulong &, ulong &, ulong &, bool) |
KWDocument * | kWordDocument () const |
virtual bool | canRemovePage (int num) |
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) |
virtual KWAnchor * | createAnchor (KoTextDocument *txt, int frameNum) |
virtual void | moveFloatingFrame (int frameNum, const KoPoint &position) |
virtual KoSize | floatingFrameSize (int frameNum=0) |
KoRect | floatingFrameRect (int frameNum=0) |
virtual int | floatingFrameBaseline (int) |
virtual KCommand * | anchoredObjectCreateCommand (int frameNum) |
virtual KCommand * | anchoredObjectDeleteCommand (int frameNum) |
void | setGroupManager (KWTableFrameSet *gm) |
KWTableFrameSet * | groupmanager () const |
bool | isProtectSize () const |
void | setProtectSize (bool _b) |
bool | isVisible (KWViewMode *viewMode=0L) const |
virtual void | setVisible (bool v) |
QString | name () const |
void | setName (const QString &name) |
void | setFrameBehavior (KWFrame::FrameBehavior fb) |
void | setNewFrameBehavior (KWFrame::NewFrameBehavior nfb) |
virtual void | printDebug () |
virtual void | printDebug (KWFrame *) |
virtual KWTextFrameSet * | nextTextObject (KWFrameSet *) |
bool | isPaintedBy (KWFrameSet *fs) const |
virtual void | setZOrder () |
virtual void | setProtectContent (bool protect)=0 |
virtual bool | protectContent () const =0 |
void | setPageManager (KWPageManager *pm) |
KWPageManager * | pageManager () const |
Static Public Member Functions | |
static KWFrame * | settingsFrame (const KWFrame *frame) |
Protected Member Functions | |
void | saveCommon (QDomElement &parentElem, bool saveFrames) |
QRegion | frameClipRegion (QPainter *painter, KWFrame *frame, const QRect &crect, KWViewMode *viewMode) |
void | deleteAnchor (KWAnchor *anchor) |
virtual void | deleteAnchors () |
virtual void | createAnchors (KoTextParag *parag, int index, bool placeHolderExists=false, bool repaint=true) |
Protected Attributes | |
KWDocument * | m_doc |
QPtrList< KWFrame > | m_frames |
QPtrVector< QPtrList< KWFrame > > | m_framesInPage |
int | m_firstPage |
QPtrList< KWFrame > | m_emptyList |
Info | m_info |
KWTableFrameSet * | m_groupmanager |
bool | m_visible |
bool | m_protectSize |
QString | m_name |
KWTextFrameSet * | m_anchorTextFs |
KWordFrameSetIface * | m_dcop |
KWPageManager * | m_pageManager |
Member Enumeration Documentation
|
The different types of textFramesets (that TEXT is important here!) FI_BODY = normal text frames.
Definition at line 90 of file KWFrameSet.h. |
|
Definition at line 294 of file KWFrameSet.h. |
Constructor & Destructor Documentation
|
constructor
Definition at line 45 of file KWFrameSet.cpp. |
|
destructor
Definition at line 72 of file KWFrameSet.cpp. |
Member Function Documentation
|
Store command for creating an anchored object.
Reimplemented in KWTableFrameSet. Definition at line 489 of file KWFrameSet.cpp. |
|
Store command for deleting an anchored object.
Reimplemented in KWTableFrameSet. Definition at line 496 of file KWFrameSet.cpp. |
|
Return the frameset in which our anchor is - assuming isFloating().
Definition at line 373 of file KWFrameSet.h. |
|
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 in KWTableFrameSet. Definition at line 325 of file KWFrameSet.h. |
|
Return true if page
Reimplemented in KWTableFrameSet, and KWTextFrameSet. Definition at line 1126 of file KWFrameSet.cpp. |
|
Create an anchor for the floating frame identified by frameNum.
Reimplemented in KWTableFrameSet. Definition at line 377 of file KWFrameSet.cpp. |
|
Let the caller know which parts of For painting all frames of all framesets the painter needs to find out what area we will fill with a background color and possibly paint over. What this method does is fill an QRegion with all the areas we are going to fill, which typically means we will paint the background of a frame there.
Reimplemented in KWPartFrameSet, KWPictureFrameSet, and KWTableFrameSet. Definition at line 160 of file KWFrameSet.cpp. |
|
Create a framesetedit object to edit this frameset in
Reimplemented in KWFormulaFrameSet, KWPartFrameSet, KWTableFrameSet, and KWTextFrameSet. Definition at line 168 of file KWFrameSet.h. |
|
Delete a frame from the set of frames this frameSet has.
Reimplemented in KWTextFrameSet. Definition at line 127 of file KWFrameSet.cpp. |
|
Delete a frame from the set of frames this frameSet has.
Reimplemented in KWFormulaFrameSet, KWPartFrameSet, and KWTextFrameSet. Definition at line 93 of file KWFrameSet.cpp. |
|
Paint this frameset.
Framesets shouldn't reimplement this one in theory [but KWTableFrameSet has to]. Reimplemented in KWTableFrameSet::Cell, KWTableFrameSet, and KWTextFrameSet. Definition at line 632 of file KWFrameSet.cpp. |
|
Draw a particular frame of this frameset. This is called by drawContents and is what framesets must reimplement.
Reimplemented in KWTableFrameSet, and KWTextFrameSet. Definition at line 754 of file KWFrameSet.cpp. |
|
This one is called by drawContents for each frame. It sets up clip rect and painter translation, and calls drawFrame, drawFrameBorder and drawMargins
Definition at line 679 of file KWFrameSet.cpp. |
|
Paint the borders for one frame of this frameset.
Definition at line 237 of file KWFrameSet.cpp. |
|
Implement this one instead of drawFrame to benefit from double-buffering AND transparency handling (painting frames below this one) automatically. You MUST reimplement one or the other, or you'll get infinite recursion ;) In this method, the painter has been translated to the frame's coordinate system
Reimplemented in KWFormulaFrameSet, KWPartFrameSet, KWPictureFrameSet, and KWTextFrameSet. Definition at line 859 of file KWFrameSet.cpp. |
|
Draw the padding area inside of a specific frame of this frameSet.
Definition at line 187 of file KWFrameSet.cpp. |
|
Called once the frameset has been completely loaded or constructed. The default implementation calls updateFrames() and zoom(). Call the parent :) Reimplemented in KWTableFrameSet, and KWTextFrameSet. Definition at line 1071 of file KWFrameSet.cpp. |
|
Return the anchor object for this frame number.
Definition at line 343 of file KWFrameSet.cpp. |
|
Get the 'baseline' to use for the "floating frame" identified by frameNum. -1 means same as the height (usual case) Reimplemented in KWFormulaFrameSet. Definition at line 396 of file KWFrameSet.h. |
|
Get the rect of the "floating frame" identified by frameNum, in coordinates RELATIVE TO THE PARENT FRAMESET. This is especially important for multi-parent inline frames. Definition at line 466 of file KWFrameSet.cpp. |
|
Get the size of the "floating frame" identified by frameNum. By default a real frame but not for tables. Reimplemented in KWTableFrameSet. Definition at line 482 of file KWFrameSet.cpp. |
|
get a frame by number
Definition at line 513 of file KWFrameSet.cpp. |
|
retrieve frame from x and y coords (unzoomed coords)
Definition at line 503 of file KWFrameSet.cpp. |
|
Determine the clipping rectangle for drawing the contents of This determines where to clip the painter to draw the contents of a given frame Definition at line 1077 of file KWFrameSet.cpp. |
|
Get number of child frames.
Definition at line 162 of file KWFrameSet.h. |
|
Called by deleteFrame when it really deletes a frame (remove=true), to remove it from the table too.
Reimplemented in KWTableFrameSet::Cell. Definition at line 128 of file KWFrameSet.h. |
|
Get frame number.
Definition at line 519 of file KWFrameSet.cpp. |
|
Iterator over the child frames.
Definition at line 158 of file KWFrameSet.h. |
|
Returns the type of TextFrameSet this is.
Definition at line 94 of file KWFrameSet.h. |
|
Return list of frames in page This is fast since it uses the m_framesInPage array. Definition at line 618 of file KWFrameSet.cpp. |
|
load from XML - when pasting from clipboard
Reimplemented in KWTableFrameSet. Definition at line 331 of file KWFrameSet.h. |
|
returns the groupManager this frameset belongs to. A Groupmanager is better known as a table Definition at line 407 of file KWFrameSet.h. |
|
Allows to detect that updateFrames() hasn't been called yet (e.g. on loading) Definition at line 310 of file KWFrameSet.h. |
|
True if the frameset was deleted (but not destroyed, since it's in the undo/redo).
Definition at line 165 of file KWFrameSet.h. |
|
Return true if this frameset is floating (inline), false if it's fixed.
Definition at line 371 of file KWFrameSet.h. |
|
Return if the point is on the frame.
Definition at line 1156 of file KWFrameSet.cpp. |
|
Returns true if the frameset is visible. A frameset is visible if setVisible(false) wasn't called, but also, for a header frameset, if m_doc->isHeaderVisible is true, etc. For an "even pages header" frameset, the corresponding headerType setting must be selected (i.e. different headers for even and odd pages).
Definition at line 989 of file KWFrameSet.cpp. |
|
relayout text in frames, so that it flows correctly around other frames
Reimplemented in KWTableFrameSet, and KWTextFrameSet. Definition at line 313 of file KWFrameSet.h. |
|
load from XML - when loading
Reimplemented in KWFormulaFrameSet, KWPartFrameSet, KWPictureFrameSet, and KWTextFrameSet. Definition at line 906 of file KWFrameSet.cpp. |
|
Move the frame frameNum to the given position - this is called when the frame is anchored and the anchor moves (see KWAnchor).
Reimplemented in KWFormulaFrameSet, KWPartFrameSet, and KWTableFrameSet. Definition at line 443 of file KWFrameSet.cpp. |
|
get/set frameset name. For tables in particular, this _must_ be unique
Definition at line 427 of file KWFrameSet.h. |
|
Emitted when something has changed in this frameset, so that all views repaint it. KWDocument connects to it, and KWCanvas connects to KWDocument. |
|
save to XML - when saving
Implemented in KWFormulaFrameSet, KWPartFrameSet, KWPictureFrameSet, KWTableFrameSet, and KWTextFrameSet. |
|
save the common attributes for the frameset
Definition at line 865 of file KWFrameSet.cpp. |
|
Save to OASIS format.
Implemented in KWFormulaFrameSet, KWPartFrameSet, KWPictureFrameSet, KWTableFrameSet, and KWTextFrameSet. |
|
Note that this frameset has been made floating already, and store anchor position.
Definition at line 333 of file KWFrameSet.cpp. |
|
Make this frameset floating, with the anchor at
Definition at line 306 of file KWFrameSet.cpp. |
|
Make this frameset anchored, with the anchor at Also used during OASIS loading (placeHolderExists=true) Definition at line 314 of file KWFrameSet.cpp. |
|
Tell this frame the format of it's anchor.
Reimplemented in KWFormulaFrameSet. Definition at line 379 of file KWFrameSet.h. |
|
Sets the frameset in which we are about to become inline. Used for OASIS loading.
Definition at line 375 of file KWFrameSet.h. |
|
Make this frameset fixed, i.e. not anchored.
Definition at line 361 of file KWFrameSet.cpp. |
|
Make this frameset floating (anchored), as close to its current position as possible.
Definition at line 278 of file KWFrameSet.cpp. |
|
set frameBehavior on all frames, see KWFrame for specifics
Definition at line 1145 of file KWFrameSet.cpp. |
|
Set the type of TextFrameSet this is.
Definition at line 96 of file KWFrameSet.h. |
|
make this frameset part of a groupmanager
Definition at line 405 of file KWFrameSet.h. |
|
set newFrameBehavior on all frames, see KWFrame for specifics
Definition at line 1150 of file KWFrameSet.cpp. |
|
Returns the original frame that the param frame is a copy off, or the frame itself. For changing a frame that is a copy of another (as found in KWFrame::isCopy()) you need a so called settings frame, or original frame. This method can savely be called on any frame to make sure you are dealing with the original frame.
Definition at line 524 of file KWFrameSet.cpp. |
|
set the visibility of the frameset.
Reimplemented in KWTableFrameSet, and KWTextFrameSet. Definition at line 981 of file KWFrameSet.cpp. |
|
set z-order for all frames
Reimplemented in KWTableFrameSet::Cell, and KWTableFrameSet. Definition at line 1178 of file KWFrameSet.cpp. |
|
save to XML - when copying to clipboard
Reimplemented in KWTableFrameSet, and KWTextFrameSet. Definition at line 319 of file KWFrameSet.h. |
|
The type of frameset. Use this to differentiate between different instantiations of the framesets. Each implementation will return a different frameType. Reimplemented in KWFormulaFrameSet, KWPartFrameSet, KWPictureFrameSet, KWTableFrameSet, and KWTextFrameSet. Definition at line 75 of file KWFrameSet.h. |
|
Called when our frames change, or when another frameset's frames change. Framesets can reimplement it, but should always call the parent method. Reimplemented in KWTableFrameSet, and KWTextFrameSet. Definition at line 541 of file KWFrameSet.cpp. |
Member Data Documentation
|
always empty, for convenience in framesInPage
Definition at line 492 of file KWFrameSet.h. |
|
always equal to m_framesInPage[0].first()->pageNumber() :)
Definition at line 490 of file KWFrameSet.h. |
|
This array provides a direct access to the frames on page N.
Definition at line 488 of file KWFrameSet.h. |
The documentation for this class was generated from the following files: