#include <KoChild.h>
Graphe d'héritage de KoChild:
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 | |
KoChildPrivate * | d |
Classes | |
class | KoChildPrivate |
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).
Définition à la ligne 43 du fichier KoChild.h.
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.
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] |
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 |
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] |
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] |
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 |
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] |
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] |
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] |
Définition à la ligne 175 du fichier KoChild.cpp.
Références d, et KoChild::KoChildPrivate::m_shearX.
double KoChild::yShearing | ( | ) | const [virtual] |
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] |
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] |
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 |
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.
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] |
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] |
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] |
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] |
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,...).
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.
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] |
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.
transparent | set this child to transparent (true) or opaque (false). |
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.
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.
p | the hit position. |
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.
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] |
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.
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 :
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().