lib
KoChild Class Reference
#include <KoChild.h>
Inheritance diagram for KoChild:

Detailed Description
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 QWMatrix.
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).
- See also:
- KoDocumentChild KoViewChild
Definition at line 41 of file KoChild.h.
Public Types | |
enum | Gadget { NoGadget, TopLeft, TopMid, TopRight, MidLeft, MidRight, BottomLeft, BottomMid, BottomRight, Move } |
Signals | |
void | changed (KoChild *thisChild) |
Public Member Functions | |
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 QWMatrix &=QWMatrix()) const |
virtual QPointArray | pointArray (const QWMatrix &matrix=QWMatrix()) 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 QWMatrix &matrix=QWMatrix(), bool solid=false) const |
virtual QPointArray | framePointArray (const QWMatrix &matrix=QWMatrix()) const |
virtual QWMatrix | matrix () const |
void | lock () |
void | unlock () |
bool | locked () const |
virtual QPointArray | oldPointArray (const QWMatrix &matrix) |
virtual void | setTransparent (bool transparent) |
virtual bool | isTransparent () const |
virtual Gadget | gadgetHitTest (const QPoint &p) |
Protected Member Functions | |
virtual QPointArray | pointArray (const QRect &r, const QWMatrix &matrix=QWMatrix()) const |
virtual void | updateMatrix () |
Member Enumeration Documentation
|
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.
|
Member Function Documentation
|
Definition at line 112 of file KoChild.cpp. |
|
Emitted every time this child changes, but only if this child is not locked.
|
|
Definition at line 233 of file KoChild.cpp. |
|
Definition at line 239 of file KoChild.cpp. |
|
Definition at line 244 of file KoChild.cpp. |
|
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.
Definition at line 339 of file KoChild.cpp. |
|
Definition at line 92 of file KoChild.cpp. |
|
Definition at line 117 of file KoChild.cpp. |
|
It might be interesting for view updates and repainting in general whether a child is transparent or not.
Definition at line 334 of file KoChild.cpp. |
|
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,...).
Definition at line 296 of file KoChild.cpp. |
|
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.
Definition at line 314 of file KoChild.cpp. |
|
Definition at line 291 of file KoChild.cpp. |
|
Definition at line 319 of file KoChild.cpp. |
|
Definition at line 256 of file KoChild.cpp. |
|
Definition at line 102 of file KoChild.cpp. |
|
Definition at line 97 of file KoChild.cpp. |
|
Definition at line 195 of file KoChild.cpp. |
|
Definition at line 212 of file KoChild.cpp. |
|
Sets the clip region of the painter, so that only pixels of the child part can be drawn.
Definition at line 122 of file KoChild.cpp. |
|
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. Definition at line 227 of file KoChild.cpp. |
|
Sets a new geometry for this child document. Use noEmit = true if you do not want the 'changed'-signal to be emitted Definition at line 72 of file KoChild.cpp. |
|
Sets the angle of rotation.
Definition at line 183 of file KoChild.cpp. |
|
Sets the center of the rotation to the point
Definition at line 200 of file KoChild.cpp. |
|
Scales the content of the child part. However, that does not affect the size of the child part. Definition at line 131 of file KoChild.cpp. |
|
Shears the content of the child part.
Definition at line 159 of file KoChild.cpp. |
|
Marks this child as either transparent or not.
Definition at line 329 of file KoChild.cpp. |
|
Transforms the painter (its worldmatrix and the clipping) in such a way that the painter can be passed to the child part for drawing.
Definition at line 217 of file KoChild.cpp. |
|
Unlocks this child and emits a changed signal.
Definition at line 305 of file KoChild.cpp. |
|
Stores the current transformation of this child into a matrix.
Definition at line 275 of file KoChild.cpp. |
|
Definition at line 149 of file KoChild.cpp. |
|
Definition at line 173 of file KoChild.cpp. |
|
Definition at line 154 of file KoChild.cpp. |
|
Definition at line 178 of file KoChild.cpp. |
The documentation for this class was generated from the following files: