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


C++ UniversalId::getTypeName方法代码示例

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


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

示例1: id

CSVWorld::IdTypeDelegateFactory::IdTypeDelegateFactory()
{
    for (int i=0; i<CSMWorld::UniversalId::NumberOfTypes; ++i)
    {
        CSMWorld::UniversalId id (static_cast<CSMWorld::UniversalId::Type> (i));

        DataDisplayDelegateFactory::add (id.getType(), QString::fromUtf8 (id.getTypeName().c_str()),
            QString::fromUtf8 (id.getIcon().c_str()));
    }
}
开发者ID:0xmono,项目名称:openmw,代码行数:10,代码来源:idtypedelegate.cpp

示例2: if

std::string CSMTools::MagicEffectCheckStage::checkReferenceable(const std::string &id, 
                                                                const CSMWorld::UniversalId &type, 
                                                                const std::string &column) const
{
    std::string error;
    if (!id.empty())
    {
        CSMWorld::RefIdData::LocalIndex index = mReferenceables.getDataSet().searchId(id);
        if (index.first == -1)
        {
            error = "No such " + column + " '" + id + "'";
        }
        else if (index.second != type.getType())
        {
            error = column + " is not of type " + type.getTypeName();
        }
    }
    return error;
}
开发者ID:Allofich,项目名称:openmw,代码行数:19,代码来源:magiceffectcheck.cpp

示例3: id

CSVWorld::ReferenceableCreator::ReferenceableCreator (CSMWorld::Data& data, QUndoStack& undoStack,
    const CSMWorld::UniversalId& id)
: GenericCreator (data, undoStack, id)
{
    QLabel *label = new QLabel ("Type", this);
    insertBeforeButtons (label, false);

    std::vector<CSMWorld::UniversalId::Type> types = CSMWorld::UniversalId::listReferenceableTypes();

    mType = new QComboBox (this);

    for (std::vector<CSMWorld::UniversalId::Type>::const_iterator iter (types.begin());
         iter!=types.end(); ++iter)
    {
        CSMWorld::UniversalId id (*iter, "");

        mType->addItem (QIcon (id.getIcon().c_str()), id.getTypeName().c_str(),
            static_cast<int> (id.getType()));
    }

    insertBeforeButtons (mType, false);
}
开发者ID:0xmono,项目名称:openmw,代码行数:22,代码来源:referenceablecreator.cpp


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