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


C++ QObjectList::push_back方法代码示例

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


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

示例1: GetComponentsRaw

 QObjectList Entity::GetComponentsRaw(const QString &type_name) const
 {
     QObjectList ret;
     if (type_name.isNull())
         for(size_t i = 0; i < components_.size() ; ++i)
             ret.push_back(components_[i].get());
     else
         for(size_t i = 0; i < components_.size() ; ++i)
             if (components_[i]->TypeName() == type_name)
                 ret.push_back(components_[i].get());
     return ret;
 }
开发者ID:A-K,项目名称:naali,代码行数:12,代码来源:Entity.cpp

示例2: GetComponentsRaw

QObjectList Entity::GetComponentsRaw(const QString &type_name) const
{
    LogWarning("Entity::GetComponentsRaw: This function is deprecated and will be removed. Use GetComponents or Components instead.");
    QObjectList ret;
    if (type_name.isNull())
        for (ComponentMap::const_iterator i = components_.begin(); i != components_.end(); ++i)
            ret.push_back(i->second.get());
    else
        for (ComponentMap::const_iterator i = components_.begin(); i != components_.end(); ++i)
            if (i->second->TypeName() == type_name)
                ret.push_back(i->second.get());
    return ret;
}
开发者ID:katik,项目名称:naali,代码行数:13,代码来源:Entity.cpp

示例3: loadAll

    QObjectList loadAll(NodeObjectMap &map) {
        
        Nodes nodes;
        
        Triples candidates = m_s->match(Triple(Node(), Uri("a"), Node()));
        foreach (Triple t, candidates) {
            if (t.c.type != Node::URI) continue;
            nodes.push_back(t.a);
        }

        LoadState state;
        state.requested = nodes;
        state.map = map;
        state.loadFlags = LoadState::IgnoreUnknownTypes;

        collect(state);
        load(state);

        map = state.map;

        QObjectList objects;
        foreach (Node n, nodes) {
            QObject *o = map.value(n);
            if (o) objects.push_back(o);
        }
开发者ID:breakfastquay,项目名称:dataquay,代码行数:25,代码来源:ObjectLoader.cpp

示例4: getBodies

QObjectList WorldModel::getBodies() const
{
    QObjectList bodies;

    foreach (QBodyDef* qbody, bodyList_)
        bodies.push_back(qbody);

    return bodies;
}
开发者ID:kakus,项目名称:dge,代码行数:9,代码来源:worldmodel.cpp


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