~bzoltan/kubuntu-packaging/decouple_cmake_plugin

« back to all changes in this revision

Viewing changes to src/plugins/qmldesigner/components/formeditor/resizetool.cpp

  • Committer: Timo Jyrinki
  • Date: 2013-11-15 12:25:23 UTC
  • mfrom: (1.1.28)
  • Revision ID: timo.jyrinki@canonical.com-20131115122523-i2kyamsu4gs2mu1m
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
    : AbstractFormEditorTool(editorView),
46
46
    m_selectionIndicator(editorView->scene()->manipulatorLayerItem()),
47
47
    m_resizeIndicator(editorView->scene()->manipulatorLayerItem()),
 
48
    m_anchorIndicator(editorView->scene()->manipulatorLayerItem()),
48
49
    m_resizeManipulator(editorView->scene()->manipulatorLayerItem(), editorView)
49
50
{
50
51
}
66
67
            m_resizeManipulator.setHandle(resizeHandle);
67
68
            m_resizeManipulator.begin(event->scenePos());
68
69
            m_resizeIndicator.hide();
 
70
            m_anchorIndicator.hide();
69
71
        }
70
72
    }
71
73
 
116
118
 
117
119
        m_selectionIndicator.show();
118
120
        m_resizeIndicator.show();
 
121
        m_anchorIndicator.show();
119
122
        m_resizeManipulator.end(generateUseSnapping(event->modifiers()));
120
123
    }
121
124
 
176
179
{
177
180
    m_selectionIndicator.setItems(items());
178
181
    m_resizeIndicator.setItems(items());
 
182
    m_anchorIndicator.setItems(items());
179
183
}
180
184
 
181
185
void ResizeTool::clear()
182
186
{
183
187
    m_selectionIndicator.clear();
184
188
    m_resizeIndicator.clear();
 
189
    m_anchorIndicator.clear();
185
190
    m_resizeManipulator.clear();
186
191
}
187
192
 
188
193
void ResizeTool::formEditorItemsChanged(const QList<FormEditorItem*> &itemList)
189
194
{
190
 
    m_selectionIndicator.updateItems(itemList);
191
 
    m_resizeIndicator.updateItems(itemList);
 
195
    const QList<FormEditorItem*> selectedItemList = filterSelectedModelNodes(itemList);
 
196
 
 
197
    m_selectionIndicator.updateItems(selectedItemList);
 
198
    m_resizeIndicator.updateItems(selectedItemList);
 
199
    m_anchorIndicator.updateItems(selectedItemList);
192
200
}
193
201
 
194
202
void ResizeTool::instancesCompleted(const QList<FormEditorItem*> &/*itemList*/)