Пример #1
0
void FileResourcesModel::setAnchorBackend(const QVariant anchorBackend)
{

    QObject* anchorBackendObject = anchorBackend.value<QObject*>();

    const QmlDesigner::Internal::QmlAnchorBindingProxy *backendCasted =
            qobject_cast<const QmlDesigner::Internal::QmlAnchorBindingProxy *>(anchorBackendObject);

    if (backendCasted)
        m_path = backendCasted->getItemNode().modelNode().model()->fileUrl();

    setupModel();
    emit anchorBackendChanged();
}
Пример #2
0
void GradientModel::setAnchorBackend(const QVariant anchorBackend)
{
    QObject* anchorBackendObject = anchorBackend.value<QObject*>();

    const QmlDesigner::Internal::QmlAnchorBindingProxy *backendCasted =
            qobject_cast<const QmlDesigner::Internal::QmlAnchorBindingProxy *>(anchorBackendObject);

    if (backendCasted)
        m_itemNode = backendCasted->getItemNode();

    setupModel();

    m_lock = true;

    emit anchorBackendChanged();

    m_lock = false;
}