QmlDesigner: Add BindingIndicator

Change-Id: I46a763f87e19114e223b9eb897cbb89cf1f4c3d5
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Marco Bubke
2013-09-03 18:00:10 +02:00
parent dd742afd71
commit 32ddd2b308
9 changed files with 402 additions and 3 deletions

View File

@@ -47,7 +47,8 @@ MoveTool::MoveTool(FormEditorView *editorView)
m_moveManipulator(editorView->scene()->manipulatorLayerItem(), editorView),
m_selectionIndicator(editorView->scene()->manipulatorLayerItem()),
m_resizeIndicator(editorView->scene()->manipulatorLayerItem()),
m_anchorIndicator(editorView->scene()->manipulatorLayerItem())
m_anchorIndicator(editorView->scene()->manipulatorLayerItem()),
m_bindingIndicator(editorView->scene()->manipulatorLayerItem())
{
m_selectionIndicator.setCursor(Qt::SizeAllCursor);
}
@@ -65,6 +66,7 @@ void MoveTool::clear()
m_selectionIndicator.clear();
m_resizeIndicator.clear();
m_anchorIndicator.clear();
m_bindingIndicator.clear();
AbstractFormEditorTool::clear();
}
@@ -96,6 +98,7 @@ void MoveTool::mouseMoveEvent(const QList<QGraphicsItem*> &itemList,
// m_selectionIndicator.hide();
m_resizeIndicator.hide();
m_anchorIndicator.hide();
m_bindingIndicator.hide();
FormEditorItem *containerItem = containerFormEditorItem(itemList, m_movingItems);
if (containerItem && view()->currentState().isBaseState()) {
@@ -154,6 +157,7 @@ void MoveTool::keyPressEvent(QKeyEvent *event)
// m_selectionIndicator.hide();
m_resizeIndicator.hide();
m_anchorIndicator.hide();
m_bindingIndicator.hide();
m_moveManipulator.beginRewriterTransaction();
}
@@ -187,6 +191,7 @@ void MoveTool::keyReleaseEvent(QKeyEvent *keyEvent)
// m_selectionIndicator.show();
m_resizeIndicator.show();
m_anchorIndicator.show();
m_bindingIndicator.show();
}
}
@@ -212,6 +217,7 @@ void MoveTool::mouseReleaseEvent(const QList<QGraphicsItem*> &itemList,
m_selectionIndicator.show();
m_resizeIndicator.show();
m_anchorIndicator.show();
m_bindingIndicator.show();
m_movingItems.clear();
}
@@ -234,6 +240,7 @@ void MoveTool::selectedItemsChanged(const QList<FormEditorItem*> &itemList)
m_selectionIndicator.setItems(movingItems(itemList));
m_resizeIndicator.setItems(itemList);
m_anchorIndicator.setItems(itemList);
m_bindingIndicator.setItems(itemList);
updateMoveManipulator();
}
@@ -383,6 +390,7 @@ void MoveTool::formEditorItemsChanged(const QList<FormEditorItem*> &itemList)
m_selectionIndicator.updateItems(itemList);
m_resizeIndicator.updateItems(itemList);
m_anchorIndicator.updateItems(itemList);
m_bindingIndicator.updateItems(itemList);
}
}