#include <KoShape.h>
Graphe d'héritage de KoShape:
Fonctions membres publiques | |
KoShape () | |
Constructor. | |
virtual | ~KoShape () |
Destructor. | |
virtual void | paint (QPainter &painter, const KoViewConverter &converter)=0 |
Paint the shape The class extending this one is responsible for painting itself. Since we do not assume the shape is square the paint must also clear its background if it will draw something transparent on top. This can be done with a method like: painter.fillRect(converter.normalToView(QRectF(QPointF(0.0,0.0), size())), background()); Or equavalent for non-square objects. | |
virtual void | paintDecorations (QPainter &painter, const KoViewConverter &converter, bool selected) |
void | scale (double sx, double sy) |
Scale the shape using the zero-point which is the top-left corner. | |
double | scaleX () const |
double | scaleY () const |
void | rotate (double angle) |
Rotate the shape. | |
double | rotation () const |
void | shear (double sx, double sy) |
Shear the shape The shape will be sheared using the zero-point which is the top-left corner. | |
double | shearX () const |
double | shearY () const |
virtual void | resize (const QSizeF &size) |
Resize the shape. | |
virtual QSizeF | size () const |
Get the size of the shape in pt. | |
virtual void | setPosition (const QPointF &position) |
Set the position of the shape in pt. | |
virtual QPointF | position () const |
Get the position of the shape in pt. | |
virtual bool | hitTest (const QPointF &position) const |
Check if the shape is hit on position. | |
virtual QRectF | boundingRect () const |
Get the bounding box of the shape. | |
void | addConnectionPoint (const QPointF &point) |
Add a connector point to the shape A connector is a place on the shape that allows a graphical connection to be made using a line, for example. | |
QList< QPointF > | connectors () const |
void | setBackground (const QBrush &brush) |
const QBrush & | background () |
virtual bool | hasTransparency () |
int | zIndex () const |
void | setZIndex (int zIndex) |
void | setVisible (bool on) |
bool | isVisible () const |
void | setSelectable (bool selectable) |
bool | isSelectable () const |
void | setLocked (bool locked) |
bool | isLocked () const |
KoShapeContainer * | parent () const |
void | setParent (KoShapeContainer *parent) |
virtual void | repaint () const |
void | repaint (const QRectF &shape) const |
void | repaint (double x, double y, double width, double height) const |
void | recalcMatrix () |
virtual const QPainterPath | outline () const |
KoShapeBorderModel * | border () |
void | setBorder (KoShapeBorderModel *border) |
void | setKeepAspectRatio (bool keepAspect) |
bool | keepAspectRatio () const |
QPointF | absolutePosition () const |
void | setAbsolutePosition (QPointF newPosition) |
void | moveBy (double distanceX, double distanceY) |
void | setUserData (KoShapeUserData *userData) |
KoShapeUserData * | userData () const |
const QString & | shapeId () const |
void | setShapeId (const QString &id) |
QMatrix | transformationMatrix (const KoViewConverter *converter) const |
virtual void | copySettings (const KoShape *shape) |
Fonctions membres publiques statiques | |
static bool | compareShapeZIndex (KoShape *g1, KoShape *g2) |
static void | applyConversion (QPainter &painter, const KoViewConverter &converter) |
Types protégés | |
enum | ChangeType { PositionChanged, RotationChanged, ScaleChanged, ShearChanged, SizeChanged, ParentChanged } |
Used by shapeChanged() to select which change was made. Plus de détails... | |
Fonctions membres protégées | |
virtual void | updateTree () |
virtual void | shapeChanged (ChangeType type) |
Attributs protégés | |
QMatrix | m_invMatrix |
The inverted matrix; for convenience. | |
QBrush | m_backgroundBrush |
Stands for the background color / fill etc. | |
KoShapeBorderModel * | m_border |
points to a border, or 0 if there is no border | |
Fonctions membres privées | |
void | addShapeManager (KoShapeManager *manager) |
void | removeShapeManager (KoShapeManager *manager) |
Attributs privés | |
double | m_scaleX |
double | m_scaleY |
double | m_angle |
double | m_shearX |
double | m_shearY |
QSizeF | m_size |
QPointF | m_pos |
QString | m_shapeId |
QMatrix | m_matrix |
QVector< QPointF > | m_connectors |
int | m_zIndex |
KoShapeContainer * | m_parent |
bool | m_visible |
bool | m_locked |
bool | m_keepAspect |
bool | m_selectable |
QSet< KoShapeManager * > | m_shapeManagers |
KoShapeUserData * | m_userData |
Amis | |
class | KoShapeManager |
Due to the limited responsibility of this class, the extending object can have any data backend and is responsible for painting itself.
We strongly suggest that any extending class will use a Model View Controller (MVC) design where the View part is all in this class, as well as the one that inharits from this one. This allows the data that rests in the model to be reused in different parts of the document. For example by having two flake objects that show it. Or each showing a section of it.
The KoShape data is completely in postscript-points (pt) (see KoUnit for conversion methods to and from pt).
Flake objects can be created in three ways:
Définition à la ligne 71 du fichier KoShape.h.
enum KoShape::ChangeType [protected] |
Used by shapeChanged() to select which change was made.
PositionChanged | used after a setPosition() |
RotationChanged | used after a rotate() |
ScaleChanged | used after a scale() |
ShearChanged | used after a shear() |
SizeChanged | used after a resize() |
ParentChanged | used after a setParent() |
KoShape::KoShape | ( | ) |
Constructor.
Définition à la ligne 37 du fichier KoShape.cpp.
Références recalcMatrix().
Voici le graphe d'appel pour cette fonction :
KoShape::~KoShape | ( | ) | [virtual] |
virtual void KoShape::paint | ( | QPainter & | painter, | |
const KoViewConverter & | converter | |||
) | [pure virtual] |
Paint the shape The class extending this one is responsible for painting itself. Since we do not assume the shape is square the paint must also clear its background if it will draw something transparent on top. This can be done with a method like: painter.fillRect(converter.normalToView(QRectF(QPointF(0.0,0.0), size())), background());
Or equavalent for non-square objects.
painter | used for painting the shape | |
converter | to convert between internal and view coordinates. |
Implémenté dans KoPathShape, KoSelection, KoShapeContainer, MockShape, IconShape, et KoTextShape.
Référencé par KoShapeManager::paint(), et KoShapeContainer::paint().
Voici le graphe d'appel pour cette fonction :
void KoShape::paintDecorations | ( | QPainter & | painter, | |
const KoViewConverter & | converter, | |||
bool | selected | |||
) | [virtual] |
Paint non-print decorations specific for this type of shape. The default implementation is empty.
painter | used for painting the shape | |
selected | true if the shape is currently selected | |
converter | to convert between internal and view coordinates. |
Réimplémentée dans KFormula::FormulaShape.
Définition à la ligne 63 du fichier KoShape.cpp.
Références KoViewConverter::documentToView(), et m_connectors.
Référencé par KoShapeManager::paint().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
void KoShape::scale | ( | double | sx, | |
double | sy | |||
) |
Scale the shape using the zero-point which is the top-left corner.
sx | scale in x direction | |
sy | scale in y direction |
Définition à la ligne 80 du fichier KoShape.cpp.
Références m_scaleX, m_scaleY, recalcMatrix(), ScaleChanged, et shapeChanged().
Référencé par KoSelection::selectionChangedEvent().
Voici le graphe d'appel pour cette fonction :
double KoShape::scaleX | ( | ) | const [inline] |
Return the current scaling adjustment over the X axis.
Définition à la ligne 121 du fichier KoShape.h.
Référencé par copySettings().
Voici le graphe d'appel pour cette fonction :
double KoShape::scaleY | ( | ) | const [inline] |
Return the current scaling adjustment over the Y axis.
Définition à la ligne 126 du fichier KoShape.h.
Référencé par copySettings().
Voici le graphe d'appel pour cette fonction :
void KoShape::rotate | ( | double | angle | ) |
Rotate the shape.
The shape will be rotated using the center of the shape using the size()
angle | set the rotation angle of the shape in degrees |
Définition à la ligne 90 du fichier KoShape.cpp.
Références m_angle, recalcMatrix(), RotationChanged, et shapeChanged().
Référencé par KoSelection::deselect(), KoShapeRotateStrategy::handleMouseMove(), TestPosition::initTestCase(), KoSelection::select(), TestPosition::testSetAbsolutePosition(), et transformationMatrix().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
double KoShape::rotation | ( | ) | const [inline] |
Return the current rotation in degrees.
Définition à la ligne 140 du fichier KoShape.h.
Référencé par copySettings(), KoShapeRotateStrategy::createCommand(), KoSelection::deselect(), KoShapeResizeStrategy::handleMouseMove(), KoShapeResizeStrategy::KoShapeResizeStrategy(), KoShapeRotateStrategy::KoShapeRotateStrategy(), KoShapeShearStrategy::KoShapeShearStrategy(), KoInteractionTool::recalcSelectionBox(), KoSelection::select(), et KoInteractionTool::updateCursor().
Voici le graphe d'appel pour cette fonction :
void KoShape::shear | ( | double | sx, | |
double | sy | |||
) |
Shear the shape The shape will be sheared using the zero-point which is the top-left corner.
sx | shear in x direction | |
sy | shear in y direction |
Définition à la ligne 101 du fichier KoShape.cpp.
Références m_shearX, m_shearY, recalcMatrix(), shapeChanged(), et ShearChanged.
Référencé par KoSelection::deselect(), KoShapeShearStrategy::handleMouseMove(), KoShapeResizeStrategy::handleMouseMove(), et KoSelection::select().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
double KoShape::shearX | ( | ) | const [inline] |
Return the current horizontal shearing angle for this shape.
Définition à la ligne 156 du fichier KoShape.h.
Référencé par copySettings(), KoShapeShearStrategy::createCommand(), KoSelection::deselect(), et KoSelection::select().
Voici le graphe d'appel pour cette fonction :
double KoShape::shearY | ( | ) | const [inline] |
Return the current vertical shearing angle for this shape.
Définition à la ligne 162 du fichier KoShape.h.
Référencé par copySettings(), KoShapeShearStrategy::createCommand(), KoSelection::deselect(), et KoSelection::select().
Voici le graphe d'appel pour cette fonction :
void KoShape::resize | ( | const QSizeF & | size | ) | [virtual] |
Resize the shape.
size | the new size of the shape. This is different from scaling as scaling is a so called secondairy operation which is comparable to zooming in instead of changing the size of the basic shape. Easiest example of this difference is that using this method will not distort the size of pattern-fills and borders. |
Réimplémentée dans KoParameterShape, KoPathShape, et KFormula::FormulaShape.
Définition à la ligne 111 du fichier KoShape.cpp.
Références m_connectors, m_size, recalcMatrix(), shapeChanged(), size(), et SizeChanged.
Référencé par KoShapeGeometry::cancel(), KoShapeGroup::childCountChanged(), KoCreateShapeStrategy::createCommand(), KoGroupShapesCommand::execute(), KoShapeSizeCommand::execute(), KoShapeResizeStrategy::handleMouseMove(), IconShape::IconShape(), TestPosition::initTestCase(), KoPathShape::resize(), TestShapeAt::test(), KoShapeSizeCommand::unexecute(), et KoShapeGeometry::updateShape().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
virtual QSizeF KoShape::size | ( | ) | const [inline, virtual] |
Get the size of the shape in pt.
Réimplémentée dans KoPathShape, et KFormula::FormulaShape.
Définition à la ligne 180 du fichier KoShape.h.
Référencé par absolutePosition(), KoShapeSelector::add(), boundingRect(), copySettings(), KoShapeResizeStrategy::createCommand(), hitTest(), KoShapeShearStrategy::KoShapeShearStrategy(), KoShapeGeometry::open(), outline(), KoTextShape::paint(), KoShapeContainer::paint(), SelectionDecorator::paint(), repaint(), resize(), setAbsolutePosition(), et transformationMatrix().
Voici le graphe d'appel pour cette fonction :
void KoShape::setPosition | ( | const QPointF & | position | ) | [virtual] |
Set the position of the shape in pt.
position | the new position of the shape |
Définition à la ligne 132 du fichier KoShape.cpp.
Références m_pos, PositionChanged, recalcMatrix(), et shapeChanged().
Référencé par KoShapeSelector::add(), KoShapeGroup::childCountChanged(), KoCreateShapeStrategy::createCommand(), KoGroupShapesCommand::execute(), KoShapeShearStrategy::handleMouseMove(), KoShapeMoveStrategy::handleMouseMove(), TestPosition::initTestCase(), setAbsolutePosition(), TestShapeAt::test(), et TestPosition::testSetAbsolutePosition().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
virtual QPointF KoShape::position | ( | ) | const [inline, virtual] |
Get the position of the shape in pt.
Réimplémentée dans KoPathShape.
Définition à la ligne 194 du fichier KoShape.h.
Référencé par KoShapeSelector::add(), KoSelection::boundingRect(), copySettings(), KoShapeShearStrategy::createCommand(), KoShapeRotateStrategy::createCommand(), KoShapeResizeStrategy::createCommand(), KoGroupShapesCommand::execute(), KoShapeMoveStrategy::KoShapeMoveStrategy(), KoShapeContainer::paint(), KoPathShape::position(), KoTextTool::repaint(), setAbsolutePosition(), TestPosition::testBasePosition(), TestPosition::testSetAbsolutePosition(), et transformationMatrix().
Voici le graphe d'appel pour cette fonction :
bool KoShape::hitTest | ( | const QPointF & | position | ) | const [virtual] |
Check if the shape is hit on position.
position | the position where the user clicked. |
Réimplémentée dans KoSelection, et KoShapeGroup.
Définition à la ligne 141 du fichier KoShape.cpp.
Références KoShapeBorderModel::borderInsets(), KoInsets::bottom, KoShapeContainer::childClipped(), hitTest(), KoInsets::left, m_border, m_invMatrix, m_parent, KoInsets::right, size(), et KoInsets::top.
Référencé par hitTest().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
QRectF KoShape::boundingRect | ( | ) | const [virtual] |
Get the bounding box of the shape.
This includes the line width but not the shadow of the shape
Réimplémentée dans KoPathShape, KoSelection, et KFormula::FormulaShape.
Définition à la ligne 156 du fichier KoShape.cpp.
Références m_matrix, et size().
Référencé par KoShapeGroup::childCountChanged(), KoCreateShapeStrategy::createCommand(), KoCanvasController::ensureVisible(), KoGroupShapesCommand::execute(), KoShapeDistributeCommand::getAvailableSpace(), KoShapeDistributeCommand::KoShapeDistributeCommand(), KoTextTool::mousePressEvent(), KoTextTool::paint(), KoShapeManager::paint(), et KoShapeManager::updateTree().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
void KoShape::addConnectionPoint | ( | const QPointF & | point | ) | [inline] |
Add a connector point to the shape A connector is a place on the shape that allows a graphical connection to be made using a line, for example.
point | the position where to place the connector. The points coordinate system are based around the zero-pos which is the top-left of the shape The point does not have to be inside the boundings rectangle. The point is in pt, just like the rest of the KoShape class uses. |
Définition à la ligne 222 du fichier KoShape.h.
Référencé par copySettings().
Voici le graphe d'appel pour cette fonction :
QList<QPointF> KoShape::connectors | ( | ) | const [inline] |
Return a list of the connectors that have been added to this shape. Note that altering the list or the points in there will not have any effect on the shape.
Définition à la ligne 230 du fichier KoShape.h.
Référencé par copySettings().
Voici le graphe d'appel pour cette fonction :
void KoShape::setBackground | ( | const QBrush & | brush | ) | [inline] |
Set the background of the shape. A QBrush can have a plain color, be fully transparent or have a complex fill. setting such a brush will allow the shape to fill itself using that brush and will be able to tell if its transparent or not.
brush | the brush for the background. |
Définition à la ligne 239 du fichier KoShape.h.
Référencé par KoShapeBackgroundCommand::execute(), et KoShapeBackgroundCommand::unexecute().
Voici le graphe d'appel pour cette fonction :
const QBrush& KoShape::background | ( | ) | [inline] |
return the brush used to paint te background of this shape with. A QBrush can have a plain color, be fully transparent or have a complex fill. setting such a brush will allow the shape to fill itself using that brush and will be able to tell if its transparent or not.
Définition à la ligne 248 du fichier KoShape.h.
Référencé par KoShapeBackgroundCommand::execute(), KoTextTool::paint(), KoTextShape::paint(), et KoPathShape::paint().
Voici le graphe d'appel pour cette fonction :
bool KoShape::hasTransparency | ( | ) | [virtual] |
Returns true if there is some transparency, false if the shape is fully opaque. The default implementation will just return if the background has some transparency, you should override it and always return true if your shape is not square.
Définition à la ligne 346 du fichier KoShape.cpp.
Références m_backgroundBrush.
Référencé par KoTextTool::paint().
Voici le graphe d'appel pour cette fonction :
int KoShape::zIndex | ( | ) | const |
Retrieve the z-coordinate of this shape. The zIndex property is used to determine which shape lies on top of other objects. An shape with a higher z-order is on top, and can obscure another shape.
Définition à la ligne 219 du fichier KoShape.cpp.
Références m_zIndex, et parent().
Référencé par compareShapeZIndex(), copySettings(), et KoCreateShapeStrategy::createCommand().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
void KoShape::setZIndex | ( | int | zIndex | ) | [inline] |
Set the z-coordinate of this shape. The zIndex property is used to determine which shape lies on top of other objects. An shape with a higher z-order is on top, and can obscure, another shape.
Just like two objects having the same x or y coordinate will make them 'touch', so will two objects with the same z-index touch on the z plane. In layering the shape this, however, can cause a little confusion as one always has to be on top. The layering if two overlapping objects have the same index is implementation dependent and probably depends on the order in which they are added to the shape manager.
zIndex | the new z-index; |
Définition à la ligne 278 du fichier KoShape.h.
Référencé par KoCreateShapeStrategy::createCommand(), et TestShapeAt::test().
Voici le graphe d'appel pour cette fonction :
void KoShape::setVisible | ( | bool | on | ) | [inline] |
Changes the Shape to be visible or invisible. Being visible means being painted and printed, as well as being used for things like guidelines or searches.
on | when true; set the shape to be visible. |
Définition à la ligne 286 du fichier KoShape.h.
Référencé par TestShapeAt::test().
bool KoShape::isVisible | ( | ) | const [inline] |
Returns current visibility state of this shape. Being visible means being painted and printed, as well as being used for things like guidelines or searches.
Définition à la ligne 293 du fichier KoShape.h.
Référencé par copySettings(), KoInteractionStrategy::createStrategy(), KoShapeManager::paint(), KoShapeContainer::paint(), et repaint().
Voici le graphe d'appel pour cette fonction :
void KoShape::setSelectable | ( | bool | selectable | ) | [inline] |
bool KoShape::isSelectable | ( | ) | const [inline] |
Returns wheather this shape can be selected by the user.
Définition à la ligne 305 du fichier KoShape.h.
Référencé par KoSelection::select().
Voici le graphe d'appel pour cette fonction :
void KoShape::setLocked | ( | bool | locked | ) | [inline] |
Changes the Shape to be locked in place. Being locked means the shape can no longer change shape or position.
locked | when true; set the shape to be locked. |
Définition à la ligne 312 du fichier KoShape.h.
Référencé par KoShapeGeometry::save().
Voici le graphe d'appel pour cette fonction :
bool KoShape::isLocked | ( | ) | const [inline] |
Returns current locked state of this shape. Being locked means the shape can no longer change shape or position.
Définition à la ligne 318 du fichier KoShape.h.
Référencé par copySettings(), KoInteractionStrategy::createStrategy(), KoInteractionTool::keyPressEvent(), KoShapeMoveStrategy::KoShapeMoveStrategy(), KoShapeRotateStrategy::KoShapeRotateStrategy(), KoShapeShearStrategy::KoShapeShearStrategy(), KoPathTool::mouseMoveEvent(), KoShapeGeometry::open(), KoPathTool::paint(), SelectionDecorator::paint(), KoPathTool::selectPoints(), et KoInteractionTool::updateCursor().
Voici le graphe d'appel pour cette fonction :
KoShapeContainer* KoShape::parent | ( | ) | const [inline] |
Returns the parent, or 0 if there is no parent.
Définition à la ligne 324 du fichier KoShape.h.
Référencé par KoShapeContainer::addChild(), KoSelection::deselect(), KoGroupShapesCommand::KoGroupShapesCommand(), KoUngroupShapesCommand::KoUngroupShapesCommand(), KoShapeManager::paint(), KoSelection::select(), KoSelection::selectedShapes(), setAbsolutePosition(), setParent(), transformationMatrix(), KoPointRemoveCommand::unexecute(), et zIndex().
Voici le graphe d'appel pour cette fonction :
void KoShape::setParent | ( | KoShapeContainer * | parent | ) |
Set the parent of this shape.
parent | the new parent of this shape. Can be 0 if the shape has no parent anymore. |
Définition à la ligne 210 du fichier KoShape.cpp.
Références m_parent, parent(), ParentChanged, recalcMatrix(), et shapeChanged().
Référencé par KoShapeContainer::addChild(), et KoShapeContainer::removeChild().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
void KoShape::repaint | ( | ) | const [virtual] |
Request a repaint to be queued. The repaint will be of the entire Shape, including its selection handles should this shape be selected.
This method will return immediately and only request a repaint. Successive calls will be merged into an appropriate repaint action.
Réimplémentée dans KoShapeContainer.
Définition à la ligne 225 du fichier KoShape.cpp.
Références KoShapeBorderModel::borderInsets(), KoInsets::bottom, KoInsets::left, m_border, m_matrix, m_shapeManagers, KoShapeManager::repaint(), KoInsets::right, size(), et KoInsets::top.
Référencé par KoTextTool::activate(), KoPathShape::breakAt(), KoPathSeparateCommand::execute(), KoParameterChangeCommand::execute(), KoSubpathBreakCommand::execute(), KoPointJoinCommand::execute(), KoControlPointMoveCommand::execute(), KoShapeBackgroundCommand::execute(), KoShapeSizeCommand::execute(), KoShapeShearStrategy::handleMouseMove(), KoShapeRotateStrategy::handleMouseMove(), KoShapeResizeStrategy::handleMouseMove(), KoShapeMoveStrategy::handleMouseMove(), KoParameterShape::moveHandle(), KoShapeContainer::repaint(), repaint(), KoPathBaseCommand::repaint(), KoShapeContainer::ChildrenData::setClipping(), KoPathSeparateCommand::unexecute(), KoParameterChangeCommand::unexecute(), KoSubpathBreakCommand::unexecute(), KoPointJoinCommand::unexecute(), KoPointRemoveCommand::unexecute(), KoShapeBackgroundCommand::unexecute(), KoShapeSizeCommand::unexecute(), et KoShapeGeometry::updateShape().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
void KoShape::repaint | ( | const QRectF & | shape | ) | const |
Request a repaint to be queued. The repaint will be restricted to the parameters rectangle, which is expected to be in points (the internal coordinates system of KoShape) and it is expected to be normalized.
This method will return immediately and only request a repaint. Successive calls will be merged into an appropriate repaint action.
shape | the rectangle (in pt) to queue for repaint. |
Définition à la ligne 242 du fichier KoShape.cpp.
Références isVisible(), m_matrix, m_shapeManagers, et KoShapeManager::repaint().
Voici le graphe d'appel pour cette fonction :
void KoShape::repaint | ( | double | x, | |
double | y, | |||
double | width, | |||
double | height | |||
) | const |
Request a repaint to be queued. The repaint will be restricted to the parameters rectangle, which is expected to be in points (the internal coordinates system of KoShape).
This method will return immediately and only request a repaint. Successive calls will be merged into an appropriate repaint action.
x | the x coordinate measured from the topleft position of this shape | |
y | the y coordinate measured from the topleft position of this shape | |
width | the width of the repaint rectangle | |
height | the height of the repaint rectangle |
Définition à la ligne 253 du fichier KoShape.cpp.
Références repaint().
Voici le graphe d'appel pour cette fonction :
This is a method used to sort a list using the STL sorting methods.
g1 | the first shape | |
g2 | the second shape |
Définition à la ligne 206 du fichier KoShape.cpp.
Références zIndex().
Référencé par KoShapeManager::paint(), KoShapeContainer::paint(), et KoShapeManager::shapeAt().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
void KoShape::recalcMatrix | ( | ) |
Called internally whenever a property is changed that requires the matrix to be recalculated.
Définition à la ligne 162 du fichier KoShape.cpp.
Références m_invMatrix, m_matrix, transformationMatrix(), et updateTree().
Référencé par KoShape(), resize(), rotate(), scale(), KoShapeContainer::ChildrenData::setClipping(), setParent(), setPosition(), KoShapeContainer::shapeChanged(), et shear().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
const QPainterPath KoShape::outline | ( | ) | const [virtual] |
returns the outline of the shape in the form of a path. The outline returned will always have the position() of the shape as the origin, so moving the shape will not alter the result. The outline is used to draw the border on, for example.
Réimplémentée dans KoPathShape.
Définition à la ligne 258 du fichier KoShape.cpp.
Références size().
Référencé par KoLineBorder::paintBorder().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
KoShapeBorderModel* KoShape::border | ( | ) | [inline] |
Returns the currently set border, or 0 if there is no border.
Définition à la ligne 390 du fichier KoShape.h.
Référencé par KoShapeManager::paint(), et KoPathShape::separate().
Voici le graphe d'appel pour cette fonction :
void KoShape::setBorder | ( | KoShapeBorderModel * | border | ) | [inline] |
Set a new border, removing the old one.
border | the new border, or 0 if there should be no border. |
Définition à la ligne 396 du fichier KoShape.h.
Référencé par KoPathShapeFactory::createDefaultShape(), KoPathCombineCommand::execute(), et KoPathShape::separate().
Voici le graphe d'appel pour cette fonction :
void KoShape::setKeepAspectRatio | ( | bool | keepAspect | ) | [inline] |
bool KoShape::keepAspectRatio | ( | ) | const [inline] |
Setting the shape to keep its aspect-ratio has the effect that user-scaling will keep the width/hight ratio intact so as not to distort shapes that rely on that ratio.
Définition à la ligne 412 du fichier KoShape.h.
Référencé par copySettings(), et KoShapeResizeStrategy::handleMouseMove().
Voici le graphe d'appel pour cette fonction :
QPointF KoShape::absolutePosition | ( | ) | const |
Return the position of this shape regardless of rotation/skew/scaling and regardless of this shape having a parent (being in a group) or not.
The returned value is the center of the shape.
Définition à la ligne 264 du fichier KoShape.cpp.
Références KoPageFormat::height(), m_matrix, size(), et KoPageFormat::width().
Référencé par KoGroupShapesCommand::execute(), moveBy(), KoShapeGeometry::open(), TestPosition::testAbsolutePosition(), TestPosition::testSetAbsolutePosition(), et KoGroupShapesCommand::unexecute().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
void KoShape::setAbsolutePosition | ( | QPointF | newPosition | ) |
Move this shape to an absolute position where the end location will be the same regardless of the shape's rotation/skew/scaling and regardless of this shape having a parent (being in a group) or not.
The newPosition is going to be the center of the shape. This has the convenient effect that:
shape->setAbsolutePosition(QPointF(0,0)); shape->rotate(45);Will result in the same visual position of the shape as the opposite:
shape->rotate(45); shape->setAbsolutePosition(QPointF(0,0));
newPosition | the new absolute center of the shape. |
Définition à la ligne 268 du fichier KoShape.cpp.
Références KoShapeContainer::childClipped(), KoPageFormat::height(), m_angle, m_parent, m_scaleX, m_scaleY, m_shearX, m_shearY, parent(), position(), setPosition(), size(), transformationMatrix(), et KoPageFormat::width().
Référencé par KoShapeGeometry::cancel(), KoShapeRotateStrategy::handleMouseMove(), KoShapeResizeStrategy::handleMouseMove(), moveBy(), TestPosition::testSetAbsolutePosition(), et KoShapeGeometry::updateShape().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
void KoShape::moveBy | ( | double | distanceX, | |
double | distanceY | |||
) |
Move this shape from its current (absolute) position over a specified distance. This takes the position of the shape, and moves it in the normal plain. This takes into account the rotation of the object so distanceX really will be the resulting horizontal distance.
distanceX | the horizontal distance to move | |
distanceY | the vertical distance to move |
Définition à la ligne 323 du fichier KoShape.cpp.
Références absolutePosition(), et setAbsolutePosition().
Référencé par KoPathShape::normalize().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
void KoShape::setUserData | ( | KoShapeUserData * | userData | ) |
Set a data object on the shape to be used by an application. This is specifically useful when a shape is created in a plugin and that data from that shape should be accessible outside the plugin.
userData | the new user data, or 0 to delete the current one. |
Définition à la ligne 336 du fichier KoShape.cpp.
Références m_userData, et userData().
Référencé par KoTextShape::KoTextShape().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
KoShapeUserData * KoShape::userData | ( | ) | const |
Return the current userData.
Définition à la ligne 342 du fichier KoShape.cpp.
Références m_userData.
Référencé par KoTextTool::activate(), KoTextShapeFactory::createShape(), KoTextTool::mousePressEvent(), et setUserData().
Voici le graphe d'appel pour cette fonction :
const QString& KoShape::shapeId | ( | ) | const [inline] |
Return the Id of this shape, indentifying the type of shape by the id of the factory.
Définition à la ligne 464 du fichier KoShape.h.
Référencé par KoToolManager::selectionChanged(), KoPathShape::separate(), et KoToolManager::toolActivated().
Voici le graphe d'appel pour cette fonction :
void KoShape::setShapeId | ( | const QString & | id | ) | [inline] |
Set the Id of this shape. A shapeFactory is expected to set the Id at creation so applications can find out what kind of shape this is.
id | the ID from the factory that created this shape |
Définition à la ligne 471 du fichier KoShape.h.
Référencé par KoPathShapeFactory::createDefaultShape(), KoPathCombineCommand::execute(), KoTextShape::KoTextShape(), et KoPathShape::separate().
Voici le graphe d'appel pour cette fonction :
QMatrix KoShape::transformationMatrix | ( | const KoViewConverter * | converter | ) | const |
Create a matrix that describes all the transformations done on this shape.
converter | if not null, this method uses the converter to mark the right offsets in the current view. |
Définition à la ligne 169 du fichier KoShape.cpp.
Références KoShapeContainer::childClipped(), KoViewConverter::documentToView(), m_angle, m_parent, m_scaleX, m_scaleY, m_shearX, m_shearY, parent(), position(), rotate(), size(), et transformationMatrix().
Référencé par KoSelection::boundingRect(), KoPathShape::boundingRect(), KoPathShape::combine(), KoPathShape::documentToShape(), KoShapeShearStrategy::KoShapeShearStrategy(), KoTextTool::paint(), KoShapeManager::paint(), KoShapeContainer::paint(), KoPathTool::ActiveParameterHandle::paint(), KoPathTool::ActivePointHandle::paint(), KoPathTool::paint(), SelectionDecorator::paint(), recalcMatrix(), KoInteractionTool::recalcSelectionBox(), KoPathShape::separate(), setAbsolutePosition(), KoPathShape::shapeToDocument(), et transformationMatrix().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
void KoShape::copySettings | ( | const KoShape * | shape | ) | [virtual] |
Copy all the settings from the parameter shape and apply them to this shape. Settings like the position and rotation to visible and locked. The parent is a notable exclusion.
shape | the shape to use as original |
Définition à la ligne 306 du fichier KoShape.cpp.
Références addConnectionPoint(), connectors(), isLocked(), isVisible(), keepAspectRatio(), m_angle, m_connectors, m_keepAspect, m_locked, m_pos, m_scaleX, m_scaleY, m_shearX, m_shearY, m_size, m_visible, m_zIndex, position(), rotation(), scaleX(), scaleY(), shearX(), shearY(), size(), et zIndex().
Voici le graphe d'appel pour cette fonction :
void KoShape::applyConversion | ( | QPainter & | painter, | |
const KoViewConverter & | converter | |||
) | [static] |
Convenience method that allows people implementing paint() to use the shape internal coordinate system directly to paint itself instead of considering the views zoom.
painter | the painter to alter the zoom level of. | |
converter | the converter for the current views zoom. |
Définition à la ligne 353 du fichier KoShape.cpp.
Références KoViewConverter::zoom().
Référencé par KoTextShape::paint(), KFormula::FormulaShape::paint(), KoShapeContainer::paint(), KoPathTool::KoPathPointSelection::paint(), KoPathTool::ActivePointHandle::paint(), KoPathShape::paint(), KoLineBorder::paintBorder(), KoParameterShape::paintHandle(), KoParameterShape::paintHandles(), et KoPathShape::paintPoints().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
void KoShape::updateTree | ( | ) | [protected, virtual] |
Update the position of the shape in the tree of the KoShapeManager.
Réimplémentée dans KoSelection.
Définition à la ligne 328 du fichier KoShape.cpp.
Références m_shapeManagers, et KoShapeManager::updateTree().
Référencé par recalcMatrix(), et KoPathShape::update().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
virtual void KoShape::shapeChanged | ( | ChangeType | type | ) | [inline, protected, virtual] |
A hook that allows inheriting classes to do something after a KoShape property changed This is called whenever the shape, position rotation or scale properties were altered.
type | an indicator which type was changed. |
Réimplémentée dans KoShapeContainer, et KoTextShape.
Définition à la ligne 522 du fichier KoShape.h.
Référencé par resize(), rotate(), scale(), setParent(), setPosition(), et shear().
Voici le graphe d'appel pour cette fonction :
void KoShape::addShapeManager | ( | KoShapeManager * | manager | ) | [inline, private] |
Définition à la ligne 549 du fichier KoShape.h.
Référencé par KoShapeManager::add().
Voici le graphe d'appel pour cette fonction :
void KoShape::removeShapeManager | ( | KoShapeManager * | manager | ) | [inline, private] |
Définition à la ligne 550 du fichier KoShape.h.
Référencé par KoShapeManager::remove(), KoShapeManager::setShapes(), et KoShapeManager::~KoShapeManager().
Voici le graphe d'appel pour cette fonction :
friend class KoShapeManager [friend] |
QMatrix KoShape::m_invMatrix [protected] |
The inverted matrix; for convenience.
Définition à la ligne 498 du fichier KoShape.h.
Référencé par KFormula::FormulaShape::boundingRect(), KoTextShape::convertScreenPos(), hitTest(), KoShapeContainer::paint(), et recalcMatrix().
QBrush KoShape::m_backgroundBrush [protected] |
Stands for the background color / fill etc.
Définition à la ligne 499 du fichier KoShape.h.
Référencé par hasTransparency().
KoShapeBorderModel* KoShape::m_border [protected] |
points to a border, or 0 if there is no border
Définition à la ligne 500 du fichier KoShape.h.
Référencé par KoPathShape::boundingRect(), hitTest(), et repaint().
double KoShape::m_scaleX [private] |
Définition à la ligne 525 du fichier KoShape.h.
Référencé par copySettings(), scale(), setAbsolutePosition(), et transformationMatrix().
double KoShape::m_scaleY [private] |
Définition à la ligne 526 du fichier KoShape.h.
Référencé par copySettings(), scale(), setAbsolutePosition(), et transformationMatrix().
double KoShape::m_angle [private] |
Définition à la ligne 527 du fichier KoShape.h.
Référencé par copySettings(), rotate(), setAbsolutePosition(), et transformationMatrix().
double KoShape::m_shearX [private] |
Définition à la ligne 528 du fichier KoShape.h.
Référencé par copySettings(), setAbsolutePosition(), shear(), et transformationMatrix().
double KoShape::m_shearY [private] |
Définition à la ligne 529 du fichier KoShape.h.
Référencé par copySettings(), setAbsolutePosition(), shear(), et transformationMatrix().
QSizeF KoShape::m_size [private] |
QPointF KoShape::m_pos [private] |
QString KoShape::m_shapeId [private] |
QMatrix KoShape::m_matrix [private] |
Définition à la ligne 535 du fichier KoShape.h.
Référencé par absolutePosition(), boundingRect(), recalcMatrix(), et repaint().
QVector<QPointF> KoShape::m_connectors [private] |
Définition à la ligne 537 du fichier KoShape.h.
Référencé par copySettings(), paintDecorations(), et resize().
int KoShape::m_zIndex [private] |
KoShapeContainer* KoShape::m_parent [private] |
Définition à la ligne 540 du fichier KoShape.h.
Référencé par hitTest(), setAbsolutePosition(), setParent(), et transformationMatrix().
bool KoShape::m_visible [private] |
bool KoShape::m_locked [private] |
bool KoShape::m_keepAspect [private] |
bool KoShape::m_selectable [private] |
QSet<KoShapeManager *> KoShape::m_shapeManagers [private] |
KoShapeUserData* KoShape::m_userData [private] |
Définition à la ligne 551 du fichier KoShape.h.
Référencé par setUserData(), userData(), et ~KoShape().