kspread

KSpread::EmbeddedObject Class Reference

#include <kspread_object.h>

Inheritance diagram for KSpread::EmbeddedObject:

KSpread::EmbeddedKOfficeObject KSpread::EmbeddedPictureObject KSpread::EmbeddedChart List of all members.

Detailed Description

Contains basic information for every object.

Definition at line 108 of file kspread_object.h.


Public Member Functions

 EmbeddedObject (Sheet *_sheet, const KoRect &_geometry)
virtual ~EmbeddedObject ()
virtual ObjType getType () const
virtual QString getTypeString () const
KoRect geometry ()
void setGeometry (const KoRect &rect)
virtual void moveBy (const KoPoint &_point)
virtual void moveBy (double _dx, double _dy)
virtual void resizeBy (const KoSize &_size)
virtual void resizeBy (double _dx, double _dy)
Sheetsheet () const
void setSelected (bool s)
bool isSelected () const
void setObjectName (const QString &_objectName)
QString getObjectName () const
virtual void setProtect (bool b)
bool isProtect () const
virtual void setKeepRatio (bool b)
bool isKeepRatio () const
virtual void rotate (float _angle)
virtual float getAngle () const
virtual bool load (const QDomElement &element)
virtual void loadOasis (const QDomElement &element, KoOasisLoadingContext &context)
virtual QDomElement save (QDomDocument &doc)
virtual bool saveOasisObject (KSpreadOasisSaveContext &sc) const
virtual void draw (QPainter *_painter)
QPixmap toPixmap (QSize size)
QPixmap toPixmap ()
virtual QPixmap toPixmap (double xZoom, double yZoom)
void paintSelection (QPainter *_painter, SelectionMode selectionMode)
virtual QCursor getCursor (const QPoint &_point, ModifyType &_modType, QRect &geometry) const
virtual void removeFromObjList ()
virtual void addToObjList ()
virtual void incCmdRef ()
virtual void decCmdRef ()
virtual QBrush getBrush () const

Protected Member Functions

virtual const char * getOasisElementName () const =0
virtual void saveOasisPosObject (KoXmlWriter &xmlWriter, int indexObj) const
virtual bool saveOasisObjectAttributes (KSpreadOasisSaveContext &sc) const
virtual void doDelete ()
void calculateRequiredZoom (QSize desiredSize, double &xZoom, double &yZoom)

Protected Attributes

KoRect m_geometry
Sheetm_sheet
Canvasm_canvas
QString m_objectName
bool m_selected:1
bool m_protect:1
bool m_keepRatio:1
bool inObjList:1
int cmds
float angle
KoPen pen
KoBrush m_brush

Classes

struct  KSpreadOasisSaveContext

Member Function Documentation

void EmbeddedObject::calculateRequiredZoom QSize  desiredSize,
double &  xZoom,
double &  yZoom
[protected]
 

Calculates the X and Y zoom factors required to render the embedded object at the given size.

Parameters:
desiredSize The desired size for the embedded object to be drawn at
xZoom This will be set to the required X zoom factor
yZoom This will be set to the required Y zoom factor

Definition at line 188 of file kspread_object.cc.

virtual const char* KSpread::EmbeddedObject::getOasisElementName  )  const [protected, pure virtual]
 

Get the element name for saving the object.

Implemented in KSpread::EmbeddedKOfficeObject, KSpread::EmbeddedChart, and KSpread::EmbeddedPictureObject.

QPixmap EmbeddedObject::toPixmap double  xZoom,
double  yZoom
[virtual]
 

Renders the embedded object to a pixmap at the specified x and y scale and returns the result.

Reimplemented in KSpread::EmbeddedKOfficeObject, and KSpread::EmbeddedPictureObject.

Definition at line 182 of file kspread_object.cc.

QPixmap EmbeddedObject::toPixmap  ) 
 

Renders the embedded object to a pixmap at 100% scale.

Equivalent to calling toPixmap( 1.0, 1.0 )

Definition at line 167 of file kspread_object.cc.

QPixmap EmbeddedObject::toPixmap QSize  size  ) 
 

Renders the embedded object to a pixmap and returns the result.

This is a convenience function which calculates the necessary x and y zoom factors to render the pixmap at the given size and calls toPixmap(double,double)

Parameters:
size Specifies the desired size of the returned pixmap.

Definition at line 172 of file kspread_object.cc.


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