kword

KWPictureFrameSet Class Reference

Inheritance diagram for KWPictureFrameSet:

KWFrameSet List of all members.

Detailed Description

Definition at line 27 of file KWPictureFrameSet.h.


Public Member Functions

 KWPictureFrameSet (KWDocument *_doc, const QString &name)
 KWPictureFrameSet (KWDocument *doc, const QDomElement &frame, const QDomElement &imageTag, KoOasisContext &context)
virtual ~KWPictureFrameSet ()
virtual KWordFrameSetIfacedcopObject ()
virtual FrameSetType type () const
void setPicture (const KoPicture &picture)
KoPicture picture () const
KoPictureKey key () const
void loadPicture (const QString &fileName)
void insertPicture (const KoPicture &picture)
void reloadPicture (const KoPictureKey &key)
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
virtual void drawFrameContents (KWFrame *frame, QPainter *painter, const QRect &crect, const QColorGroup &cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit *edit, KWViewMode *viewMode)
virtual void createEmptyRegion (const QRect &, QRegion &, KWViewMode *)
virtual void printDebug (KWFrame *frame)
bool keepAspectRatio () const
void setKeepAspectRatio (bool b)
virtual void setProtectContent (bool)
virtual bool protectContent () const

Protected Member Functions

void loadOasis (const QDomElement &frame, const QDomElement &imageTag, KoOasisContext &context)

Protected Attributes

KoPicture m_picture
bool m_keepAspectRatio
bool m_finalSize

Constructor & Destructor Documentation

KWPictureFrameSet::KWPictureFrameSet ( KWDocument doc,
const QDomElement &  frame,
const QDomElement &  imageTag,
KoOasisContext &  context 
)

Used for OASIS loading.

Definition at line 44 of file KWPictureFrameSet.cpp.


Member Function Documentation

virtual void KWPictureFrameSet::createEmptyRegion ( const QRect &  ,
QRegion &  ,
KWViewMode  
) [inline, virtual]

Pixmaps can be transparent.

Reimplemented from KWFrameSet.

Definition at line 66 of file KWPictureFrameSet.h.

void KWPictureFrameSet::drawFrameContents ( KWFrame frame,
QPainter *  painter,
const QRect &  crect,
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 224 of file KWPictureFrameSet.cpp.

void KWPictureFrameSet::load ( QDomElement &  attributes,
bool  loadFrames = true 
) [virtual]

load from XML - when loading

Reimplemented from KWFrameSet.

Definition at line 104 of file KWPictureFrameSet.cpp.

virtual bool KWPictureFrameSet::protectContent (  )  const [inline, virtual]

This method is part of the KWFrameSet API and is left empty here, protect content is irrelevant for picture frame sets.

Implements KWFrameSet.

Definition at line 84 of file KWPictureFrameSet.h.

void KWPictureFrameSet::reloadPicture ( const KoPictureKey &  key  ) 

Reload a picture, which already exists in the picture collection (if not, it gives a defaulft KoPicture() ).

Definition at line 78 of file KWPictureFrameSet.cpp.

QDomElement KWPictureFrameSet::save ( QDomElement &  parentElem,
bool  saveFrames = true 
) [virtual]

save to XML - when saving

Implements KWFrameSet.

Definition at line 85 of file KWPictureFrameSet.cpp.

void KWPictureFrameSet::saveOasis ( KoXmlWriter &  writer,
KoSavingContext &  context,
bool  saveFrames 
) const [virtual]

Save to OASIS format.

Implements KWFrameSet.

Definition at line 155 of file KWPictureFrameSet.cpp.

virtual void KWPictureFrameSet::setProtectContent ( bool   )  [inline, virtual]

This method is part of the KWFrameSet API and is left empty here, protect content is irrelevant for picture frame sets.

Implements KWFrameSet.

Definition at line 79 of file KWPictureFrameSet.h.

FrameSetType KWPictureFrameSet::type (  )  const [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 234 of file KWPictureFrameSet.cpp.


Member Data Documentation

Cache the finalSize parameter of the method resizeFrame for drawFrame.

Definition at line 93 of file KWPictureFrameSet.h.

KoPicture KWPictureFrameSet::m_picture [protected]

The picture.

Definition at line 90 of file KWPictureFrameSet.h.


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