Référence de la classe KoChild

#include <KoChild.h>

Graphe d'héritage de KoChild:

[légende]
Graphe de collaboration de KoChild:
[légende]
Liste de tous les membres

Types publics

enum  Gadget {
  NoGadget, TopLeft, TopMid, TopRight,
  MidLeft, MidRight, BottomLeft, BottomMid,
  BottomRight, Move
}

Signaux

void changed (KoChild *thisChild)

Fonctions membres publiques

 KoChild (QObject *parent=0, const char *name=0)
virtual ~KoChild ()
void setGeometry (const QRect &rect, bool noEmit=false)
QRect geometry () const
virtual QRegion region (const QMatrix &=QMatrix()) const
virtual QPolygon pointArray (const QMatrix &matrix=QMatrix()) const
QRect boundingRect () const
virtual void setScaling (double x, double y)
virtual double xScaling () const
virtual double yScaling () const
virtual void setShearing (double x, double y)
virtual double xShearing () const
virtual double yShearing () const
virtual void setRotation (double)
virtual double rotation () const
virtual void setRotationPoint (const QPoint &pos)
virtual QPoint rotationPoint () const
bool isRectangle () const
virtual void setClipRegion (QPainter &painter, bool combine=true)
virtual void transform (QPainter &painter)
virtual void setContentsPos (int x, int y)
virtual QRect contentRect () const
virtual QRegion frameRegion (const QMatrix &matrix=QMatrix(), bool solid=false) const
virtual QPolygon framePointArray (const QMatrix &matrix=QMatrix()) const
virtual QMatrix matrix () const
void lock ()
void unlock ()
bool locked () const
virtual QPolygon oldPointArray (const QMatrix &matrix)
virtual void setTransparent (bool transparent)
virtual bool isTransparent () const
virtual Gadget gadgetHitTest (const QPoint &p)

Fonctions membres protégées

virtual QPolygon pointArray (const QRect &r, const QMatrix &matrix=QMatrix()) const
virtual void updateMatrix ()

Attributs privés

KoChildPrivated

Classes

class  KoChildPrivate

Description détaillée

KoChild is an abstract base class that represents the geometry associated with an embedded document. In general it handles its position relative to the embedded document's parent.

In detail it handles size, matrix operations and can give you a clip region. It can deal with scaling, rotation etc. because it makes heavy usage of QMatrix.

After applying the matrix, viewGeometry() applies zooming, but can be reimplemented to also apply e.g. some translation by the application (e.g. for centering the page).

Voir également:
KoDocumentChild KoViewChild

Définition à la ligne 43 du fichier KoChild.h.


Documentation des énumérations membres

enum KoChild::Gadget

The gadget generally identifies where a child has been hit (generally by the mouse pointer). Based on this information different actions can be taken, for example moving the child or opening a context menu. NoGadget means that this child has not been hit.

Voir également:
gadgetHitTest
Valeurs énumérées:
NoGadget 
TopLeft 
TopMid 
TopRight 
MidLeft 
MidRight 
BottomLeft 
BottomMid 
BottomRight 
Move 

Définition à la ligne 57 du fichier KoChild.h.


Documentation des contructeurs et destructeur

KoChild::KoChild ( QObject *  parent = 0,
const char *  name = 0 
)

Définition à la ligne 55 du fichier KoChild.cpp.

Références d, KoChild::KoChildPrivate::m_lock, KoChild::KoChildPrivate::m_rotation, KoChild::KoChildPrivate::m_scaleX, KoChild::KoChildPrivate::m_scaleY, KoChild::KoChildPrivate::m_shearX, KoChild::KoChildPrivate::m_shearY, KoChild::KoChildPrivate::m_transparent, et updateMatrix().

Voici le graphe d'appel pour cette fonction :

KoChild::~KoChild (  )  [virtual]

Définition à la ligne 69 du fichier KoChild.cpp.

Références d.


Documentation des fonctions membres

void KoChild::setGeometry ( const QRect &  rect,
bool  noEmit = false 
)

