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


C++ MemberList::size方法代码示例

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


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

示例1: updateGroupMems

void CDoodChatManagerModel::updateGroupMems(MemberList list)
{
    int len = list.size();
    qDebug()<<Q_FUNC_INFO<<"size:"<<list.size();
    if(list.size()>0){
        mGroupMemList.clear();
    }
    for(int i = 0;i<len;++i){
        Member mem = list.at(i);
        if(mem.thumbAvatar != "" && !mem.thumbAvatar.startsWith("/data")){
            mem.thumbAvatar = QString::fromStdString(APP_DATA_PATH)+"public/head/"+mem.thumbAvatar;
        }
        mGroupMemList.push_back(mem);
    }
    mGroupSize = list.size();
    QList<CDoodChatItem*> msgList = m_pChatMap.values();
    for(int i =0;i<msgList.size();++i){
        CDoodChatItem* item = msgList.at(i);
        if((item != NULL && item->name() == item->fromId())||item != NULL && item->contactThumbAvatar() == ""){
            for(int j=0;j<mGroupMemList.size();++j){
                if(mGroupMemList.at(j).id == item->fromId()){
                    item->setName(mGroupMemList.at(j).name);
                    if(mGroupMemList.at(j).thumbAvatar != ""){
                        item->setContactThumbAvatar(mGroupMemList.at(j).thumbAvatar);
                    }
                    break;
                }
            }
        }
    }
    emit nameChanged();
}
开发者ID:MakoVsp,项目名称:Linkdood,代码行数:32,代码来源:cdoodchatmanagermodel.cpp

示例2: addGroupMems

void CDoodChatManagerModel::addGroupMems(MemberList mems)
{
    if(mems.size()<=0){
        return;
    }
    if(mems[0].groupid == id()){
        for(int i =0;i<mems.size();++i){
            mGroupMemList.push_back(mems[i]);
        }
    }
}
开发者ID:MakoVsp,项目名称:Linkdood,代码行数:11,代码来源:cdoodchatmanagermodel.cpp

示例3: onMemberListChanged

void CDoodMemberManager::onMemberListChanged(QString operType, QString GroupId, MemberList memberlist)
{
    qDebug() << Q_FUNC_INFO<<"sss";
    if(operType=="32"||operType=="33"){
        for(size_t i=0;i<memberlist.size();++i){
            qDebug() << Q_FUNC_INFO<<"sss1"<<memberlist[i].id<<memberlist[i].name;
            CDoodMemberItem *item = memberListMap.value(memberlist[i].id,NULL);

            if(item!=NULL){
                qDebug() << Q_FUNC_INFO<<"sss2";
                if(item->groupid()==GroupId){
                    qDebug() << Q_FUNC_INFO<<"sss3";
                    removeMemberItem(memberlist[i].id);
                    int size;
                    size=memberSize().toInt()-1;
                    setMemberSize(QString::number(size));
                }
            }
            item=groupAdminListMap.value(memberlist[i].id,NULL);
            if(item!=NULL){
                if(memberlist[i].groupid==GroupId){
                    removeMemberItem(memberlist[i].id);
                    int size;
                    size=memberSize().toInt()-1;
                    setMemberSize(QString::number(size));
                }
            }
        }
    }
    if(operType=="1"){
        if(GroupId==mGroupid){
            for(size_t i=0;i<memberlist.size();++i){
                addMember(memberlist[i]);
                emit itemCountChanged();
            }
            int size;
            size=memberSize().toInt()+memberlist.size();
            setMemberSize(QString::number(size));
        }
    }
}
开发者ID:MakoVsp,项目名称:Linkdood,代码行数:41,代码来源:cdoodmembermanager.cpp

示例4: onGetMemberListResult

void CDoodMemberManager::onGetMemberListResult(QString result, MemberList memberList)
{   
    if(result=="获取成员列表成功"){
        if(memberList.size()>0){
            if(memberList[0].groupid==m_ThePresentGroupid){
                setMemberSize(QString::number(memberList.size()));
                mMy_Id=getMyId();
                setMy_Type("1");
                for(size_t i=0;i<memberList.size();i++)
                {
                    mGroupid=memberList[0].groupid;
                    addMember(memberList[i]);
                    emit itemCountChanged();
                }
                emit getMemberListResult("获取成员列表成功");
            }
        }
    }
    else{
        emit getMemberListResult("获取成员列表失败");
    }
}
开发者ID:MakoVsp,项目名称:Linkdood,代码行数:22,代码来源:cdoodmembermanager.cpp

