#include <canvasmanipulator.h>
Collaboration diagram for CMManager:

Public Types | |
| enum | EventState { es_right_click = 1 << 0, es_ctrl_pressed = 1 << 1 } |
| enum | CMState { cms_repeated_add = 1 << 0, cms_manual_route = 1 << 1, cms_draw = 1 << 2 } |
| enum | ItemType { it_none = 1 << 0, it_node = 1 << 1, it_connector = 1 << 2, it_pin = 1 << 3, it_canvas_item = 1 << 4, it_mechanics_item = 1 << 5, it_resize_handle = 1 << 6, it_drawpart = 1 << 7 } |
| enum | ItemStateInfo { isi_isMovable = 0x2 } |
Public Slots | |
| void | slotSetManualRoute (bool manualRoute) |
Signals | |
| void | manualRoutingChanged (bool manualRouting) |
Public Member Functions | |
| CMManager (ItemDocument *itemDocument) | |
| ~CMManager () | |
| void | mousePressEvent (EventInfo eventInfo) |
| void | mouseReleaseEvent (const EventInfo &eventInfo) |
| void | mouseDoubleClickEvent (const EventInfo &eventInfo) |
| void | mouseMoveEvent (const EventInfo &eventInfo) |
| void | wheelEvent (const EventInfo &eventInfo) |
| void | setCMState (CMState type, bool state) |
| void | cancelCurrentManipulation () |
| CanvasManipulator * | currentManipulator () const |
| void | setRepeatedAddId (const QString &repeatedId=QString::null) |
| uint | cmState () const |
| void | addManipulatorInfo (ManipulatorInfo *info) |
| QString | repeatedItemId () const |
| void | setDrawAction (int drawAction) |
| int | drawAction () const |
Protected Member Functions | |
| void | updateCurrentResizeHandle (ResizeHandle *mouseOver) |
Protected Attributes | |
| CanvasManipulator * | m_canvasManipulator |
| uint | m_cmState |
| QString | m_repeatedItemId |
| ItemDocument * | p_itemDocument |
| ManipulatorInfoList | m_manipulatorInfoList |
| QGuardedPtr< Item > | p_lastMouseOverItem |
| QGuardedPtr< ResizeHandle > | p_lastMouseOverResizeHandle |
| QGuardedPtr< Item > | p_lastItemClicked |
| QTimer * | m_allowItemScrollTmr |
| bool | b_allowItemScroll |
| int | m_drawAction |
Definition at line 68 of file canvasmanipulator.h.
| void CMManager::mousePressEvent | ( | EventInfo | eventInfo | ) |
Called when the user single-clicks the mouse
Definition at line 86 of file canvasmanipulator.cpp.
References EventInfo::ctrlPressed, Item::isMovable(), EventInfo::isRightClick, EventInfo::itemRtti, m_canvasManipulator, m_cmState, m_manipulatorInfoList, CanvasManipulator::mousePressedInitial(), CanvasManipulator::mousePressedRepeat(), MechanicsItem::mousePressEvent(), CNItem::mousePressEvent(), Item::mousePressEvent(), p_itemDocument, p_lastItemClicked, GuiPart::parent(), and EventInfo::qcanvasItemClickedOn.
| void CMManager::mouseReleaseEvent | ( | const EventInfo & | eventInfo | ) |
Called when the user releases the mouse
Definition at line 251 of file canvasmanipulator.cpp.
References ItemDocument::itemAtTop(), m_canvasManipulator, CanvasManipulator::mouseReleased(), p_itemDocument, p_lastItemClicked, EventInfo::pos, and updateCurrentResizeHandle().
| void CMManager::mouseDoubleClickEvent | ( | const EventInfo & | eventInfo | ) |
Called when the user double clicks the mouse
Definition at line 179 of file canvasmanipulator.cpp.
References CNItem::mouseDoubleClickEvent(), Item::mouseDoubleClickEvent(), GuiPart::parent(), and EventInfo::qcanvasItemClickedOn.
| void CMManager::mouseMoveEvent | ( | const EventInfo & | eventInfo | ) |
Called when the user moves the mouse
Definition at line 194 of file canvasmanipulator.cpp.
References Document::activeView(), ItemDocument::itemAtTop(), m_canvasManipulator, CanvasManipulator::mouseMoved(), p_itemDocument, p_lastItemClicked, p_lastMouseOverItem, GuiPart::parent(), EventInfo::pos, ItemView::scrollToMouse(), and updateCurrentResizeHandle().
| void CMManager::wheelEvent | ( | const EventInfo & | eventInfo | ) |
Called when the user scrolls the mouse
Definition at line 267 of file canvasmanipulator.cpp.
References Document::activeView(), b_allowItemScroll, CVBEditor::contentsWheelEvent(), ItemView::cvbEditor(), ItemDocument::itemAtTop(), m_allowItemScrollTmr, p_itemDocument, GuiPart::parent(), EventInfo::pos, CVBEditor::setPassEventsToView(), EventInfo::wheelEvent(), and Item::wheelEvent().
| void CMManager::setCMState | ( | CMState | type, | |
| bool | state | |||
| ) |
Set a current CMState to true or false
Definition at line 311 of file canvasmanipulator.cpp.
References m_cmState.
Referenced by CMRepeatedItemAdd::mousePressedInitial(), setDrawAction(), slotSetManualRoute(), ItemDocument::slotSetRepeatedItemId(), and ItemDocument::slotUnsetRepeatedItemId().
| void CMManager::cancelCurrentManipulation | ( | ) |
Cancels the current manipulation (if there is one)
Definition at line 79 of file canvasmanipulator.cpp.
References m_canvasManipulator, and setRepeatedAddId().
Referenced by ItemDocument::cancelCurrentOperation(), MechanicsDocument::deleteSelection(), and ICNDocument::deleteSelection().
| void CMManager::updateCurrentResizeHandle | ( | ResizeHandle * | mouseOver | ) | [protected] |
Called when the mouse is moved or released, with the ResizeHandle that the mouse is currently over (which can be null). Updates which handle is selected, etc.
Definition at line 240 of file canvasmanipulator.cpp.
References p_lastMouseOverResizeHandle.
Referenced by mouseMoveEvent(), and mouseReleaseEvent().
1.5.1