Sets a new geometry for this child document. Use noEmit = true if you do not want the 'changed'-signal to be emitted

Définition à la ligne 74 du fichier KoChild.cpp.

Références changed(), d, framePointArray(), KoChild::KoChildPrivate::m_geometry, KoChild::KoChildPrivate::m_lock, KoChild::KoChildPrivate::m_old, et updateMatrix().

Référencé par KoPartMoveHandler::eventFilter(), KoPartResizeHandler::eventFilter(), KoDocumentChild::KoDocumentChild(), KoDocumentChild::load(), KoDocumentChild::loadOasis(), KoDocumentChild::setDocument(), et KoViewChild::slotFrameGeometryChanged().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

QRect KoChild::geometry (  )  const

Renvoie:
the rectangle that would be used to display this child document if the child is not rotated or subject to some other geometric transformation. The rectangle is in the coordinate system of the parent, using unzoomed coordinates in points.
Voir également:
setGeometry

Définition à la ligne 94 du fichier KoChild.cpp.

Références d, et KoChild::KoChildPrivate::m_geometry.

Référencé par KoPartMoveHandlerPrivate::KoPartMoveHandlerPrivate(), KoPartResizeHandlerPrivate::KoPartResizeHandlerPrivate(), KoDocumentChild::save(), et KoViewChild::slotFrameGeometryChanged().

Voici le graphe d'appel pour cette fonction :

QRegion KoChild::region ( const QMatrix &  = QMatrix()  )  const [virtual]

Renvoie:
the region of this child part relative to the coordinate system of the parent. The region is transformed with the passed matrix.

Définition à la ligne 99 du fichier KoChild.cpp.

Références pointArray().

Référencé par frameRegion(), KoDocumentChild::hitTest(), et setClipRegion().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

QPolygon KoChild::pointArray ( const QMatrix &  matrix = QMatrix()  )  const [virtual]

Renvoie:
the polygon which surrounds the child part. The points are in coordinates of the parent. The points are transformed with the passed matrix.

Définition à la ligne 104 du fichier KoChild.cpp.

Références d, et KoChild::KoChildPrivate::m_geometry.

Référencé par boundingRect(), framePointArray(), gadgetHitTest(), et region().

Voici le graphe d'appel pour cette fonction :

QRect KoChild::boundingRect (  )  const

Renvoie:
the effective bounding rect after all transformations. The coordinates of the rectangle are in the coordinate system of the parent.

Définition à la ligne 114 du fichier KoChild.cpp.

Références pointArray().

Voici le graphe d'appel pour cette fonction :

void KoChild::setScaling ( double  x,
double  y 
) [virtual]

Scales the content of the child part. However, that does not affect the size of the child part.

Définition à la ligne 133 du fichier KoChild.cpp.

Références changed(), d, framePointArray(), KoChild::KoChildPrivate::m_lock, KoChild::KoChildPrivate::m_old, KoChild::KoChildPrivate::m_scaleX, et KoChild::KoChildPrivate::m_scaleY.

Voici le graphe d'appel pour cette fonction :

double KoChild::xScaling (  )  const [virtual]

Renvoie:
the x axis scaling of the child part

Définition à la ligne 151 du fichier KoChild.cpp.

Références d, et KoChild::KoChildPrivate::m_scaleX.

Référencé par KoDocumentChild::hitTest(), KoViewChild::KoViewChild(), et KoDocument::paintChild().

Voici le graphe d'appel pour cette fonction :

double KoChild::yScaling (  )  const [virtual]

Renvoie:
the y axis scaling of the child part

Définition à la ligne 156 du fichier KoChild.cpp.

Références d, et KoChild::KoChildPrivate::m_scaleY.

Référencé par KoDocumentChild::hitTest(), KoViewChild::KoViewChild(), et KoDocument::paintChild().

Voici le graphe d'appel pour cette fonction :

void KoChild::setShearing ( double  x,
double  y 
) [virtual]

Shears the content of the child part.

Définition à la ligne 161 du fichier KoChild.cpp.