示例5: write

void KernelSymbolWriter::write()
{
    operationStarted();

    // Update the time stamp if the symbols have changed
    if (_factory->changeClock() != _specs->createdChangeClock) {
        _specs->created = QDateTime::currentDateTime();
        _specs->createdChangeClock = _factory->changeClock();
    }

    // Disable compression by default
    qint16 flags = 0; // kSym::flagCompressed;

    // First, write the header information to the uncompressed device
    KernelSymbolStream out(_to);
//    out.setKSymVersion(kSym::VERSION_11);

#ifdef WRITE_ASCII_FILE
    QFile debugOutFile("/tmp/insight.log");
    debugOutFile.open(QIODevice::WriteOnly);
    QTextStream dout(&debugOutFile);
#endif

    // Write the file header in the following format:
    // 1. (qint32) magic number
    // 2. (qint16) file version number
    // 3. (qint16) flags (currently unused)
    // 4. (qint32) Qt's serialization format version (see QDataStream::Version)

    out << (qint32) kSym::fileMagic
        << (qint16) out.kSymVersion()
        << (qint16) flags
        << (qint32) out.version();
#ifdef WRITE_ASCII_FILE
    dout << QString::fromAscii((char*)(&kSym::fileMagic), sizeof(kSym::fileMagic))
         << " " << kSym::fileVersion  << " 0x" << hex << flags
         << dec << " " << out.version() << endl;
#endif

    // Write all information from SymFactory in the following format:
    // 1.   (MemSpecs) data of _specs
    // 2.a  (qint32) number of compile units
    // 2.b  (CompileUnit) data of 1st compile unit
    // 2.c  (CompileUnit) data of 2nd compile unit
    // 2.d  ...
    // 3.a  (qint32) number of types
    // 3.b  (qint32) type (RealType casted to qint32)
    // 3.c  (subclass of BaseType) data of type
    // 3.d  (qint32) type (RealType casted to qint32)
    // 3.e  (subclass of BaseType) data of type
    // 3.f  ...
    // 4.a  (qint32) number of id-mappings for types
    // 4.b  (qint32) 1st source id
    // 4.c  (qint32) 1st target id
    // 4.d  (qint32) 2nd source id
    // 4.e  (qint32) 2nd target id
    // 4.f  ...
    // 5.a  (qint32) number of variables
    // 5.b  (Variable) data of variable
    // 5.c  (Variable) data of variable
    // 5.d  ...
    // 6.a  (qint32) number of ref. types with alternative types
    // 6.b  (qint32) 1st id of ref. type with alternatives
    // 6.c  (qint32) number of type alternatives
    // 6.d  (AltRefType) 1st alternative
    // 6.e  (AltRefType) 2nd alternative
    // 6.f  (AltRefType) ...
    // 6.g  (qint32) 2st id of ref. type with alternatives
    // 6.h  (qint32) number of type alternatives
    // 6.i  (AltRefType) 1st alternative
    // 6.j  (AltRefType) 2nd alternative
    // 6.k  (AltRefType) ...
    // 6.l  ...
    // 7.a  (qint32) number of struct members with alternative types
    // 7.b  (qint32) 1st id of struct member with alternatives
    // 7.c  (qint32) id of belonging struct
    // 7.d  (qint32) number of type alternatives
    // 7.e  (AltRefType) 1st alternative
    // 7.f  (AltRefType) 2nd alternative
    // 7.g  (AltRefType) ...
    // 7.h  (qint32) 2st id of struct member with alternatives
    // 7.i  (qint32) id of belonging struct
    // 7.j  (qint32) number of type alternatives
    // 7.k  (AltRefType) 1st alternative
    // 7.l  (AltRefType) 2nd alternative
    // 7.m  (AltRefType) ...
    // 7.l  ...
    // 8.a  (qint32) number of variable with alternative types
    // 8.b  (qint32) 1st id of variable with alternatives
    // 8.c  (qint32) number of type alternatives
    // 8.d  (AltRefType) 1st alternative
    // 8.e  (AltRefType) 2nd alternative
    // 8.f  (AltRefType) ...
    // 8.g  (qint32) 2st id of variable with alternatives
    // 8.h  (qint32) number of type alternatives
    // 8.i  (AltRefType) 1st alternative
    // 8.j  (AltRefType) 2nd alternative
    // 8.k  (AltRefType) ...
    // 8.l  ...

//.........这里部分代码省略.........
开发者ID:wxdublin,项目名称:insight-vmi,代码行数:101,代码来源:kernelsymbolwriter.cpp


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