summaryrefslogtreecommitdiff
path: root/src/plugins/qmldesigner/designmodewidget.cpp
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@nokia.com>2011-05-24 18:47:33 +0200
committerMarco Bubke <marco.bubke@nokia.com>2011-05-24 18:50:25 +0200
commitf950b8d7c7812c7a5916676fbd5f9c2edf61118f (patch)
tree7ee8a5e83120edddcff43e28bf3d0d48016ddd2d /src/plugins/qmldesigner/designmodewidget.cpp
parente3842f9973b632e9f0ca29b464946f47c85bf82a (diff)
downloadqt-creator-f950b8d7c7812c7a5916676fbd5f9c2edf61118f.tar.gz
QmlDesigner: reactivating subcomponent editing
This includes refactoring the DesignDocumentController. In the ComponentTextMoifier I use replaced because it is not blocked by beginEditBlock() of the text cursor. I use the same pattern now for ComponentView like for all the other views. The view is created and controlled by DesignModeWidget because we have only a single instance. Change-Id: I7809b96f52f4d275f0231f3961c3c4bc2618ce89 Reviewed-on: http://codereview.qt.nokia.com/96 Reviewed-by: Marco Bubke <marco.bubke@nokia.com>
Diffstat (limited to 'src/plugins/qmldesigner/designmodewidget.cpp')
-rw-r--r--src/plugins/qmldesigner/designmodewidget.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/qmldesigner/designmodewidget.cpp b/src/plugins/qmldesigner/designmodewidget.cpp
index 572ca373e1..cf4b90221e 100644
--- a/src/plugins/qmldesigner/designmodewidget.cpp
+++ b/src/plugins/qmldesigner/designmodewidget.cpp
@@ -40,7 +40,8 @@
#include <formeditorwidget.h>
#include <stateseditorwidget.h>
#include <itemlibrarywidget.h>
-
+#include <componentaction.h>
+#include <toolbox.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/modemanager.h>
@@ -312,6 +313,7 @@ void DesignModeWidget::showEditor(Core::IEditor *editor)
newDocument->setStatesEditorView(m_statesEditorView.data());
newDocument->setItemLibraryView(m_itemLibraryView.data());
newDocument->setFormEditorView(m_formEditorView.data());
+ newDocument->setComponentView(m_componentView.data());
newDocument->setFileName(fileName);
@@ -674,6 +676,8 @@ void DesignModeWidget::setup()
m_formEditorView = new FormEditorView(this);
+ m_componentView = new ComponentView(this);
+ m_formEditorView->widget()->toolBox()->addLeftSideAction(m_componentView->action());
m_fakeToolBar = Core::EditorManager::createToolBar(this);
m_mainSplitter = new MiniSplitter(this);