aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@digia.com>2013-08-15 16:18:13 +0200
committerMarco Bubke <marco.bubke@digia.com>2013-08-19 11:32:22 +0200
commit02ca509a47f2f4d7716fdc9355e1bf4afccd3bb8 (patch)
treedcb9fc673eab746b16dbd37e91fc394b6cbf7365 /src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp
parent5094fe203c5169f40064d8b6aee76fe536651478 (diff)
QmlDesigner: Remove unused attention from FormEditor
Change-Id: I9cb2b9f4bffe1c80cfaf6894c934d0eece74dbda Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Diffstat (limited to 'src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp')
-rw-r--r--src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp
index 8bfcd04206..4d7a055120 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp
@@ -92,7 +92,6 @@ void FormEditorItem::updateGeometry()
m_boundingRect = qmlItemNode().instanceBoundingRect().adjusted(0, 0, 1., 1.);
m_paintedBoundingRect = qmlItemNode().instancePaintedBoundingRect().united(m_boundingRect);
setTransform(qmlItemNode().instanceTransformWithContentTransform());
- setTransform(m_attentionTransform, true);
//the property for zValue is called z in QGraphicsObject
if (qmlItemNode().instanceValue("z").isValid())
setZValue(qmlItemNode().instanceValue("z").toDouble());
@@ -104,63 +103,12 @@ void FormEditorItem::updateVisibilty()
// setOpacity(nodeInstance().opacity());
}
-void FormEditorItem::showAttention()
-{
- if (m_attentionTimeLine.isNull()) {
- m_attentionTimeLine = new QTimeLine(500, this);
- m_attentionTimeLine->setCurveShape(QTimeLine::SineCurve);
- connect(m_attentionTimeLine.data(), SIGNAL(valueChanged(qreal)), SLOT(changeAttention(qreal)));
- connect(m_attentionTimeLine.data(), SIGNAL(finished()), m_attentionTimeLine.data(), SLOT(deleteLater()));
-
- m_attentionTimeLine->start();
- }
-}
-
-void FormEditorItem::changeAttention(qreal value)
-{
- if (QGraphicsItem::parentItem() == scene()->formLayerItem()) {
- setAttentionHighlight(value);
- } else {
- setAttentionHighlight(value);
- setAttentionScale(value);
- }
-}
FormEditorView *FormEditorItem::formEditorView() const
{
return scene()->editorView();
}
-void FormEditorItem::setAttentionScale(double sinusScale)
-{
- if (!qFuzzyIsNull(sinusScale)) {
- double scale = std::sqrt(sinusScale);
- m_attentionTransform.reset();
- QPointF centerPoint(qmlItemNode().instanceBoundingRect().center());
- m_attentionTransform.translate(centerPoint.x(), centerPoint.y());
- m_attentionTransform.scale(scale * 0.15 + 1.0, scale * 0.15 + 1.0);
- m_attentionTransform.translate(-centerPoint.x(), -centerPoint.y());
- m_inverseAttentionTransform = m_attentionTransform.inverted();
- prepareGeometryChange();
- setTransform(qmlItemNode().instanceTransformWithContentTransform());
- setTransform(m_attentionTransform, true);
- } else {
- m_attentionTransform.reset();
- prepareGeometryChange();
- setTransform(qmlItemNode().instanceTransform());
- }
-}
-
-void FormEditorItem::setAttentionHighlight(double value)
-{
- if (QGraphicsItem::parentItem() == scene()->formLayerItem())
- m_borderWidth = value * 4;
- else
- m_borderWidth = 1. + value * 3;
-
- update();
-}
-
void FormEditorItem::setHighlightBoundingRect(bool highlight)
{
if (m_highlightBoundingRect != highlight) {