forked from qt-creator/qt-creator
QmlDesigner.model: Allow sharing of meta info between models
This is necessary to copy and paste comopnents between different models.
This commit is contained in:
@@ -86,6 +86,7 @@ public:
|
|||||||
|
|
||||||
const MetaInfo metaInfo() const;
|
const MetaInfo metaInfo() const;
|
||||||
MetaInfo metaInfo();
|
MetaInfo metaInfo();
|
||||||
|
void setMetaInfo(const MetaInfo &metaInfo);
|
||||||
|
|
||||||
void attachView(AbstractView *view);
|
void attachView(AbstractView *view);
|
||||||
void detachView(AbstractView *view, ViewNotification emitDetachNotify = NotifyView);
|
void detachView(AbstractView *view, ViewNotification emitDetachNotify = NotifyView);
|
||||||
|
|||||||
@@ -251,6 +251,11 @@ MetaInfo ModelPrivate::metaInfo() const
|
|||||||
return m_metaInfo;
|
return m_metaInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ModelPrivate::setMetaInfo(const MetaInfo &metaInfo)
|
||||||
|
{
|
||||||
|
m_metaInfo = metaInfo;
|
||||||
|
}
|
||||||
|
|
||||||
void ModelPrivate::changeNodeId(const InternalNode::Pointer& internalNodePointer, const QString &id)
|
void ModelPrivate::changeNodeId(const InternalNode::Pointer& internalNodePointer, const QString &id)
|
||||||
{
|
{
|
||||||
const QString oldId = internalNodePointer->id();
|
const QString oldId = internalNodePointer->id();
|
||||||
@@ -872,6 +877,14 @@ const MetaInfo Model::metaInfo() const
|
|||||||
return m_d->metaInfo();
|
return m_d->metaInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Sets a specific Metainfo on this Model
|
||||||
|
*/
|
||||||
|
void Model::setMetaInfo(const MetaInfo &metaInfo)
|
||||||
|
{
|
||||||
|
m_d->setMetaInfo(metaInfo);
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Returns list of Qml types available within the model.
|
\brief Returns list of Qml types available within the model.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ public:
|
|||||||
InternalNodePointer findNode(const QString &id) const;
|
InternalNodePointer findNode(const QString &id) const;
|
||||||
|
|
||||||
MetaInfo metaInfo() const;
|
MetaInfo metaInfo() const;
|
||||||
|
void setMetaInfo(const MetaInfo &metaInfo);
|
||||||
|
|
||||||
void attachView(AbstractView *view);
|
void attachView(AbstractView *view);
|
||||||
void detachView(AbstractView *view, bool notifyView);
|
void detachView(AbstractView *view, bool notifyView);
|
||||||
|
|||||||
Reference in New Issue
Block a user