#include <KoPathTool.h>
Graphe d'héritage de KoPathTool:
Fonctions membres publiques | |
KoPathTool (KoCanvasBase *canvas) | |
~KoPathTool () | |
void | paint (QPainter &painter, KoViewConverter &converter) |
void | mousePressEvent (KoPointerEvent *event) |
void | mouseDoubleClickEvent (KoPointerEvent *event) |
void | mouseMoveEvent (KoPointerEvent *event) |
void | mouseReleaseEvent (KoPointerEvent *event) |
void | keyPressEvent (QKeyEvent *event) |
void | keyReleaseEvent (QKeyEvent *event) |
void | activate (bool temporary=false) |
void | deactivate () |
Fonctions membres privées | |
void | selectPoints (const QRectF &rect, bool clearSelection) |
Select points in rect. | |
void | repaint (const QRectF &repaintRect) |
repaints the specified rect | |
QRectF | handleRect (const QPointF &p) |
returns a handle rect at the given position | |
QPointF | snapToGrid (const QPointF &p, Qt::KeyboardModifiers modifiers) |
snaps given point to grid point | |
Attributs privés | |
QPointF | m_lastPoint |
ActiveHandle * | m_activeHandle |
the currently active handle | |
int | m_handleRadius |
KoPathPointSelection | m_pointSelection |
the point selection | |
KoInteractionStrategy * | m_currentStrategy |
the rubber selection strategy | |
Amis | |
class | ActiveNoHandle |
class | ActivePointHandle |
class | KoPathPointSelection |
class | KoPathPointMoveStrategy |
class | KoPathControlPointMoveStrategy |
class | KoPathPointRubberSelectStrategy |
Classes | |
class | ActiveHandle |
class | ActiveParameterHandle |
class | ActivePointHandle |
class | KoPathPointSelection |
Handle the selection of points. Plus de détails... |
Définition à la ligne 36 du fichier KoPathTool.h.
KoPathTool::KoPathTool | ( | KoCanvasBase * | canvas | ) |
Définition à la ligne 38 du fichier KoPathTool.cpp.
KoPathTool::~KoPathTool | ( | ) |
Définition à la ligne 47 du fichier KoPathTool.cpp.
void KoPathTool::paint | ( | QPainter & | painter, | |
KoViewConverter & | converter | |||
) | [virtual] |
Called by the canvas to paint any decorations that the tool deems needed. The painter has the top left of the canvas as its origin.
painter | used for painting the shape | |
converter | to convert between internal and view coordinates. |
Implémente KoTool.
Définition à la ligne 50 du fichier KoPathTool.cpp.
Références KoShape::isLocked(), KoParameterShape::isParametricShape(), m_activeHandle, KoTool::m_canvas, m_currentStrategy, m_pointSelection, KoPathTool::ActiveHandle::paint(), KoPathTool::KoPathPointSelection::paint(), KoInteractionStrategy::paint(), KoParameterShape::paintHandles(), KoPathShape::paintPoints(), KoSelection::selectedShapes(), KoShapeManager::selection(), KoCanvasBase::shapeManager(), KoFlake::TopLevelSelection, et KoShape::transformationMatrix().
Voici le graphe d'appel pour cette fonction :
void KoPathTool::mousePressEvent | ( | KoPointerEvent * | event | ) | [virtual] |
Called when (one of) the mouse or stylus buttons is pressed. Implementors should call event->ignore() if they do not actually use the event.
event | state and reason of this mouse or stylus press |
Implémente KoTool.
Définition à la ligne 106 du fichier KoPathTool.cpp.
Références KoPointerEvent::button(), KoPathTool::KoPathPointSelection::clear(), KoPathPointRubberSelectStrategy, m_activeHandle, KoTool::m_canvas, m_currentStrategy, m_pointSelection, KoPointerEvent::modifiers(), KoPathTool::ActiveHandle::mousePressEvent(), et KoPointerEvent::point.
Voici le graphe d'appel pour cette fonction :
void KoPathTool::mouseDoubleClickEvent | ( | KoPointerEvent * | event | ) | [virtual] |
Called when (one of) the mouse or stylus buttons is double clicked. Implementors should call event->ignore() if they do not actually use the event. Default implementation ignores this event.
event | state and reason of this mouse or stylus press |
Réimplémentée à partir de KoTool.
Définition à la ligne 127 du fichier KoPathTool.cpp.
void KoPathTool::mouseMoveEvent | ( | KoPointerEvent * | event | ) | [virtual] |
Called when the mouse or stylus moved over the canvas. Implementors should call event->ignore() if they do not actually use the event.
event | state and reason of this mouse or stylus move |
Implémente KoTool.
Définition à la ligne 130 du fichier KoPathTool.cpp.
Références ActivePointHandle, KoPointerEvent::button(), KoPathPoint::ControlPoint1, KoPathPoint::controlPoint1(), KoPathPoint::ControlPoint2, KoPathPoint::controlPoint2(), KoPathShape::documentToShape(), KoParameterShape::handleIdAt(), KoInteractionStrategy::handleMouseMove(), handleRect(), KoPathPoint::HasControlPoint1, KoPathPoint::HasControlPoint2, KoShape::isLocked(), KoParameterShape::isParametricShape(), m_activeHandle, KoTool::m_canvas, m_currentStrategy, m_lastPoint, m_pointSelection, KoPointerEvent::modifiers(), KoPathPoint::Node, KoPointerEvent::point, KoPathShape::pointsAt(), KoPathPoint::properties(), KoPathTool::ActiveHandle::repaint(), KoPathTool::KoPathPointSelection::repaint(), KoSelection::selectedShapes(), KoShapeManager::selection(), KoCanvasBase::shapeManager(), KoFlake::TopLevelSelection, Py::type(), et KoTool::useCursor().
Voici le graphe d'appel pour cette fonction :
void KoPathTool::mouseReleaseEvent | ( | KoPointerEvent * | event | ) | [virtual] |
Called when (one of) the mouse or stylus buttons is released. Implementors should call event->ignore() if they do not actually use the event.
event | state and reason of this mouse or stylus release |
Implémente KoTool.
Définition à la ligne 205 du fichier KoPathTool.cpp.
Références KoCanvasBase::addCommand(), KoInteractionStrategy::createCommand(), KoInteractionStrategy::finishInteraction(), KoTool::m_canvas, m_currentStrategy, et KoPointerEvent::modifiers().
Voici le graphe d'appel pour cette fonction :
void KoPathTool::keyPressEvent | ( | QKeyEvent * | event | ) | [virtual] |
Called when a key is pressed. Implementors should call event->ignore() if they do not actually use the event. Default implementation ignores this event.
event | state and reason of this key press |
Réimplémentée à partir de KoTool.
Définition à la ligne 217 du fichier KoPathTool.cpp.
Références KoCanvasBase::addCommand(), KoInteractionStrategy::cancelInteraction(), KoPathTool::KoPathPointSelection::clear(), KoPathTool::KoPathPointSelection::contains(), KoInteractionStrategy::handleMouseMove(), m_activeHandle, KoPathTool::ActivePointHandle::m_activePoint, KoTool::m_canvas, m_currentStrategy, m_handleRadius, m_lastPoint, m_pointSelection, KoPathShape::nextPoint(), KoPathTool::KoPathPointSelection::objectCount(), repaint(), KoPathTool::KoPathPointSelection::repaint(), KoPathTool::KoPathPointSelection::selectedPointMap(), KoPathTool::KoPathPointSelection::selectedPoints(), KoSelection::selectedShapes(), KoShapeManager::selection(), KoCanvasBase::shapeManager(), KoPathTool::KoPathPointSelection::size(), et KoFlake::TopLevelSelection.
Voici le graphe d'appel pour cette fonction :
void KoPathTool::keyReleaseEvent | ( | QKeyEvent * | event | ) | [virtual] |
Called when a key is released Implementors should call event->ignore() if they do not actually use the event. Default implementation ignores this event.
event | state and reason of this key release |
Réimplémentée à partir de KoTool.
Définition à la ligne 383 du fichier KoPathTool.cpp.
Références KoInteractionStrategy::handleMouseMove(), m_currentStrategy, et m_lastPoint.
Voici le graphe d'appel pour cette fonction :
void KoPathTool::activate | ( | bool | temporary = false |
) | [virtual] |
This method is called when this tool instance is activated. For any main window there is only one tool active at a time, which then gets all user input. Switching between tools will call deactivate on one and activate on the new tool allowing the tool to flush items (like a selection) when it is not in use.
There is one case where two tools are activated at the same. This is the case where one tool delegates work to another temporarily. For example, while shift is being held down. The second tool will get activated with temporary=true and it should emit sigDone() when the state that activated it is ended.
One of the important tasks of activate is to call useCursor()
temporary | if true, this tool is only temporarily actived and should emit sigDone when it is done. |
Réimplémentée à partir de KoTool.
Définition à la ligne 401 du fichier KoPathTool.cpp.
Références KoTool::m_canvas, repaint(), KoSelection::selectedShapes(), KoShapeManager::selection(), KoCanvasBase::shapeManager(), KoTool::sigDone(), et KoTool::useCursor().
Voici le graphe d'appel pour cette fonction :
void KoPathTool::deactivate | ( | ) | [virtual] |
This method is called whenever this tool is no longer the active tool
Réimplémentée à partir de KoTool.
Définition à la ligne 421 du fichier KoPathTool.cpp.
Références KoPathTool::KoPathPointSelection::clear(), m_activeHandle, m_currentStrategy, et m_pointSelection.
Voici le graphe d'appel pour cette fonction :
void KoPathTool::selectPoints | ( | const QRectF & | rect, | |
bool | clearSelection | |||
) | [private] |
Select points in rect.
rect | in document coordinated | |
clearSelection | if set clear the current selection before the selection |
Définition à la ligne 430 du fichier KoPathTool.cpp.
Références KoPathTool::KoPathPointSelection::add(), KoPathTool::KoPathPointSelection::clear(), KoPathShape::documentToShape(), KoShape::isLocked(), KoTool::m_canvas, m_pointSelection, KoPathShape::pointsAt(), KoSelection::selectedShapes(), KoShapeManager::selection(), KoCanvasBase::shapeManager(), et KoFlake::TopLevelSelection.
Référencé par KoPathPointRubberSelectStrategy::finishInteraction().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
void KoPathTool::repaint | ( | const QRectF & | repaintRect | ) | [private] |
repaints the specified rect
Définition à la ligne 458 du fichier KoPathTool.cpp.
Références KoTool::m_canvas, m_handleRadius, et KoCanvasBase::updateCanvas().
Référencé par activate(), KoPathTool::KoPathPointSelection::add(), keyPressEvent(), KoPathTool::KoPathPointSelection::remove(), KoPathTool::KoPathPointSelection::repaint(), KoPathTool::ActiveParameterHandle::repaint(), et KoPathTool::ActivePointHandle::repaint().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
QRectF KoPathTool::handleRect | ( | const QPointF & | p | ) | [private] |
returns a handle rect at the given position
Définition à la ligne 463 du fichier KoPathTool.cpp.
Références m_handleRadius.
Référencé par mouseMoveEvent(), KoPathTool::KoPathPointSelection::paint(), KoPathTool::ActiveParameterHandle::paint(), et KoPathTool::ActivePointHandle::paint().
Voici le graphe d'appel pour cette fonction :
QPointF KoPathTool::snapToGrid | ( | const QPointF & | p, | |
Qt::KeyboardModifiers | modifiers | |||
) | [private] |
snaps given point to grid point
Définition à la ligne 467 du fichier KoPathTool.cpp.
Références KoCanvasBase::gridSize(), KoTool::m_canvas, et KoCanvasBase::snapToGrid().
Référencé par KoPathPointMoveStrategy::handleMouseMove(), et KoPathControlPointMoveStrategy::handleMouseMove().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
friend class ActiveNoHandle [friend] |
Définition à la ligne 209 du fichier KoPathTool.h.
friend class ActivePointHandle [friend] |
friend class KoPathPointSelection [friend] |
Définition à la ligne 211 du fichier KoPathTool.h.
friend class KoPathPointMoveStrategy [friend] |
Définition à la ligne 212 du fichier KoPathTool.h.
Référencé par KoPathTool::ActivePointHandle::mousePressEvent().
friend class KoPathControlPointMoveStrategy [friend] |
Définition à la ligne 213 du fichier KoPathTool.h.
Référencé par KoPathTool::ActivePointHandle::mousePressEvent().
friend class KoPathPointRubberSelectStrategy [friend] |
QPointF KoPathTool::m_lastPoint [private] |
Définition à la ligne 68 du fichier KoPathTool.h.
Référencé par keyPressEvent(), keyReleaseEvent(), et mouseMoveEvent().
ActiveHandle* KoPathTool::m_activeHandle [private] |
the currently active handle
Définition à la ligne 204 du fichier KoPathTool.h.
Référencé par deactivate(), keyPressEvent(), mouseMoveEvent(), mousePressEvent(), et paint().
int KoPathTool::m_handleRadius [private] |
the radius of the control point handles
Définition à la ligne 205 du fichier KoPathTool.h.
Référencé par handleRect(), keyPressEvent(), et repaint().
the point selection
Définition à la ligne 207 du fichier KoPathTool.h.
Référencé par KoPathPointMoveStrategy::createCommand(), deactivate(), KoPathPointMoveStrategy::handleMouseMove(), keyPressEvent(), mouseMoveEvent(), KoPathTool::ActiveParameterHandle::mousePressEvent(), KoPathTool::ActivePointHandle::mousePressEvent(), mousePressEvent(), KoPathTool::ActivePointHandle::paint(), paint(), et selectPoints().
the rubber selection strategy
Définition à la ligne 216 du fichier KoPathTool.h.
Référencé par deactivate(), keyPressEvent(), keyReleaseEvent(), mouseMoveEvent(), KoPathTool::ActiveParameterHandle::mousePressEvent(), KoPathTool::ActivePointHandle::mousePressEvent(), mousePressEvent(), mouseReleaseEvent(), et paint().