Références changed(), d, framePointArray(), KoChild::KoChildPrivate::m_lock, KoChild::KoChildPrivate::m_old, KoChild::KoChildPrivate::m_shearX, KoChild::KoChildPrivate::m_shearY, et updateMatrix().

Voici le graphe d'appel pour cette fonction :

double KoChild::xShearing (  )  const [virtual]

Renvoie:
the x axis shearing of the child part

Définition à la ligne 175 du fichier KoChild.cpp.

Références d, et KoChild::KoChildPrivate::m_shearX.

double KoChild::yShearing (  )  const [virtual]

Renvoie:
the y axis shearing of the child part

Définition à la ligne 180 du fichier KoChild.cpp.

Références d, et KoChild::KoChildPrivate::m_shearY.

void KoChild::setRotation ( double   )  [virtual]

Sets the angle of rotation.

Définition à la ligne 185 du fichier KoChild.cpp.

Références changed(), d, framePointArray(), KoChild::KoChildPrivate::m_lock, KoChild::KoChildPrivate::m_old, KoChild::KoChildPrivate::m_rotation, et updateMatrix().

Voici le graphe d'appel pour cette fonction :

double KoChild::rotation (  )  const [virtual]

Renvoie:
the angle of rotation

Définition à la ligne 197 du fichier KoChild.cpp.

Références d, et KoChild::KoChildPrivate::m_rotation.

void KoChild::setRotationPoint ( const QPoint &  pos  )  [virtual]

Sets the center of the rotation to the point pos.

Définition à la ligne 202 du fichier KoChild.cpp.

Références changed(), d, framePointArray(), KoChild::KoChildPrivate::m_lock, KoChild::KoChildPrivate::m_old, KoChild::KoChildPrivate::m_rotationPoint, et updateMatrix().

Référencé par KoPartMoveHandler::eventFilter().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

QPoint KoChild::rotationPoint (  )  const [virtual]

Renvoie:
the center of the rotation

Définition à la ligne 214 du fichier KoChild.cpp.

Références d, et KoChild::KoChildPrivate::m_rotationPoint.

Référencé par KoPartMoveHandlerPrivate::KoPartMoveHandlerPrivate().

Voici le graphe d'appel pour cette fonction :

bool KoChild::isRectangle (  )  const

Renvoie:
true if the child part is an orthogonal rectangle relative to its parents coordinate system.

Définition à la ligne 119 du fichier KoChild.cpp.

Références d, KoChild::KoChildPrivate::m_rotation, KoChild::KoChildPrivate::m_shearX, et KoChild::KoChildPrivate::m_shearY.

Référencé par KoView::partActivateEvent().

Voici le graphe d'appel pour cette fonction :

void KoChild::setClipRegion ( QPainter &  painter,
bool  combine = true 
) [virtual]

Sets the clip region of the painter, so that only pixels of the child part can be drawn.

Paramètres:
painter the painter do modify.
combine tells whether the new clip region is an intersection of the current region with the child's region or whether only the child's region is set.

Définition à la ligne 124 du fichier KoChild.cpp.

Références region().

Référencé par transform().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

void KoChild::transform ( QPainter &  painter  )  [virtual]

Transforms the painter (its worldmatrix and the clipping) in such a way that the painter can be passed to the child part for drawing.

Définition à la ligne 219 du fichier KoChild.cpp.

Références d, KoChild::KoChildPrivate::m_matrix, KoChild::KoChildPrivate::m_scaleX, KoChild::KoChildPrivate::m_scaleY, et setClipRegion().

Référencé par KoDocument::paintChild().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

void KoChild::setContentsPos ( int  x,
int  y 
) [virtual]

Sets the position of the content relative to the child frame. This can be used to create a border between the frame border and the actual content.

Définition à la ligne 229 du fichier KoChild.cpp.

Références d, KoChild::KoChildPrivate::m_contentsX, et KoChild::KoChildPrivate::m_contentsY.

QRect KoChild::contentRect (  )  const [virtual]

