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


C++ QQuickItemPrivate::itemNode方法代码示例

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


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

示例1: initialize

void QQuickOpacityAnimatorJob::initialize(QQuickAnimatorController *controller)
{
    QQuickAnimatorJob::initialize(controller);
    QQuickItemPrivate *d = QQuickItemPrivate::get(m_target);
    if (d->extra.isAllocated()
            && d->extra->layer
            && d->extra->layer->enabled()) {
        d = QQuickItemPrivate::get(d->extra->layer->m_effectSource);
    }

    m_opacityNode = d->opacityNode();
    if (!m_opacityNode) {
        m_opacityNode = new QSGOpacityNode();
        d->extra.value().opacityNode = m_opacityNode;

        QSGNode *child = d->clipNode();
        if (!child)
            child = d->rootNode();
        if (!child)
            child = d->groupNode;

        if (child) {
            if (child->parent())
                child->parent()->removeChildNode(child);
            m_opacityNode->appendChildNode(child);
        }

        d->itemNode()->appendChildNode(m_opacityNode);
    }
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:30,代码来源:qquickanimatorjob.cpp

示例2: while

QSGNode *QuickSceneGraphModel::currentRootNode() const
{
    if (!m_window)
        return nullptr;

    QQuickItem *item = m_window->contentItem();
    QQuickItemPrivate *itemPriv = QQuickItemPrivate::get(item);
    QSGNode *root = itemPriv->itemNode();
    while (root->parent()) // Ensure that we really get the very root node.
        root = root->parent();
    return root;
}
开发者ID:iamsergio,项目名称:GammaRay,代码行数:12,代码来源:quickscenegraphmodel.cpp

示例3: setWindow

void QuickSceneGraphModel::setWindow(QQuickWindow* window)
{
  beginResetModel();
  clear();
  m_window = window;
  QQuickItem *item = window->contentItem();
  QQuickItemPrivate *itemPriv = QQuickItemPrivate::get(item);
  m_rootNode = itemPriv->itemNode();
  while(m_rootNode->parent()) // Ensure that we really get the very root node.
      m_rootNode = m_rootNode->parent();
  updateSGTree();
  connect(window, SIGNAL(beforeRendering()), this, SLOT(updateSGTree()));

  endResetModel();
}
开发者ID:motto0808,项目名称:GammaRay,代码行数:15,代码来源:quickscenegraphmodel.cpp

示例4: updateSGTree

void QuickSceneGraphModel::updateSGTree()
{
  QQuickItem *item = m_window->contentItem();
  QQuickItemPrivate *itemPriv = QQuickItemPrivate::get(item);
  QSGNode *rootNode = itemPriv->itemNode();
  while(rootNode->parent()) // Ensure that we really get the very root node.
      rootNode = rootNode->parent();
  m_oldChildParentMap = m_childParentMap;
  m_oldParentChildMap = m_parentChildMap;
  m_childParentMap = QHash<QSGNode*, QSGNode*>();
  m_parentChildMap = QHash<QSGNode*, QVector<QSGNode*> >();
  m_childParentMap[m_rootNode] = 0;
  m_parentChildMap[0].append(m_rootNode);

  populateFromNode(m_rootNode);
  collectItemNodes(m_window->contentItem());
}
开发者ID:motto0808,项目名称:GammaRay,代码行数:17,代码来源:quickscenegraphmodel.cpp

示例5:

void QQuickTransformAnimatorJob::Helper::sync()
{
    const quint32 mask = QQuickItemPrivate::Position
            | QQuickItemPrivate::BasicTransform
            | QQuickItemPrivate::TransformOrigin
            | QQuickItemPrivate::Size;

    QQuickItemPrivate *d = QQuickItemPrivate::get(item);
    if (d->extra.isAllocated()
            && d->extra->layer
            && d->extra->layer->enabled()) {
        d = QQuickItemPrivate::get(d->extra->layer->m_effectSource);
    }

    quint32 dirty = mask & d->dirtyAttributes;

    if (!wasSynced) {
        dirty = 0xffffffffu;
        wasSynced = true;
    }

    if (dirty == 0)
        return;

    node = d->itemNode();

    if (dirty & QQuickItemPrivate::Position) {
        dx = item->x();
        dy = item->y();
    }

    if (dirty & QQuickItemPrivate::BasicTransform) {
        scale = item->scale();
        rotation = item->rotation();
    }

    if (dirty & (QQuickItemPrivate::TransformOrigin | QQuickItemPrivate::Size)) {
        QPointF o = item->transformOriginPoint();
        ox = o.x();
        oy = o.y();
    }
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:42,代码来源:qquickanimatorjob.cpp


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