forked from qt-creator/qt-creator
QmlDesigner: Remove empty notifier from QmlModelView
QmlModelView is abstract and should not hide other notifier. Change-Id: Ic992829e8e62ecf6142f84251dc1a86d35e35c2d Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
This commit is contained in:
@@ -371,6 +371,31 @@ void DebugView::nodeSourceChanged(const ModelNode &modelNode, const QString &new
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DebugView::nodeRemoved(const ModelNode &/*removedNode*/, const NodeAbstractProperty &/*parentProperty*/, AbstractView::PropertyChangeFlags /*propertyChange*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void DebugView::nodeAboutToBeReparented(const ModelNode &/*node*/, const NodeAbstractProperty &/*newPropertyParent*/, const NodeAbstractProperty &/*oldPropertyParent*/, AbstractView::PropertyChangeFlags /*propertyChange*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void DebugView::instancesToken(const QString &/*tokenName*/, int /*tokenNumber*/, const QVector<ModelNode> &/*nodeVector*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void DebugView::actualStateChanged(const ModelNode &/*node*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void DebugView::nodeOrderChanged(const NodeListProperty &/*listProperty*/, const ModelNode &/*movedNode*/, int /*oldIndex*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void DebugView::log(const QString &title, const QString &message, bool highlight)
|
void DebugView::log(const QString &title, const QString &message, bool highlight)
|
||||||
{
|
{
|
||||||
m_debugViewWidget->addLogMessage(title, message, highlight);
|
m_debugViewWidget->addLogMessage(title, message, highlight);
|
||||||
|
|||||||
@@ -87,6 +87,12 @@ public:
|
|||||||
|
|
||||||
void nodeSourceChanged(const ModelNode &modelNode, const QString &newNodeSource) QTC_OVERRIDE;
|
void nodeSourceChanged(const ModelNode &modelNode, const QString &newNodeSource) QTC_OVERRIDE;
|
||||||
|
|
||||||
|
void nodeRemoved(const ModelNode &removedNode, const NodeAbstractProperty &parentProperty, PropertyChangeFlags propertyChange) QTC_OVERRIDE;
|
||||||
|
void nodeAboutToBeReparented(const ModelNode &node, const NodeAbstractProperty &newPropertyParent, const NodeAbstractProperty &oldPropertyParent, PropertyChangeFlags propertyChange) QTC_OVERRIDE;
|
||||||
|
void instancesToken(const QString &tokenName, int tokenNumber, const QVector<ModelNode> &nodeVector) QTC_OVERRIDE;
|
||||||
|
void actualStateChanged(const ModelNode &node) QTC_OVERRIDE;
|
||||||
|
void nodeOrderChanged(const NodeListProperty &listProperty, const ModelNode &movedNode, int oldIndex) QTC_OVERRIDE;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void log(const QString &title, const QString &message, bool highlight = false);
|
void log(const QString &title, const QString &message, bool highlight = false);
|
||||||
void logInstance(const QString &title, const QString &message, bool highlight = false);
|
void logInstance(const QString &title, const QString &message, bool highlight = false);
|
||||||
|
|||||||
@@ -156,7 +156,6 @@ void FormEditorView::hideNodeFromScene(const QmlItemNode &qmlItemNode)
|
|||||||
|
|
||||||
void FormEditorView::nodeCreated(const ModelNode &createdNode)
|
void FormEditorView::nodeCreated(const ModelNode &createdNode)
|
||||||
{
|
{
|
||||||
QmlModelView::nodeCreated(createdNode);
|
|
||||||
ModelNode node(createdNode);
|
ModelNode node(createdNode);
|
||||||
//If the node has source for components/custom parsers we ignore it.
|
//If the node has source for components/custom parsers we ignore it.
|
||||||
if (QmlItemNode::isValidQmlItemNode(node) && node.nodeSourceType() == ModelNode::NodeWithoutSource) //only setup QmlItems
|
if (QmlItemNode::isValidQmlItemNode(node) && node.nodeSourceType() == ModelNode::NodeWithoutSource) //only setup QmlItems
|
||||||
@@ -191,11 +190,9 @@ void FormEditorView::nodeAboutToBeRemoved(const ModelNode &removedNode)
|
|||||||
QmlItemNode qmlItemNode(removedNode);
|
QmlItemNode qmlItemNode(removedNode);
|
||||||
|
|
||||||
removeNodeFromScene(qmlItemNode);
|
removeNodeFromScene(qmlItemNode);
|
||||||
|
|
||||||
QmlModelView::nodeAboutToBeRemoved(removedNode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorView::rootNodeTypeChanged(const QString &type, int majorVersion, int minorVersion)
|
void FormEditorView::rootNodeTypeChanged(const QString &/*type*/, int /*majorVersion*/, int /*minorVersion*/)
|
||||||
{
|
{
|
||||||
foreach (FormEditorItem *item, m_scene->allFormEditorItems()) {
|
foreach (FormEditorItem *item, m_scene->allFormEditorItems()) {
|
||||||
item->setParentItem(0);
|
item->setParentItem(0);
|
||||||
@@ -207,8 +204,6 @@ void FormEditorView::nodeAboutToBeRemoved(const ModelNode &removedNode)
|
|||||||
delete item;
|
delete item;
|
||||||
}
|
}
|
||||||
|
|
||||||
QmlModelView::rootNodeTypeChanged(type, majorVersion, minorVersion);
|
|
||||||
|
|
||||||
QmlItemNode newItemNode(rootModelNode());
|
QmlItemNode newItemNode(rootModelNode());
|
||||||
if (newItemNode.isValid()) //only setup QmlItems
|
if (newItemNode.isValid()) //only setup QmlItems
|
||||||
setupFormEditorItemTree(newItemNode);
|
setupFormEditorItemTree(newItemNode);
|
||||||
@@ -237,8 +232,6 @@ void FormEditorView::propertiesAboutToBeRemoved(const QList<AbstractProperty>& p
|
|||||||
m_currentTool->itemsAboutToRemoved(removedItemList);
|
m_currentTool->itemsAboutToRemoved(removedItemList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QmlModelView::propertiesAboutToBeRemoved(propertyList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool hasNodeSourceParent(const ModelNode &node)
|
static inline bool hasNodeSourceParent(const ModelNode &node)
|
||||||
@@ -252,22 +245,18 @@ static inline bool hasNodeSourceParent(const ModelNode &node)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorView::nodeReparented(const ModelNode &node, const NodeAbstractProperty &newPropertyParent, const NodeAbstractProperty &oldPropertyParent, AbstractView::PropertyChangeFlags propertyChange)
|
void FormEditorView::nodeReparented(const ModelNode &node, const NodeAbstractProperty &/*newPropertyParent*/, const NodeAbstractProperty &/*oldPropertyParent*/, AbstractView::PropertyChangeFlags /*propertyChange*/)
|
||||||
{
|
{
|
||||||
if (hasNodeSourceParent(node))
|
if (hasNodeSourceParent(node))
|
||||||
hideNodeFromScene(node);
|
hideNodeFromScene(node);
|
||||||
|
|
||||||
QmlModelView::nodeReparented(node, newPropertyParent, oldPropertyParent, propertyChange);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorView::variantPropertiesChanged(const QList<VariantProperty>& propertyList, PropertyChangeFlags propertyChange)
|
void FormEditorView::variantPropertiesChanged(const QList<VariantProperty> &/*propertyList*/, PropertyChangeFlags /*propertyChange*/)
|
||||||
{
|
{
|
||||||
QmlModelView::variantPropertiesChanged(propertyList, propertyChange);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorView::bindingPropertiesChanged(const QList<BindingProperty>& propertyList, PropertyChangeFlags propertyChange)
|
void FormEditorView::bindingPropertiesChanged(const QList<BindingProperty> &/*propertyList*/, PropertyChangeFlags /*propertyChange*/)
|
||||||
{
|
{
|
||||||
QmlModelView::bindingPropertiesChanged(propertyList, propertyChange);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorView::signalHandlerPropertiesChanged(const QVector<SignalHandlerProperty> & /*propertyList*/, AbstractView::PropertyChangeFlags /*propertyChange*/)
|
void FormEditorView::signalHandlerPropertiesChanged(const QVector<SignalHandlerProperty> & /*propertyList*/, AbstractView::PropertyChangeFlags /*propertyChange*/)
|
||||||
@@ -284,9 +273,8 @@ FormEditorWidget *FormEditorView::formEditorWidget()
|
|||||||
return m_formEditorWidget.data();
|
return m_formEditorWidget.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorView::nodeIdChanged(const ModelNode& node, const QString& newId, const QString& oldId)
|
void FormEditorView::nodeIdChanged(const ModelNode& node, const QString &/*newId*/, const QString &/*oldId*/)
|
||||||
{
|
{
|
||||||
QmlModelView::nodeIdChanged(node, newId, oldId);
|
|
||||||
QmlItemNode itemNode(node);
|
QmlItemNode itemNode(node);
|
||||||
|
|
||||||
if (itemNode.isValid() && node.nodeSourceType() == ModelNode::NodeWithoutSource) {
|
if (itemNode.isValid() && node.nodeSourceType() == ModelNode::NodeWithoutSource) {
|
||||||
@@ -296,18 +284,15 @@ void FormEditorView::nodeIdChanged(const ModelNode& node, const QString& newId,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorView::selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
|
void FormEditorView::selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
|
||||||
const QList<ModelNode> &lastSelectedNodeList)
|
const QList<ModelNode> &/*lastSelectedNodeList*/)
|
||||||
{
|
{
|
||||||
QmlModelView::selectedNodesChanged(selectedNodeList, lastSelectedNodeList);
|
|
||||||
|
|
||||||
m_currentTool->setItems(scene()->itemsForQmlItemNodes(toQmlItemNodeList(selectedNodeList)));
|
m_currentTool->setItems(scene()->itemsForQmlItemNodes(toQmlItemNodeList(selectedNodeList)));
|
||||||
|
|
||||||
m_scene->update();
|
m_scene->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorView::scriptFunctionsChanged(const ModelNode &node, const QStringList &scriptFunctionList)
|
void FormEditorView::scriptFunctionsChanged(const ModelNode &/*node*/, const QStringList &/*scriptFunctionList*/)
|
||||||
{
|
{
|
||||||
QmlModelView::scriptFunctionsChanged(node, scriptFunctionList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorView::propertiesRemoved(const QList<AbstractProperty> &/*propertyList*/)
|
void FormEditorView::propertiesRemoved(const QList<AbstractProperty> &/*propertyList*/)
|
||||||
@@ -610,8 +595,6 @@ void FormEditorView::instancePropertyChange(const QList<QPair<ModelNode, Propert
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QmlModelView::instancePropertyChange(propertyList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorView::updateGraphicsIndicators()
|
void FormEditorView::updateGraphicsIndicators()
|
||||||
@@ -636,11 +619,28 @@ bool FormEditorView::isMoveToolAvailable() const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorView::actualStateChanged(const ModelNode &node)
|
void FormEditorView::actualStateChanged(const ModelNode &/*node*/)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void FormEditorView::nodeRemoved(const ModelNode &/*removedNode*/, const NodeAbstractProperty &/*parentProperty*/, AbstractView::PropertyChangeFlags /*propertyChange*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void FormEditorView::nodeAboutToBeReparented(const ModelNode &/*node*/, const NodeAbstractProperty &/*newPropertyParent*/, const NodeAbstractProperty &/*oldPropertyParent*/, AbstractView::PropertyChangeFlags /*propertyChange*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void FormEditorView::nodeSourceChanged(const ModelNode &/*modelNode*/, const QString &/*newNodeSource*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void FormEditorView::nodeOrderChanged(const NodeListProperty &/*listProperty*/, const ModelNode &/*movedNode*/, int /*oldIndex*/)
|
||||||
{
|
{
|
||||||
QmlModelView::actualStateChanged(node);
|
|
||||||
|
|
||||||
QmlModelState newQmlModelState(node);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorView::reset()
|
void FormEditorView::reset()
|
||||||
|
|||||||
@@ -125,6 +125,11 @@ public:
|
|||||||
|
|
||||||
void actualStateChanged(const ModelNode &node) QTC_OVERRIDE;
|
void actualStateChanged(const ModelNode &node) QTC_OVERRIDE;
|
||||||
|
|
||||||
|
void nodeRemoved(const ModelNode &removedNode, const NodeAbstractProperty &parentProperty, PropertyChangeFlags propertyChange) QTC_OVERRIDE;
|
||||||
|
void nodeAboutToBeReparented(const ModelNode &node, const NodeAbstractProperty &newPropertyParent, const NodeAbstractProperty &oldPropertyParent, PropertyChangeFlags propertyChange) QTC_OVERRIDE;
|
||||||
|
void nodeSourceChanged(const ModelNode &modelNode, const QString &newNodeSource) QTC_OVERRIDE;
|
||||||
|
void nodeOrderChanged(const NodeListProperty &listProperty, const ModelNode &movedNode, int oldIndex) QTC_OVERRIDE;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
|
|||||||
@@ -278,6 +278,11 @@ void NavigatorView::actualStateChanged(const ModelNode &/*node*/)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NavigatorView::instancesToken(const QString &/*tokenName*/, int /*tokenNumber*/, const QVector<ModelNode> &/*nodeVector*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void NavigatorView::nodeOrderChanged(const NodeListProperty &listProperty, const ModelNode &node, int oldIndex)
|
void NavigatorView::nodeOrderChanged(const NodeListProperty &listProperty, const ModelNode &node, int oldIndex)
|
||||||
{
|
{
|
||||||
if (m_treeModel->isInTree(node))
|
if (m_treeModel->isInTree(node))
|
||||||
|
|||||||
@@ -98,6 +98,8 @@ public:
|
|||||||
|
|
||||||
void actualStateChanged(const ModelNode &node) QTC_OVERRIDE;
|
void actualStateChanged(const ModelNode &node) QTC_OVERRIDE;
|
||||||
|
|
||||||
|
void instancesToken(const QString &tokenName, int tokenNumber, const QVector<ModelNode> &nodeVector) QTC_OVERRIDE;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
// void handleChangedItem(QStandardItem * item);
|
// void handleChangedItem(QStandardItem * item);
|
||||||
void changeSelection(const QItemSelection &selected, const QItemSelection &deselected);
|
void changeSelection(const QItemSelection &selected, const QItemSelection &deselected);
|
||||||
|
|||||||
@@ -807,7 +807,6 @@ void PropertyEditor::selectedNodesChanged(const QList<ModelNode> &selectedNodeLi
|
|||||||
|
|
||||||
void PropertyEditor::nodeAboutToBeRemoved(const ModelNode &removedNode)
|
void PropertyEditor::nodeAboutToBeRemoved(const ModelNode &removedNode)
|
||||||
{
|
{
|
||||||
QmlModelView::nodeAboutToBeRemoved(removedNode);
|
|
||||||
if (m_selectedNode.isValid() && removedNode.isValid() && m_selectedNode == removedNode)
|
if (m_selectedNode.isValid() && removedNode.isValid() && m_selectedNode == removedNode)
|
||||||
select(m_selectedNode.parentProperty().parentModelNode());
|
select(m_selectedNode.parentProperty().parentModelNode());
|
||||||
}
|
}
|
||||||
@@ -843,8 +842,6 @@ void PropertyEditor::modelAboutToBeDetached(Model *model)
|
|||||||
|
|
||||||
void PropertyEditor::propertiesRemoved(const QList<AbstractProperty>& propertyList)
|
void PropertyEditor::propertiesRemoved(const QList<AbstractProperty>& propertyList)
|
||||||
{
|
{
|
||||||
QmlModelView::propertiesRemoved(propertyList);
|
|
||||||
|
|
||||||
if (!m_selectedNode.isValid())
|
if (!m_selectedNode.isValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -862,11 +859,9 @@ void PropertyEditor::propertiesRemoved(const QList<AbstractProperty>& propertyLi
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PropertyEditor::variantPropertiesChanged(const QList<VariantProperty>& propertyList, PropertyChangeFlags propertyChange)
|
void PropertyEditor::variantPropertiesChanged(const QList<VariantProperty>& propertyList, PropertyChangeFlags /*propertyChange*/)
|
||||||
{
|
{
|
||||||
|
|
||||||
QmlModelView::variantPropertiesChanged(propertyList, propertyChange);
|
|
||||||
|
|
||||||
if (!m_selectedNode.isValid())
|
if (!m_selectedNode.isValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -885,10 +880,8 @@ void PropertyEditor::variantPropertiesChanged(const QList<VariantProperty>& prop
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropertyEditor::bindingPropertiesChanged(const QList<BindingProperty>& propertyList, PropertyChangeFlags propertyChange)
|
void PropertyEditor::bindingPropertiesChanged(const QList<BindingProperty>& propertyList, PropertyChangeFlags /*propertyChange*/)
|
||||||
{
|
{
|
||||||
QmlModelView::bindingPropertiesChanged(propertyList, propertyChange);
|
|
||||||
|
|
||||||
if (!m_selectedNode.isValid())
|
if (!m_selectedNode.isValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -928,10 +921,8 @@ void PropertyEditor::instanceInformationsChange(const QMultiHash<ModelNode, Info
|
|||||||
m_locked = false;
|
m_locked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropertyEditor::nodeIdChanged(const ModelNode& node, const QString& newId, const QString& oldId)
|
void PropertyEditor::nodeIdChanged(const ModelNode& node, const QString& newId, const QString& /*oldId*/)
|
||||||
{
|
{
|
||||||
QmlModelView::nodeIdChanged(node, newId, oldId);
|
|
||||||
|
|
||||||
if (!m_selectedNode.isValid())
|
if (!m_selectedNode.isValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -945,9 +936,8 @@ void PropertyEditor::nodeIdChanged(const ModelNode& node, const QString& newId,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropertyEditor::scriptFunctionsChanged(const ModelNode &node, const QStringList &scriptFunctionList)
|
void PropertyEditor::scriptFunctionsChanged(const ModelNode &/*node*/, const QStringList &/*scriptFunctionList*/)
|
||||||
{
|
{
|
||||||
QmlModelView::scriptFunctionsChanged(node, scriptFunctionList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropertyEditor::select(const ModelNode &node)
|
void PropertyEditor::select(const ModelNode &node)
|
||||||
@@ -972,7 +962,6 @@ WidgetInfo PropertyEditor::widgetInfo()
|
|||||||
|
|
||||||
void PropertyEditor::actualStateChanged(const ModelNode &node)
|
void PropertyEditor::actualStateChanged(const ModelNode &node)
|
||||||
{
|
{
|
||||||
QmlModelView::actualStateChanged(node);
|
|
||||||
QmlModelState newQmlModelState(node);
|
QmlModelState newQmlModelState(node);
|
||||||
Q_ASSERT(newQmlModelState.isValid());
|
Q_ASSERT(newQmlModelState.isValid());
|
||||||
if (debug)
|
if (debug)
|
||||||
@@ -1008,6 +997,86 @@ void PropertyEditor::instancePropertyChange(const QList<QPair<ModelNode, Propert
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PropertyEditor::nodeCreated(const ModelNode &/*createdNode*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropertyEditor::nodeRemoved(const ModelNode &/*removedNode*/, const NodeAbstractProperty &/*parentProperty*/, AbstractView::PropertyChangeFlags /*propertyChange*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropertyEditor::nodeAboutToBeReparented(const ModelNode &/*node*/, const NodeAbstractProperty &/*newPropertyParent*/, const NodeAbstractProperty &/*oldPropertyParent*/, AbstractView::PropertyChangeFlags /*propertyChange*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropertyEditor::nodeReparented(const ModelNode &/*node*/, const NodeAbstractProperty &/*newPropertyParent*/, const NodeAbstractProperty &/*oldPropertyParent*/, AbstractView::PropertyChangeFlags /*propertyChange*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropertyEditor::propertiesAboutToBeRemoved(const QList<AbstractProperty> &/*propertyList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropertyEditor::rootNodeTypeChanged(const QString &/*type*/, int /*majorVersion*/, int /*minorVersion*/)
|
||||||
|
{
|
||||||
|
// TODO: we should react to this case
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropertyEditor::instancesCompleted(const QVector<ModelNode> &/*completedNodeList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropertyEditor::instancesRenderImageChanged(const QVector<ModelNode> &/*nodeList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropertyEditor::instancesPreviewImageChanged(const QVector<ModelNode> &/*nodeList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropertyEditor::instancesChildrenChanged(const QVector<ModelNode> &/*nodeList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropertyEditor::instancesToken(const QString &/*tokenName*/, int /*tokenNumber*/, const QVector<ModelNode> &/*nodeVector*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropertyEditor::nodeSourceChanged(const ModelNode &/*modelNode*/, const QString &/*newNodeSource*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropertyEditor::rewriterBeginTransaction()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropertyEditor::rewriterEndTransaction()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropertyEditor::nodeOrderChanged(const NodeListProperty &/*listProperty*/, const ModelNode &/*movedNode*/, int /*oldIndex*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropertyEditor::importsChanged(const QList<Import> &/*addedImports*/, const QList<Import> &/*removedImports*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void PropertyEditor::setValue(const QmlObjectNode &qmlObjectNode, const PropertyName &name, const QVariant &value)
|
void PropertyEditor::setValue(const QmlObjectNode &qmlObjectNode, const PropertyName &name, const QVariant &value)
|
||||||
{
|
{
|
||||||
m_locked = true;
|
m_locked = true;
|
||||||
|
|||||||
@@ -110,6 +110,23 @@ public:
|
|||||||
void actualStateChanged(const ModelNode &node) QTC_OVERRIDE;
|
void actualStateChanged(const ModelNode &node) QTC_OVERRIDE;
|
||||||
void instancePropertyChange(const QList<QPair<ModelNode, PropertyName> > &propertyList) QTC_OVERRIDE;
|
void instancePropertyChange(const QList<QPair<ModelNode, PropertyName> > &propertyList) QTC_OVERRIDE;
|
||||||
|
|
||||||
|
void nodeCreated(const ModelNode &createdNode) QTC_OVERRIDE;
|
||||||
|
void nodeRemoved(const ModelNode &removedNode, const NodeAbstractProperty &parentProperty, PropertyChangeFlags propertyChange) QTC_OVERRIDE;
|
||||||
|
void nodeAboutToBeReparented(const ModelNode &node, const NodeAbstractProperty &newPropertyParent, const NodeAbstractProperty &oldPropertyParent, PropertyChangeFlags propertyChange) QTC_OVERRIDE;
|
||||||
|
void nodeReparented(const ModelNode &node, const NodeAbstractProperty &newPropertyParent, const NodeAbstractProperty &oldPropertyParent, PropertyChangeFlags propertyChange) QTC_OVERRIDE;
|
||||||
|
void propertiesAboutToBeRemoved(const QList<AbstractProperty> &propertyList) QTC_OVERRIDE;
|
||||||
|
void rootNodeTypeChanged(const QString &type, int majorVersion, int minorVersion) QTC_OVERRIDE;
|
||||||
|
void instancesCompleted(const QVector<ModelNode> &completedNodeList) QTC_OVERRIDE;
|
||||||
|
void instancesRenderImageChanged(const QVector<ModelNode> &nodeList) QTC_OVERRIDE;
|
||||||
|
void instancesPreviewImageChanged(const QVector<ModelNode> &nodeList) QTC_OVERRIDE;
|
||||||
|
void instancesChildrenChanged(const QVector<ModelNode> &nodeList) QTC_OVERRIDE;
|
||||||
|
void instancesToken(const QString &tokenName, int tokenNumber, const QVector<ModelNode> &nodeVector) QTC_OVERRIDE;
|
||||||
|
void nodeSourceChanged(const ModelNode &modelNode, const QString &newNodeSource) QTC_OVERRIDE;
|
||||||
|
void rewriterBeginTransaction() QTC_OVERRIDE;
|
||||||
|
void rewriterEndTransaction() QTC_OVERRIDE;
|
||||||
|
void nodeOrderChanged(const NodeListProperty &listProperty, const ModelNode &movedNode, int oldIndex) QTC_OVERRIDE;
|
||||||
|
void importsChanged(const QList<Import> &addedImports, const QList<Import> &removedImports) QTC_OVERRIDE;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void timerEvent(QTimerEvent *event);
|
void timerEvent(QTimerEvent *event);
|
||||||
void setupPane(const TypeName &typeName);
|
void setupPane(const TypeName &typeName);
|
||||||
|
|||||||
@@ -62,6 +62,71 @@ WidgetInfo StatesEditorView::widgetInfo()
|
|||||||
return createWidgetInfo(m_statesEditorWidget.data(), 0, "StatesEditor", WidgetInfo::TopPane, 0, tr("States Editor"));
|
return createWidgetInfo(m_statesEditorWidget.data(), 0, "StatesEditor", WidgetInfo::TopPane, 0, tr("States Editor"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void StatesEditorView::nodeCreated(const ModelNode &/*createdNode*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void StatesEditorView::propertiesAboutToBeRemoved(const QList<AbstractProperty> &/*propertyList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void StatesEditorView::rootNodeTypeChanged(const QString &/*type*/, int /*majorVersion*/, int /*minorVersion*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void StatesEditorView::instancePropertyChange(const QList<QPair<ModelNode, PropertyName> > &/*propertyList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void StatesEditorView::instancesCompleted(const QVector<ModelNode> &/*completedNodeList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void StatesEditorView::instanceInformationsChange(const QMultiHash<ModelNode, InformationName> &/*informationChangeHash*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void StatesEditorView::instancesRenderImageChanged(const QVector<ModelNode> &/*nodeList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void StatesEditorView::instancesChildrenChanged(const QVector<ModelNode> &/*nodeList*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void StatesEditorView::instancesToken(const QString &/*tokenName*/, int /*tokenNumber*/, const QVector<ModelNode> &/*nodeVector*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void StatesEditorView::nodeSourceChanged(const ModelNode &/*modelNode*/, const QString &/*newNodeSource*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void StatesEditorView::rewriterBeginTransaction()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void StatesEditorView::rewriterEndTransaction()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void StatesEditorView::importsChanged(const QList<Import> &/*addedImports*/, const QList<Import> &/*removedImports*/)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void StatesEditorView::removeState(int nodeId)
|
void StatesEditorView::removeState(int nodeId)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@@ -300,7 +365,6 @@ void StatesEditorView::actualStateChanged(const ModelNode &node)
|
|||||||
m_statesEditorWidget->setCurrentStateInternalId(0);
|
m_statesEditorWidget->setCurrentStateInternalId(0);
|
||||||
else
|
else
|
||||||
m_statesEditorWidget->setCurrentStateInternalId(newQmlModelState.modelNode().internalId());
|
m_statesEditorWidget->setCurrentStateInternalId(newQmlModelState.modelNode().internalId());
|
||||||
QmlModelView::actualStateChanged(node);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatesEditorView::instancesPreviewImageChanged(const QVector<ModelNode> &nodeList)
|
void StatesEditorView::instancesPreviewImageChanged(const QVector<ModelNode> &nodeList)
|
||||||
@@ -324,10 +388,8 @@ void StatesEditorView::instancesPreviewImageChanged(const QVector<ModelNode> &no
|
|||||||
m_statesEditorModel->updateState(minimumIndex, maximumIndex);
|
m_statesEditorModel->updateState(minimumIndex, maximumIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatesEditorView::scriptFunctionsChanged(const ModelNode &node, const QStringList &scriptFunctionList)
|
void StatesEditorView::scriptFunctionsChanged(const ModelNode &/*node*/, const QStringList &/*scriptFunctionList*/)
|
||||||
{
|
{
|
||||||
|
|
||||||
QmlModelView::scriptFunctionsChanged(node, scriptFunctionList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatesEditorView::nodeIdChanged(const ModelNode &/*node*/, const QString &/*newId*/, const QString &/*oldId*/)
|
void StatesEditorView::nodeIdChanged(const ModelNode &/*node*/, const QString &/*newId*/, const QString &/*oldId*/)
|
||||||
|
|||||||
@@ -83,6 +83,19 @@ public:
|
|||||||
|
|
||||||
WidgetInfo widgetInfo() QTC_OVERRIDE;
|
WidgetInfo widgetInfo() QTC_OVERRIDE;
|
||||||
|
|
||||||
|
void nodeCreated(const ModelNode &createdNode) QTC_OVERRIDE;
|
||||||
|
void propertiesAboutToBeRemoved(const QList<AbstractProperty> &propertyList) QTC_OVERRIDE;
|
||||||
|
void rootNodeTypeChanged(const QString &type, int majorVersion, int minorVersion) QTC_OVERRIDE;
|
||||||
|
void instancePropertyChange(const QList<QPair<ModelNode, PropertyName> > &propertyList) QTC_OVERRIDE;
|
||||||
|
void instancesCompleted(const QVector<ModelNode> &completedNodeList) QTC_OVERRIDE;
|
||||||
|
void instanceInformationsChange(const QMultiHash<ModelNode, InformationName> &informationChangeHash) QTC_OVERRIDE;
|
||||||
|
void instancesRenderImageChanged(const QVector<ModelNode> &nodeList) QTC_OVERRIDE;
|
||||||
|
void instancesChildrenChanged(const QVector<ModelNode> &nodeList) QTC_OVERRIDE;
|
||||||
|
void instancesToken(const QString &tokenName, int tokenNumber, const QVector<ModelNode> &nodeVector) QTC_OVERRIDE;
|
||||||
|
void nodeSourceChanged(const ModelNode &modelNode, const QString &newNodeSource) QTC_OVERRIDE;
|
||||||
|
void rewriterBeginTransaction() QTC_OVERRIDE;
|
||||||
|
void rewriterEndTransaction() QTC_OVERRIDE;
|
||||||
|
void importsChanged(const QList<Import> &addedImports, const QList<Import> &removedImports) QTC_OVERRIDE;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void synchonizeCurrentStateFromWidget();
|
void synchonizeCurrentStateFromWidget();
|
||||||
|
|||||||
@@ -66,41 +66,6 @@ public:
|
|||||||
void modelAttached(Model *model) QTC_OVERRIDE;
|
void modelAttached(Model *model) QTC_OVERRIDE;
|
||||||
void modelAboutToBeDetached(Model *model) QTC_OVERRIDE;
|
void modelAboutToBeDetached(Model *model) QTC_OVERRIDE;
|
||||||
|
|
||||||
void instancePropertyChange(const QList<QPair<ModelNode, PropertyName> > &propertyList) QTC_OVERRIDE;
|
|
||||||
void instancesCompleted(const QVector<ModelNode> &completedNodeList) QTC_OVERRIDE;
|
|
||||||
void instanceInformationsChange(const QMultiHash<ModelNode, InformationName> &informationChangeHash) QTC_OVERRIDE;
|
|
||||||
void instancesRenderImageChanged(const QVector<ModelNode> &nodeList) QTC_OVERRIDE;
|
|
||||||
void instancesPreviewImageChanged(const QVector<ModelNode> &nodeList) QTC_OVERRIDE;
|
|
||||||
void instancesChildrenChanged(const QVector<ModelNode> &nodeList) QTC_OVERRIDE;
|
|
||||||
void instancesToken(const QString &tokenName, int tokenNumber, const QVector<ModelNode> &nodeVector);
|
|
||||||
|
|
||||||
void rewriterBeginTransaction() QTC_OVERRIDE;
|
|
||||||
void rewriterEndTransaction() QTC_OVERRIDE;
|
|
||||||
|
|
||||||
void actualStateChanged(const ModelNode &node);
|
|
||||||
|
|
||||||
void nodeCreated(const ModelNode &createdNode) QTC_OVERRIDE;
|
|
||||||
void nodeRemoved(const ModelNode &removedNode, const NodeAbstractProperty &parentProperty, PropertyChangeFlags propertyChange) QTC_OVERRIDE;
|
|
||||||
void nodeAboutToBeReparented(const ModelNode &node, const NodeAbstractProperty &newPropertyParent,
|
|
||||||
const NodeAbstractProperty &oldPropertyParent,
|
|
||||||
AbstractView::PropertyChangeFlags propertyChange) QTC_OVERRIDE;
|
|
||||||
void nodeReparented(const ModelNode &node, const NodeAbstractProperty &newPropertyParent,
|
|
||||||
const NodeAbstractProperty &oldPropertyParent,
|
|
||||||
AbstractView::PropertyChangeFlags propertyChange) QTC_OVERRIDE;
|
|
||||||
void propertiesAboutToBeRemoved(const QList<AbstractProperty> &propertyList) QTC_OVERRIDE;
|
|
||||||
void rootNodeTypeChanged(const QString &type, int majorVersion, int minorVersion) QTC_OVERRIDE;
|
|
||||||
void nodeOrderChanged(const NodeListProperty &listProperty, const ModelNode &movedNode, int oldIndex) QTC_OVERRIDE;
|
|
||||||
void nodeAboutToBeRemoved(const ModelNode &removedNode) QTC_OVERRIDE;
|
|
||||||
void nodeIdChanged(const ModelNode& node, const QString& newId, const QString& oldId) QTC_OVERRIDE;
|
|
||||||
void propertiesRemoved(const QList<AbstractProperty>& propertyList) QTC_OVERRIDE;
|
|
||||||
void variantPropertiesChanged(const QList<VariantProperty>& propertyList, PropertyChangeFlags propertyChange) QTC_OVERRIDE;
|
|
||||||
void bindingPropertiesChanged(const QList<BindingProperty>& propertyList, PropertyChangeFlags propertyChange) QTC_OVERRIDE;
|
|
||||||
void signalHandlerPropertiesChanged(const QVector<SignalHandlerProperty>& propertyList,PropertyChangeFlags propertyChange) QTC_OVERRIDE;
|
|
||||||
void scriptFunctionsChanged(const ModelNode &node, const QStringList &scriptFunctionList) QTC_OVERRIDE;
|
|
||||||
void selectedNodesChanged(const QList<ModelNode> &selectedNodeList, const QList<ModelNode> &lastSelectedNodeList) QTC_OVERRIDE;
|
|
||||||
|
|
||||||
void importsChanged(const QList<Import> &addedImports, const QList<Import> &removedImports) QTC_OVERRIDE;
|
|
||||||
void nodeSourceChanged(const ModelNode &modelNode, const QString &newNodeSource) QTC_OVERRIDE;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
NodeInstance instanceForModelNode(const ModelNode &modelNode);
|
NodeInstance instanceForModelNode(const ModelNode &modelNode);
|
||||||
|
|||||||
@@ -295,85 +295,6 @@ void QmlModelView::modelAboutToBeDetached(Model *model)
|
|||||||
AbstractView::modelAboutToBeDetached(model);
|
AbstractView::modelAboutToBeDetached(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlModelView::nodeOrderChanged(const NodeListProperty &/*listProperty*/, const ModelNode &/*movedNode*/, int /*oldIndex*/)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlModelView::nodeCreated(const ModelNode &/*createdNode*/) {}
|
|
||||||
void QmlModelView::nodeAboutToBeRemoved(const ModelNode &/*removedNode*/) {}
|
|
||||||
void QmlModelView::nodeRemoved(const ModelNode &/*removedNode*/, const NodeAbstractProperty &/*parentProperty*/, PropertyChangeFlags /*propertyChange*/) {}
|
|
||||||
void QmlModelView::nodeAboutToBeReparented(const ModelNode &/*node*/, const NodeAbstractProperty &/*newPropertyParent*/, const NodeAbstractProperty &/*oldPropertyParent*/, AbstractView::PropertyChangeFlags /*propertyChange*/) {}
|
|
||||||
void QmlModelView::nodeReparented(const ModelNode &/*node*/, const NodeAbstractProperty &/*newPropertyParent*/, const NodeAbstractProperty &/*oldPropertyParent*/, AbstractView::PropertyChangeFlags /*propertyChange*/) {}
|
|
||||||
void QmlModelView::nodeIdChanged(const ModelNode& /*node*/, const QString& /*newId*/, const QString& /*oldId*/) {}
|
|
||||||
void QmlModelView::propertiesAboutToBeRemoved(const QList<AbstractProperty>& /*propertyList*/) {}
|
|
||||||
void QmlModelView::propertiesRemoved(const QList<AbstractProperty>& /*propertyList*/) {}
|
|
||||||
void QmlModelView::variantPropertiesChanged(const QList<VariantProperty>& /*propertyList*/, PropertyChangeFlags /*propertyChange*/) {}
|
|
||||||
void QmlModelView::bindingPropertiesChanged(const QList<BindingProperty>& /*propertyList*/, PropertyChangeFlags /*propertyChange*/) {}
|
|
||||||
void QmlModelView::signalHandlerPropertiesChanged(const QVector<SignalHandlerProperty> & /*propertyList*/, AbstractView::PropertyChangeFlags /*propertyChange*/) {}
|
|
||||||
void QmlModelView::rootNodeTypeChanged(const QString &/*type*/, int, int /*minorVersion*/) {}
|
|
||||||
void QmlModelView::scriptFunctionsChanged(const ModelNode &/*node*/, const QStringList &/*scriptFunctionList*/) {}
|
|
||||||
void QmlModelView::selectedNodesChanged(const QList<ModelNode> &/*selectedNodeList*/, const QList<ModelNode> &/*lastSelectedNodeList*/) {}
|
|
||||||
|
|
||||||
|
|
||||||
void QmlModelView::instancesCompleted(const QVector<ModelNode> &/*completedNodeList*/)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlModelView::instanceInformationsChange(const QMultiHash<ModelNode, InformationName> &/*informationChangeHash*/)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlModelView::instancesRenderImageChanged(const QVector<ModelNode> &/*nodeList*/)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlModelView::instancesPreviewImageChanged(const QVector<ModelNode> &/*nodeList*/)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlModelView::instancesChildrenChanged(const QVector<ModelNode> &/*nodeList*/)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlModelView::importsChanged(const QList<Import> &/*addedImports*/, const QList<Import> &/*removedImports*/)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlModelView::instancesToken(const QString &/*tokenName*/, int /*tokenNumber*/, const QVector<ModelNode> &/*nodeVector*/)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlModelView::nodeSourceChanged(const ModelNode &, const QString & /*newNodeSource*/)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlModelView::rewriterBeginTransaction()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlModelView::rewriterEndTransaction()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlModelView::actualStateChanged(const ModelNode & /*node*/)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlModelView::instancePropertyChange(const QList<QPair<ModelNode, PropertyName> > & /*propertyList*/)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
ModelNode QmlModelView::createQmlState(const QmlDesigner::PropertyListType &propertyList)
|
ModelNode QmlModelView::createQmlState(const QmlDesigner::PropertyListType &propertyList)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user