#include <KoSelection.h>
Graphe d'héritage de KoSelection:
Signaux | |
void | selectionChanged () |
emitted when the selection is changed | |
Fonctions membres publiques | |
KoSelection () | |
virtual | ~KoSelection () |
virtual void | paint (QPainter &painter, const KoViewConverter &converter) |
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 | select (KoShape *object) |
add a selected object | |
virtual void | deselect (KoShape *object) |
remove a selected object | |
virtual void | deselectAll () |
clear the selections list | |
virtual const KoSelectionSet | selectedShapes (KoFlake::SelectionType strip=KoFlake::FullSelection) const |
KoShape * | firstSelectedShape (KoFlake::SelectionType strip=KoFlake::FullSelection) const |
virtual bool | isSelected (const KoShape *object) const |
return true if the shape is selected | |
virtual int | count () const |
return the selection count | |
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. | |
Fonctions membres protégées | |
virtual void | updateTree () |
Connecteurs privés | |
void | selectionChangedEvent () |
Fonctions membres privées | |
void | requestSelectionChangedEvent () |
void | selectGroupChilds (KoShapeGroup *group) |
Attributs privés | |
KoSelectionSet | m_selectedObjects |
bool | m_eventTriggered |
Note that a single shape can be selected in one view, and not in another, and that in a single view, more than one selection can be present. So selections should not be seen as singletons, or as something completely transient.
A selection, however, should not be selectable. We need to think a little about the interaction here.
Définition à la ligne 51 du fichier KoSelection.h.
KoSelection::KoSelection | ( | ) |
KoSelection::~KoSelection | ( | ) | [virtual] |
Définition à la ligne 35 du fichier KoSelection.cpp.
void KoSelection::paint | ( | QPainter & | painter, | |
const KoViewConverter & | converter | |||
) | [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émente KoShape.
Définition à la ligne 39 du fichier KoSelection.cpp.
Référencé par KoShapeManager::paint().
Voici le graphe d'appel pour cette fonction :
void KoSelection::select | ( | KoShape * | object | ) | [virtual] |
add a selected object
Définition à la ligne 67 du fichier KoSelection.cpp.
Références KoShape::isSelectable(), m_selectedObjects, KoShape::parent(), requestSelectionChangedEvent(), KoShape::rotate(), KoShape::rotation(), selectGroupChilds(), KoShape::shear(), KoShape::shearX(), et KoShape::shearY().
Référencé par KoCreateShapeStrategy::createCommand(), KoInteractionStrategy::createStrategy(), KoShapeRubberSelectStrategy::finishInteraction(), MoveTool::mousePressEvent(), TestShapeAt::test(), et TestSelection::testSelectedShapes().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
void KoSelection::deselect | ( | KoShape * | object | ) | [virtual] |
remove a selected object
Définition à la ligne 104 du fichier KoSelection.cpp.
Références firstSelectedShape(), m_selectedObjects, KoShape::parent(), requestSelectionChangedEvent(), KoShape::rotate(), KoShape::rotation(), KoShape::shear(), KoShape::shearX(), et KoShape::shearY().
Référencé par KoTextTool::activate(), KoInteractionStrategy::createStrategy(), et KoShapeManager::remove().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
void KoSelection::deselectAll | ( | ) | [virtual] |
clear the selections list
Définition à la ligne 125 du fichier KoSelection.cpp.
Références m_selectedObjects, et requestSelectionChangedEvent().
Référencé par KoCreateShapeStrategy::createCommand(), KoInteractionStrategy::createStrategy(), et MoveTool::mousePressEvent().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
const KoSelectionSet KoSelection::selectedShapes | ( | KoFlake::SelectionType | strip = KoFlake::FullSelection |
) | const [virtual] |
Return the list of selected shapes
strip | if StrippedSelection, the returned list will not include any children of a container shape if the container-parent is itself also in the set. |
Définition à la ligne 197 du fichier KoSelection.cpp.
Références m_selectedObjects, KoShape::parent(), KoFlake::StrippedSelection, et KoFlake::TopLevelSelection.
Référencé par KoTextTool::activate(), KFormula::FormulaTool::activate(), KoPathTool::activate(), KoInteractionStrategy::createStrategy(), firstSelectedShape(), KoShapeSelector::itemSelected(), KoPathTool::keyPressEvent(), KoShapeMoveStrategy::KoShapeMoveStrategy(), KoShapeResizeStrategy::KoShapeResizeStrategy(), KoShapeRotateStrategy::KoShapeRotateStrategy(), KoShapeShearStrategy::KoShapeShearStrategy(), KoPathTool::mouseMoveEvent(), KoToolManager::movedFocus(), KoPathTool::paint(), SelectionDecorator::paint(), Connector::selectionChanged(), KoPathTool::selectPoints(), TestSelection::testSelectedShapes(), et KoToolManager::toolActivated().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
KoShape * KoSelection::firstSelectedShape | ( | KoFlake::SelectionType | strip = KoFlake::FullSelection |
) | const |
Return the first selected shape, or 0 if there is nothing selected.
strip | if StrippedSelection, the returned list will not include any children of a grouped shape if the group-parent is itself also in the set. |
Définition à la ligne 235 du fichier KoSelection.cpp.
Références selectedShapes().
Référencé par deselect(), KoShapeResizeStrategy::KoShapeResizeStrategy(), SelectionDecorator::paint(), KoInteractionTool::recalcSelectionBox(), et KoInteractionTool::updateCursor().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
bool KoSelection::isSelected | ( | const KoShape * | object | ) | const [virtual] |
return true if the shape is selected
Définition à la ligne 222 du fichier KoSelection.cpp.
Références m_selectedObjects.
Référencé par KoInteractionStrategy::createStrategy(), KoShapeManager::paint(), KoShapeManager::repaint(), et KoShapeManager::shapeAt().
Voici le graphe d'appel pour cette fonction :
int KoSelection::count | ( | ) | const [virtual] |
return the selection count
Définition à la ligne 147 du fichier KoSelection.cpp.
Références m_selectedObjects.
Référencé par boundingRect(), hitTest(), KoShapeResizeStrategy::KoShapeResizeStrategy(), SelectionDecorator::paint(), et TestSelection::testSelectedShapes().
Voici le graphe d'appel pour cette fonction :
bool KoSelection::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 à partir de KoShape.
Définition à la ligne 152 du fichier KoSelection.cpp.
Références boundingRect(), count(), et m_selectedObjects.
Référencé par KoShapeManager::shapeAt().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
QRectF KoSelection::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 à partir de KoShape.
Définition à la ligne 165 du fichier KoSelection.cpp.
Références count(), m_selectedObjects, KoShape::position(), et KoShape::transformationMatrix().
Référencé par KoInteractionStrategy::createStrategy(), KoInteractionTool::handlesSize(), hitTest(), et selectionChangedEvent().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
virtual void KoSelection::updateTree | ( | ) | [inline, protected, virtual] |
Update the position of the shape in the tree of the KoShapeManager.
Réimplémentée à partir de KoShape.
Définition à la ligne 96 du fichier KoSelection.h.
void KoSelection::selectionChanged | ( | ) | [signal] |
void KoSelection::selectionChangedEvent | ( | ) | [private, slot] |
Définition à la ligne 140 du fichier KoSelection.cpp.
Références boundingRect(), m_eventTriggered, KoShape::scale(), et selectionChanged().
Référencé par requestSelectionChangedEvent().
void KoSelection::requestSelectionChangedEvent | ( | ) | [private] |
Définition à la ligne 133 du fichier KoSelection.cpp.
Références m_eventTriggered, et selectionChangedEvent().
Référencé par deselect(), deselectAll(), et select().
Voici le graphe d'appel pour cette fonction :
void KoSelection::selectGroupChilds | ( | KoShapeGroup * | group | ) | [private] |
Définition à la ligne 51 du fichier KoSelection.cpp.
Références KoShapeContainer::iterator(), et m_selectedObjects.
Référencé par select().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
KoSelectionSet KoSelection::m_selectedObjects [private] |
Définition à la ligne 109 du fichier KoSelection.h.
Référencé par boundingRect(), count(), deselect(), deselectAll(), hitTest(), isSelected(), select(), selectedShapes(), et selectGroupChilds().
bool KoSelection::m_eventTriggered [private] |
Définition à la ligne 110 du fichier KoSelection.h.
Référencé par KoSelection(), requestSelectionChangedEvent(), et selectionChangedEvent().