forked from qt-creator/qt-creator
QmlDesigner: Add ImportManagerView
It does nothing but this time I don't want push a big source ball. Change-Id: I3ab547bc2780391508333673dc9715fd0be61c67 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
VPATH += $$PWD
|
||||||
|
|
||||||
|
HEADERS += importmanagerview.h
|
||||||
|
|
||||||
|
SOURCES += importmanagerview.cpp
|
||||||
|
|
||||||
|
|
@@ -0,0 +1,199 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
** Contact: http://www.qt-project.org/legal
|
||||||
|
**
|
||||||
|
** This file is part of Qt Creator.
|
||||||
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and Digia. For licensing terms and
|
||||||
|
** conditions see http://qt.digia.com/licensing. For further information
|
||||||
|
** use the contact form at http://qt.digia.com/contact-us.
|
||||||
|
**
|
||||||
|
** GNU Lesser General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||||
|
** General Public License version 2.1 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||||
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||||
|
**
|
||||||
|
** In addition, as a special exception, Digia gives you certain additional
|
||||||
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||||
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include "importmanagerview.h"
|
||||||
|
|
||||||
|
namespace QmlDesigner {
|
||||||
|
|
||||||
|
ImportManagerView::ImportManagerView(QObject *parent) :
|
||||||
|
AbstractView(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::modelAttached(Model *model)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::modelAboutToBeDetached(Model *model)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::nodeCreated(const ModelNode &createdNode)
|
||||||
|
{
|
||||||
|
// handle case that the import is used
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::nodeAboutToBeRemoved(const ModelNode &removedNode)
|
||||||
|
{
|
||||||
|
// handle case that the import is unused
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::nodeRemoved(const ModelNode &/*removedNode*/, const NodeAbstractProperty &/*parentProperty*/, AbstractView::PropertyChangeFlags /*propertyChange*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::nodeAboutToBeReparented(const ModelNode &/*node*/, const NodeAbstractProperty &/*newPropertyParent*/, const NodeAbstractProperty &/*oldPropertyParent*/, AbstractView::PropertyChangeFlags /*propertyChange*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::nodeReparented(const ModelNode &/*node*/, const NodeAbstractProperty &/*newPropertyParent*/, const NodeAbstractProperty &/*oldPropertyParent*/, AbstractView::PropertyChangeFlags /*propertyChange*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::nodeIdChanged(const ModelNode &/*node*/, const QString &/*newId*/, const QString &/*oldId*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::propertiesAboutToBeRemoved(const QList<AbstractProperty> &/*propertyList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::propertiesRemoved(const QList<AbstractProperty> &/*propertyList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::variantPropertiesChanged(const QList<VariantProperty> &/*propertyList*/, AbstractView::PropertyChangeFlags /*propertyChange*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::bindingPropertiesChanged(const QList<BindingProperty> &/*propertyList*/, AbstractView::PropertyChangeFlags /*propertyChange*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::signalHandlerPropertiesChanged(const QVector<SignalHandlerProperty> &/*propertyList*/, AbstractView::PropertyChangeFlags /*propertyChange*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::rootNodeTypeChanged(const QString &/*type*/, int /*majorVersion*/, int /*minorVersion*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::instancePropertyChange(const QList<QPair<ModelNode, PropertyName> > &/*propertyList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::instancesCompleted(const QVector<ModelNode> &/*completedNodeList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::instanceInformationsChange(const QMultiHash<ModelNode, InformationName> &/*informationChangeHash*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::instancesRenderImageChanged(const QVector<ModelNode> &/*nodeList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::instancesPreviewImageChanged(const QVector<ModelNode> &/*nodeList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::instancesChildrenChanged(const QVector<ModelNode> &/*nodeList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::instancesToken(const QString &/*tokenName*/, int /*tokenNumber*/, const QVector<ModelNode> &/*nodeVector*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::nodeSourceChanged(const ModelNode &/*modelNode*/, const QString &/*newNodeSource*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::rewriterBeginTransaction()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::rewriterEndTransaction()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::currentStateChanged(const ModelNode &/*node*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::selectedNodesChanged(const QList<ModelNode> &/*selectedNodeList*/, const QList<ModelNode> &/*lastSelectedNodeList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::fileUrlChanged(const QUrl &/*oldUrl*/, const QUrl &/*newUrl*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::nodeOrderChanged(const NodeListProperty &/*listProperty*/, const ModelNode &/*movedNode*/, int /*oldIndex*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::importsChanged(const QList<Import> &/*addedImports*/, const QList<Import> &/*removedImports*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::auxiliaryDataChanged(const ModelNode &/*node*/, const PropertyName &/*name*/, const QVariant &/*data*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::customNotification(const AbstractView */*view*/, const QString &/*identifier*/, const QList<ModelNode> &/*nodeList*/, const QList<QVariant> &/*data*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ImportManagerView::scriptFunctionsChanged(const ModelNode &/*node*/, const QStringList &/*scriptFunctionList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace QmlDesigner
|
@@ -0,0 +1,92 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
** Contact: http://www.qt-project.org/legal
|
||||||
|
**
|
||||||
|
** This file is part of Qt Creator.
|
||||||
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and Digia. For licensing terms and
|
||||||
|
** conditions see http://qt.digia.com/licensing. For further information
|
||||||
|
** use the contact form at http://qt.digia.com/contact-us.
|
||||||
|
**
|
||||||
|
** GNU Lesser General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||||
|
** General Public License version 2.1 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||||
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||||
|
**
|
||||||
|
** In addition, as a special exception, Digia gives you certain additional
|
||||||
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
||||||
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef QMLDESIGNER_IMPORTMANAGERVIEW_H
|
||||||
|
#define QMLDESIGNER_IMPORTMANAGERVIEW_H
|
||||||
|
|
||||||
|
#include <abstractview.h>
|
||||||
|
|
||||||
|
namespace QmlDesigner {
|
||||||
|
|
||||||
|
class ImportManagerView : public AbstractView
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit ImportManagerView(QObject *parent = 0);
|
||||||
|
|
||||||
|
void modelAttached(Model *model);
|
||||||
|
void modelAboutToBeDetached(Model *model);
|
||||||
|
|
||||||
|
void nodeCreated(const ModelNode &createdNode);
|
||||||
|
void nodeAboutToBeRemoved(const ModelNode &removedNode);
|
||||||
|
void nodeRemoved(const ModelNode &removedNode, const NodeAbstractProperty &parentProperty, PropertyChangeFlags propertyChange);
|
||||||
|
void nodeAboutToBeReparented(const ModelNode &node, const NodeAbstractProperty &newPropertyParent, const NodeAbstractProperty &oldPropertyParent, AbstractView::PropertyChangeFlags propertyChange);
|
||||||
|
void nodeReparented(const ModelNode &node, const NodeAbstractProperty &newPropertyParent, const NodeAbstractProperty &oldPropertyParent, AbstractView::PropertyChangeFlags propertyChange);
|
||||||
|
void nodeIdChanged(const ModelNode& node, const QString& newId, const QString& oldId);
|
||||||
|
void propertiesAboutToBeRemoved(const QList<AbstractProperty>& propertyList);
|
||||||
|
void propertiesRemoved(const QList<AbstractProperty>& propertyList);
|
||||||
|
void variantPropertiesChanged(const QList<VariantProperty>& propertyList, PropertyChangeFlags propertyChange);
|
||||||
|
void bindingPropertiesChanged(const QList<BindingProperty>& propertyList, PropertyChangeFlags propertyChange);
|
||||||
|
void signalHandlerPropertiesChanged(const QVector<SignalHandlerProperty>& propertyList, PropertyChangeFlags propertyChange);
|
||||||
|
void rootNodeTypeChanged(const QString &type, int majorVersion, int minorVersion);
|
||||||
|
|
||||||
|
void instancePropertyChange(const QList<QPair<ModelNode, PropertyName> > &propertyList);
|
||||||
|
void instancesCompleted(const QVector<ModelNode> &completedNodeList);
|
||||||
|
void instanceInformationsChange(const QMultiHash<ModelNode, InformationName> &informationChangeHash);
|
||||||
|
void instancesRenderImageChanged(const QVector<ModelNode> &nodeList);
|
||||||
|
void instancesPreviewImageChanged(const QVector<ModelNode> &nodeList);
|
||||||
|
void instancesChildrenChanged(const QVector<ModelNode> &nodeList);
|
||||||
|
void instancesToken(const QString &tokenName, int tokenNumber, const QVector<ModelNode> &nodeVector);
|
||||||
|
|
||||||
|
void nodeSourceChanged(const ModelNode &modelNode, const QString &newNodeSource);
|
||||||
|
|
||||||
|
void rewriterBeginTransaction();
|
||||||
|
void rewriterEndTransaction();
|
||||||
|
|
||||||
|
void currentStateChanged(const ModelNode &node); // base state is a invalid model node
|
||||||
|
|
||||||
|
void selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
|
||||||
|
const QList<ModelNode> &lastSelectedNodeList);
|
||||||
|
|
||||||
|
void fileUrlChanged(const QUrl &oldUrl, const QUrl &newUrl);
|
||||||
|
|
||||||
|
void nodeOrderChanged(const NodeListProperty &listProperty, const ModelNode &movedNode, int oldIndex);
|
||||||
|
|
||||||
|
void importsChanged(const QList<Import> &addedImports, const QList<Import> &removedImports);
|
||||||
|
|
||||||
|
void auxiliaryDataChanged(const ModelNode &node, const PropertyName &name, const QVariant &data);
|
||||||
|
|
||||||
|
void customNotification(const AbstractView *view, const QString &identifier, const QList<ModelNode> &nodeList, const QList<QVariant> &data);
|
||||||
|
|
||||||
|
void scriptFunctionsChanged(const ModelNode &node, const QStringList &scriptFunctionList);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace QmlDesigner
|
||||||
|
|
||||||
|
#endif // QMLDESIGNER_IMPORTMANAGERVIEW_H
|
@@ -41,6 +41,7 @@
|
|||||||
#include <propertyeditorview.h>
|
#include <propertyeditorview.h>
|
||||||
#include <componentview.h>
|
#include <componentview.h>
|
||||||
#include <debugview.h>
|
#include <debugview.h>
|
||||||
|
#include <importmanagerview.h>
|
||||||
#include <QWidgetAction>
|
#include <QWidgetAction>
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
@@ -109,6 +110,7 @@ private: // variables
|
|||||||
Internal::DebugView m_debugView;
|
Internal::DebugView m_debugView;
|
||||||
ComponentView m_componentView;
|
ComponentView m_componentView;
|
||||||
FormEditorView m_formEditorView;
|
FormEditorView m_formEditorView;
|
||||||
|
ImportManagerView m_importManagerView;
|
||||||
ItemLibraryView m_itemLibraryView;
|
ItemLibraryView m_itemLibraryView;
|
||||||
NavigatorView m_navigatorView;
|
NavigatorView m_navigatorView;
|
||||||
PropertyEditorView m_propertyEditorView;
|
PropertyEditorView m_propertyEditorView;
|
||||||
|
@@ -102,10 +102,13 @@ void ViewManager::detachViewsExceptRewriterAndComponetView()
|
|||||||
currentModel()->detachView(&m_formEditorView);
|
currentModel()->detachView(&m_formEditorView);
|
||||||
currentModel()->detachView(&m_navigatorView);
|
currentModel()->detachView(&m_navigatorView);
|
||||||
currentModel()->detachView(&m_itemLibraryView);
|
currentModel()->detachView(&m_itemLibraryView);
|
||||||
|
currentModel()->detachView(&m_importManagerView);
|
||||||
currentModel()->detachView(&m_statesEditorView);
|
currentModel()->detachView(&m_statesEditorView);
|
||||||
currentModel()->detachView(&m_propertyEditorView);
|
currentModel()->detachView(&m_propertyEditorView);
|
||||||
|
|
||||||
if (m_debugView.isAttached())
|
if (m_debugView.isAttached())
|
||||||
currentModel()->detachView(&m_debugView);
|
currentModel()->detachView(&m_debugView);
|
||||||
|
|
||||||
currentModel()->setNodeInstanceView(0);
|
currentModel()->setNodeInstanceView(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,9 +146,11 @@ void ViewManager::attachViewsExceptRewriterAndComponetView()
|
|||||||
{
|
{
|
||||||
if (QmlDesignerPlugin::instance()->settings().enableDebugView)
|
if (QmlDesignerPlugin::instance()->settings().enableDebugView)
|
||||||
currentModel()->attachView(&m_debugView);
|
currentModel()->attachView(&m_debugView);
|
||||||
|
|
||||||
attachNodeInstanceView();
|
attachNodeInstanceView();
|
||||||
currentModel()->attachView(&m_formEditorView);
|
currentModel()->attachView(&m_formEditorView);
|
||||||
currentModel()->attachView(&m_navigatorView);
|
currentModel()->attachView(&m_navigatorView);
|
||||||
|
currentModel()->attachView(&m_importManagerView);
|
||||||
attachItemLibraryView();
|
attachItemLibraryView();
|
||||||
currentModel()->attachView(&m_statesEditorView);
|
currentModel()->attachView(&m_statesEditorView);
|
||||||
currentModel()->attachView(&m_propertyEditorView);
|
currentModel()->attachView(&m_propertyEditorView);
|
||||||
|
@@ -15,6 +15,7 @@ INCLUDEPATH *= \
|
|||||||
$$PWD/designercore \
|
$$PWD/designercore \
|
||||||
$$PWD/designercore/include \
|
$$PWD/designercore/include \
|
||||||
$$PWD/components/componentcore \
|
$$PWD/components/componentcore \
|
||||||
|
$$PWD/components/importmanager \
|
||||||
$$PWD/components/formeditor \
|
$$PWD/components/formeditor \
|
||||||
$$PWD/components/itemlibrary \
|
$$PWD/components/itemlibrary \
|
||||||
$$PWD/components/navigator \
|
$$PWD/components/navigator \
|
||||||
|
@@ -16,6 +16,7 @@ include(components/pluginmanager/pluginmanager.pri)
|
|||||||
include(components/stateseditor/stateseditor.pri)
|
include(components/stateseditor/stateseditor.pri)
|
||||||
include(components/resources/resources.pri)
|
include(components/resources/resources.pri)
|
||||||
include(components/debugview/debugview.pri)
|
include(components/debugview/debugview.pri)
|
||||||
|
include(components/importmanager/importmanager.pri)
|
||||||
include(qmldesignerplugin.pri)
|
include(qmldesignerplugin.pri)
|
||||||
|
|
||||||
DEFINES -= QT_NO_CAST_FROM_ASCII
|
DEFINES -= QT_NO_CAST_FROM_ASCII
|
||||||
|
Reference in New Issue
Block a user