Renvoie:
the contents rectangle that is visible. This value depends on the scaling and the geometry. This is the value that is passed to KoDocument::paintContent.
Voir également:
xScaling geometry

Définition à la ligne 235 du fichier KoChild.cpp.

Références d, KoChild::KoChildPrivate::m_contentsX, KoChild::KoChildPrivate::m_contentsY, KoChild::KoChildPrivate::m_geometry, KoChild::KoChildPrivate::m_scaleX, et KoChild::KoChildPrivate::m_scaleY.

Référencé par KoDocument::paintChild().

Voici le graphe d'appel pour cette fonction :

QRegion KoChild::frameRegion ( const QMatrix &  matrix = QMatrix(),
bool  solid = false 
) const [virtual]

Renvoie:
the region of the child frame. If solid is set to true the complete area of the child region is returned, otherwise only the child border is returned.

Définition à la ligne 246 du fichier KoChild.cpp.

Références framePointArray(), et region().

Référencé par KoPartMoveHandler::eventFilter(), KoPartResizeHandler::eventFilter(), gadgetHitTest(), KoView::hitTest(), KoView::partActivateEvent(), KoView::partSelectEvent(), KoPartResizeHandler::repaint(), et KoView::slotChildChanged().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

QPolygon KoChild::framePointArray ( const QMatrix &  matrix = QMatrix()  )  const [virtual]

Renvoie:
the frame geometry including a border (6 pixels) as a point array with 4 points, one for each corner, transformed by given matrix.

Définition à la ligne 241 du fichier KoChild.cpp.

Références d, KoChild::KoChildPrivate::m_geometry, et pointArray().

Référencé par frameRegion(), lock(), setGeometry(), setRotation(), setRotationPoint(), setScaling(), et setShearing().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

QMatrix KoChild::matrix (  )  const [virtual]

Renvoie:
the current transformation of this child as matrix. This includes translation, scale, rotation, shearing.
Voir également:
updateMatrix

Définition à la ligne 293 du fichier KoChild.cpp.

Références d, et KoChild::KoChildPrivate::m_matrix.

Référencé par KoDocumentChild::hitTest(), et KoPartResizeHandlerPrivate::KoPartResizeHandlerPrivate().

Voici le graphe d'appel pour cette fonction :

void KoChild::lock (  ) 

Locks this child and stores the current transformation. A locked child does not emit changed signals.

This is useful if a series of changes are done on this child and only the final result is of interest (GUI updating,...).

Voir également:
locked unlock

Définition à la ligne 298 du fichier KoChild.cpp.

Références d, framePointArray(), KoChild::KoChildPrivate::m_lock, et KoChild::KoChildPrivate::m_old.

Référencé par KoPartMoveHandler::KoPartMoveHandler(), KoPartResizeHandler::KoPartResizeHandler(), et KoViewChild::slotFrameGeometryChanged().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

void KoChild::unlock (  ) 

Unlocks this child and emits a changed signal.

Définition à la ligne 307 du fichier KoChild.cpp.

Références changed(), d, et KoChild::KoChildPrivate::m_lock.

Référencé par KoViewChild::slotFrameGeometryChanged(), KoPartMoveHandler::~KoPartMoveHandler(), et KoPartResizeHandler::~KoPartResizeHandler().

Voici le graphe d'appel pour cette fonction :

bool KoChild::locked (  )  const

If the child is locked, geometry changes (including scaling, rotation, ...) are not backed up.

As long as this child is locked, the backed up geometry state can be recovered with oldPointArray.

Renvoie:
true when this child is locked.
Voir également:
locked unlock oldPointArray

Définition à la ligne 316 du fichier KoChild.cpp.

Références d, et KoChild::KoChildPrivate::m_lock.

Référencé par KoViewChild::slotDocGeometryChanged().

QPolygon KoChild::oldPointArray ( const QMatrix &  matrix  )  [virtual]

Renvoie:
the backed up geometry transformed by given matrix.

Définition à la ligne 321 du fichier KoChild.cpp.

