当前位置: 首页>>代码示例>>C++>>正文


C++ QDeclarativeItemPrivate::removeItemChangeListener方法代码示例

本文整理汇总了C++中QDeclarativeItemPrivate::removeItemChangeListener方法的典型用法代码示例。如果您正苦于以下问题:C++ QDeclarativeItemPrivate::removeItemChangeListener方法的具体用法?C++ QDeclarativeItemPrivate::removeItemChangeListener怎么用?C++ QDeclarativeItemPrivate::removeItemChangeListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QDeclarativeItemPrivate的用法示例。


在下文中一共展示了QDeclarativeItemPrivate::removeItemChangeListener方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: clear

void QDeclarativeLoaderPrivate::clear()
{
    if (ownComponent) {
        component->deleteLater();
        component = 0;
        ownComponent = false;
    }
    source = QUrl();

    if (item) {
        if (QDeclarativeItem *qmlItem = qobject_cast<QDeclarativeItem*>(item)) {
            QDeclarativeItemPrivate *p =
                    static_cast<QDeclarativeItemPrivate *>(QGraphicsItemPrivate::get(qmlItem));
            p->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
        }

        // We can't delete immediately because our item may have triggered
        // the Loader to load a different item.
        if (item->scene()) {
            item->scene()->removeItem(item);
        } else {
            item->setParentItem(0);
            item->setVisible(false);
        }
        item->deleteLater();
        item = 0;
    }
}
开发者ID:wpbest,项目名称:copperspice,代码行数:28,代码来源:qdeclarativeloader.cpp

示例2:

QDeclarativeLoader::~QDeclarativeLoader()
{
    Q_D(QDeclarativeLoader);
    if (d->item) {
        if (QDeclarativeItem *qmlItem = qobject_cast<QDeclarativeItem*>(d->item)) {
            QDeclarativeItemPrivate *p =
                    static_cast<QDeclarativeItemPrivate *>(QGraphicsItemPrivate::get(qmlItem));
            p->removeItemChangeListener(d, QDeclarativeItemPrivate::Geometry);
        }
    }
}
开发者ID:wpbest,项目名称:copperspice,代码行数:11,代码来源:qdeclarativeloader.cpp

示例3: unwatchChanges

void QDeclarativeBasePositionerPrivate::unwatchChanges(QGraphicsObject* other)
{
    if (QGraphicsItemPrivate::get(other)->isDeclarativeItem) {
        QDeclarativeItemPrivate *otherPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(other));
        otherPrivate->removeItemChangeListener(this, watchedChanges);
    } else {
        Q_Q(QDeclarativeBasePositioner);
        QObject::disconnect(other, SIGNAL(widthChanged()), q, SLOT(graphicsWidgetGeometryChanged()));
        QObject::disconnect(other, SIGNAL(heightChanged()), q, SLOT(graphicsWidgetGeometryChanged()));
        QObject::disconnect(other, SIGNAL(opacityChanged()), q, SLOT(graphicsWidgetGeometryChanged()));
        QObject::disconnect(other, SIGNAL(visibleChanged()), q, SLOT(graphicsWidgetGeometryChanged()));
    }
}
开发者ID:xjohncz,项目名称:qt5,代码行数:13,代码来源:qdeclarativepositioners.cpp

示例4: remDepend

void QDeclarativeAnchorsPrivate::remDepend(QGraphicsObject *item)
{
    if (!item)
        return;
    QGraphicsItemPrivate * itemPrivate = QGraphicsItemPrivate::get(item);
    if (itemPrivate->isDeclarativeItem) {
        QDeclarativeItemPrivate *p =
            static_cast<QDeclarativeItemPrivate *>(itemPrivate);
        p->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
    } else if(itemPrivate->isWidget) {
        Q_Q(QDeclarativeAnchors);
        QGraphicsWidget *widget = static_cast<QGraphicsWidget *>(item);
        QObject::disconnect(widget, SIGNAL(destroyed(QObject*)), q, SLOT(_q_widgetDestroyed(QObject*)));
        QObject::disconnect(widget, SIGNAL(geometryChanged()), q, SLOT(_q_widgetGeometryChanged()));
    }
}
开发者ID:mortenelund,项目名称:qt,代码行数:16,代码来源:qdeclarativeanchors.cpp

示例5: unwatchChanges

void QDeclarativeBasePositionerPrivate::unwatchChanges(QDeclarativeItem* other)
{
    QDeclarativeItemPrivate *otherPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(other));
    otherPrivate->removeItemChangeListener(this, watchedChanges);
}
开发者ID:,项目名称:,代码行数:5,代码来源:


注:本文中的QDeclarativeItemPrivate::removeItemChangeListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。