Refactoring document handling

The document handling in the qml designer was complicated source
code, which was initially intended for a non creator application.
To integrate new views it has to be changed and cleaned up. This
is the first major step in that direction.

Change-Id: Ie26f0aad7a03946d18bdb4c0759b246c5439d922
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
This commit is contained in:
Marco Bubke
2013-01-23 12:31:22 +01:00
parent a4455f3711
commit 8d9710c074
62 changed files with 2668 additions and 1944 deletions

View File

@@ -34,6 +34,7 @@
#include <nodemetainfo.h>
#include <nodeabstractproperty.h>
#include <QStandardItemModel>
#include <QAbstractItemView>
// silence gcc warnings about unused parameters
@@ -46,8 +47,6 @@ ComponentView::ComponentView(QObject *parent)
{
}
void ComponentView::nodeAboutToBeRemoved(const ModelNode &removedNode)
{
removeSingleNodeFromList(removedNode);
@@ -74,6 +73,11 @@ void ComponentView::setComponentNode(const ModelNode &node)
m_componentAction->setCurrentIndex(indexForNode(node));
}
QWidget *ComponentView::widget()
{
return 0;
}
void ComponentView::appendWholeDocumentAsComponent()
{
QStandardItem *item = new QStandardItem(tr("whole document"));
@@ -110,7 +114,6 @@ void ComponentView::modelAttached(Model *model)
AbstractView::modelAttached(model);
Q_ASSERT(model->masterModel());
appendWholeDocumentAsComponent();
searchForComponentAndAddToList(rootModelNode());