Références d, et KoChild::KoChildPrivate::m_old.

Référencé par KoView::slotChildChanged().

void KoChild::setTransparent ( bool  transparent  )  [virtual]

Marks this child as either transparent or not.

Paramètres:
transparent set this child to transparent (true) or opaque (false).
Voir également:
isTransparent

Définition à la ligne 331 du fichier KoChild.cpp.

Références d, et KoChild::KoChildPrivate::m_transparent.

bool KoChild::isTransparent (  )  const [virtual]

It might be interesting for view updates and repainting in general whether a child is transparent or not.

Renvoie:
true when this child is marked as transparent.

Définition à la ligne 336 du fichier KoChild.cpp.

Références d, et KoChild::KoChildPrivate::m_transparent.

Référencé par KoDocument::paintChild(), et KoView::partActivateEvent().

Voici le graphe d'appel pour cette fonction :

KoChild::Gadget KoChild::gadgetHitTest ( const QPoint &  p  )  [virtual]

Different actions are taken depending on where a child frame is hit. Two gadgets are known: one for the border (5 pixels) and one for the inner area.

Renvoie:
the gadget identification for the hit area.
Paramètres:
p the hit position.
Voir également:
Gadget

Définition à la ligne 341 du fichier KoChild.cpp.

Références BottomLeft, BottomMid, BottomRight, d, frameRegion(), KoChild::KoChildPrivate::m_geometry, MidLeft, MidRight, Move, NoGadget, pointArray(), TopLeft, TopMid, et TopRight.

Référencé par KoContainerHandler::child().

Voici le graphe d'appel pour cette fonction :

Voici le graphe d'appel pour cette fonction :

void KoChild::changed ( KoChild thisChild  )  [signal]

Emitted every time this child changes, but only if this child is not locked.

Voir également:
locked

Référencé par setGeometry(), KoViewChild::setInitialFrameGeometry(), setRotation(), setRotationPoint(), setScaling(), setShearing(), et unlock().

QPolygon KoChild::pointArray ( const QRect &  r,
const QMatrix &  matrix = QMatrix() 
) const [protected, virtual]

Renvoie:
point array with the 4 corners of given rectangle, which is transformed by given matrix.
Paramètres:
matrix the transformation of r.
r the rectangle for which the point array should be created.

Définition à la ligne 258 du fichier KoChild.cpp.

Références d, et KoChild::KoChildPrivate::m_matrix.

void KoChild::updateMatrix (  )  [protected, virtual]

Stores the current transformation of this child into a matrix.

Voir également:
matrix

Définition à la ligne 277 du fichier KoChild.cpp.

Références d, KoChild::KoChildPrivate::m_geometry, KoChild::KoChildPrivate::m_matrix, KoChild::KoChildPrivate::m_rotation, KoChild::KoChildPrivate::m_rotationPoint, KoChild::KoChildPrivate::m_shearX, et KoChild::KoChildPrivate::m_shearY.

Référencé par KoChild(), KoDocumentChild::setDocument(), setGeometry(), setRotation(), setRotationPoint(), et setShearing().

Voici le graphe d'appel pour cette fonction :


Documentation des données membres

KoChildPrivate* KoChild::d [private]

Réimplémentée dans KoDocumentChild, et KoViewChild.

Définition à la ligne 310 du fichier KoChild.h.

Référencé par contentRect(), framePointArray(), gadgetHitTest(), geometry(), isRectangle(), isTransparent(), KoChild(), lock(), locked(), matrix(), oldPointArray(), pointArray(), rotation(), rotationPoint(), setContentsPos(), setGeometry(), setRotation(), setRotationPoint(), setScaling(), setShearing(), setTransparent(), transform(), unlock(), updateMatrix(), xScaling(), xShearing(), yScaling(), yShearing(), et ~KoChild().


La documentation de cette classe a été générée à partir des fichiers suivants :
Généré le Wed Nov 22 23:44:15 2006 pour KPlato par  doxygen 1.5.1-p1