kword
KWPartFrameSet Class Reference
#include <KWPartFrameSet.h>

Detailed Description
A frameset that contains an embedded object (a KWDocumentChild).Definition at line 29 of file KWPartFrameSet.h.
Public Member Functions | |
KWPartFrameSet (KWDocument *_doc, KWDocumentChild *_child, const QString &name) | |
KWPartFrameSet (KWDocument *doc, const QDomElement &frameTag, const QDomElement &objectTag, KoOasisContext &context) | |
virtual KWordFrameSetIface * | dcopObject () |
virtual FrameSetType | type () const |
virtual KWFrameSetEdit * | createFrameSetEdit (KWCanvas *) |
KWDocumentChild * | getChild () const |
void | setChild (KWDocumentChild *child) |
void | updateChildGeometry () |
virtual void | drawFrameContents (KWFrame *frame, QPainter *painter, const QRect &fcrect, const QColorGroup &cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit *edit, KWViewMode *viewMode) |
virtual void | createEmptyRegion (const QRect &crect, QRegion &emptyRegion, KWViewMode *viewMode) |
virtual QDomElement | save (QDomElement &parentElem, bool saveFrames=true) |
virtual void | load (QDomElement &attributes, bool loadFrames=true) |
virtual void | saveOasis (KoXmlWriter &writer, KoSavingContext &context, bool saveFrames) const |
void | startEditing () |
void | endEditing () |
virtual void | moveFloatingFrame (int frameNum, const KoPoint &position) |
virtual void | printDebug () |
void | deleteFrame (unsigned int num, bool remove=true, bool recalc=true) |
void | setDeleted (bool on=true) |
virtual void | storeInternal () |
virtual void | setProtectContent (bool protect) |
virtual bool | protectContent () const |
Constructor & Destructor Documentation
KWPartFrameSet::KWPartFrameSet | ( | KWDocument * | doc, | |
const QDomElement & | frameTag, | |||
const QDomElement & | objectTag, | |||
KoOasisContext & | context | |||
) |
Member Function Documentation
virtual FrameSetType KWPartFrameSet::type | ( | ) | const [inline, virtual] |
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 47 of file KWPartFrameSet.h.
KWFrameSetEdit * KWPartFrameSet::createFrameSetEdit | ( | KWCanvas * | ) | [virtual] |
Create a framesetedit object to edit this frameset in canvas
.
Reimplemented from KWFrameSet.
Definition at line 224 of file KWPartFrameSet.cpp.
void KWPartFrameSet::updateChildGeometry | ( | ) |
Update the geometry of m_child based on the geometry of the frame.
Definition at line 126 of file KWPartFrameSet.cpp.
void KWPartFrameSet::drawFrameContents | ( | KWFrame * | frame, | |
QPainter * | painter, | |||
const QRect & | fcrect, | |||
const QColorGroup & | cg, | |||
bool | onlyChanged, | |||
bool | resetChanged, | |||
KWFrameSetEdit * | edit, | |||
KWViewMode * | viewMode | |||
) | [virtual] |
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
- Parameters:
-
fcrect rectangle to be repainted, in the _frame_'s coordinate system, in pixels. Doesn't include padding. frame the frame to draw painter the painter to draw to cg The colorgroup from which to get the colors onlyChanged If true, only redraw what has changed (see KWCanvas::repaintChanged) resetChanged If true, set the changed flag to false after drawing. edit If set, this frameset is being edited, so a cursor is needed. viewMode For coordinate conversion, always set.
Reimplemented from KWFrameSet.
Definition at line 96 of file KWPartFrameSet.cpp.
virtual void KWPartFrameSet::createEmptyRegion | ( | const QRect & | crect, | |
QRegion & | emptyRegion, | |||
KWViewMode * | viewMode | |||
) | [virtual] |
Let the caller know which parts of emptyRegion
we do not claim, and thus the caller is free to paint on without interfering with later paints from us.
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.
- Parameters:
-
emptyRegion The region is modified to subtract the areas painted, thus allowing the caller to determine which areas remain to be painted. Framesets that can be transparent should reimplement this and make it a no-op, so that the background is painted below the transparent frame. crect the cliprect; only parts inside this rect are of interrest to us viewMode For coordinate conversion, always set.
Reimplemented from KWFrameSet.
QDomElement KWPartFrameSet::save | ( | QDomElement & | parentElem, | |
bool | saveFrames = true | |||
) | [virtual] |
void KWPartFrameSet::load | ( | QDomElement & | framesetElem, | |
bool | loadFrames = true | |||
) | [virtual] |
load from XML - when loading
Reimplemented from KWFrameSet.
Definition at line 180 of file KWPartFrameSet.cpp.
void KWPartFrameSet::saveOasis | ( | KoXmlWriter & | writer, | |
KoSavingContext & | context, | |||
bool | saveFrames | |||
) | const [virtual] |
void KWPartFrameSet::startEditing | ( | ) |
Called by KWView when the object is being edited (activated).
Allows to store the initial position.
Definition at line 185 of file KWPartFrameSet.cpp.
void KWPartFrameSet::endEditing | ( | ) |
Called by KWView when the object is not being edited anymore (deactivated).
Allows to create a frame-move command if the frame was moved.
Definition at line 202 of file KWPartFrameSet.cpp.
void KWPartFrameSet::moveFloatingFrame | ( | int | frameNum, | |
const KoPoint & | position | |||
) | [virtual] |
Move the frame 'frameNum' to the given position and move the document child window with it This is called when the frame is anchored and the anchor moves (see KWAnchor).
Reimplemented from KWFrameSet.
Definition at line 213 of file KWPartFrameSet.cpp.
void KWPartFrameSet::deleteFrame | ( | unsigned int | num, | |
bool | remove = true , |
|||
bool | recalc = true | |||
) | [virtual] |
Delete a frame from the set of frames this frameSet has.
- Parameters:
-
num The frameNumber to be removed. remove passing true means that there can not be an undo of the action. recalc do an updateFrames()
Reimplemented from KWFrameSet.
Definition at line 252 of file KWPartFrameSet.cpp.
The documentation for this class was generated from the following files: