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


C++ DMetadata::getItemTagsPath方法代码示例

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


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

示例1: testSimpleReadAfterWrite

void TagsReadWriteTest::testSimpleReadAfterWrite()
{
    DMetadata dmeta;
    QStringList tagPaths2;

    dmeta.setItemTagsPath(this->tagSet1);
    dmeta.getItemTagsPath(tagPaths2);

    QCOMPARE(tagSet1, tagPaths2);
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例2: testReadFromDisabledNamespaces

void TagsReadWriteTest::testReadFromDisabledNamespaces()
{
    DMetadata dmeta;

    DMetadataSettingsContainer dmsettings;
    QStringList actual;

    NamespaceEntry tagNs2;
    tagNs2.namespaceName = QLatin1String("Xmp.MicrosoftPhoto.LastKeywordXMP");
    tagNs2.tagPaths      = NamespaceEntry::TAGPATH;
    tagNs2.separator     = QLatin1Char('/');
    tagNs2.nsType        = NamespaceEntry::TAGS;
    tagNs2.index         = 1;
    tagNs2.specialOpts   = NamespaceEntry::TAG_XMPBAG;
    tagNs2.subspace      = NamespaceEntry::XMP;
    tagNs2.isDisabled    = true;

    NamespaceEntry tagNs3;
    tagNs3.namespaceName   = QLatin1String("Xmp.lr.hierarchicalSubject");
    tagNs3.tagPaths        = NamespaceEntry::TAGPATH;
    tagNs3.separator       = QLatin1Char('|');
    tagNs3.nsType          = NamespaceEntry::TAGS;
    tagNs3.index           = 2;
    tagNs3.specialOpts     = NamespaceEntry::TAG_XMPBAG;
    tagNs3.subspace        = NamespaceEntry::XMP;
    tagNs3.alternativeName = QLatin1String("Xmp.lr.HierarchicalSubject");
    tagNs3.secondNameOpts  = NamespaceEntry::TAG_XMPSEQ;

    dmsettings.getReadMapping(QString::fromUtf8(DM_TAG_CONTAINER)).clear();
    dmsettings.getReadMapping(QString::fromUtf8(DM_TAG_CONTAINER))
             << tagNs2
             << tagNs3;

    dmeta.setXmpTagStringBag("Xmp.MicrosoftPhoto.LastKeywordXMP", tagSet1);

    dmeta.setXmpTagStringBag("Xmp.lr.hierarchicalSubject", tagSet2);

    dmeta.getItemTagsPath(actual, dmsettings);

    QCOMPARE(actual, tagSet2);
}
开发者ID:,项目名称:,代码行数:41,代码来源:

示例3: testTagReadAlternativeNameSpace

void TagsReadWriteTest::testTagReadAlternativeNameSpace()
{
    DMetadata dmeta;

    DMetadataSettingsContainer dmsettings;
    QStringList toWrite;
    QStringList actual;
    QStringList reference;

    NamespaceEntry tagNs3;
    tagNs3.namespaceName   = QLatin1String("Xmp.lr.hierarchicalSubject");
    tagNs3.tagPaths        = NamespaceEntry::TAGPATH;
    tagNs3.separator       = QLatin1Char('|');
    tagNs3.nsType          = NamespaceEntry::TAGS;
    tagNs3.index           = 2;
    tagNs3.specialOpts     = NamespaceEntry::TAG_XMPBAG;
    tagNs3.subspace        = NamespaceEntry::XMP;
    tagNs3.alternativeName = QLatin1String("Xmp.lr.HierarchicalSubject");
    tagNs3.secondNameOpts  = NamespaceEntry::TAG_XMPSEQ;

    dmsettings.getReadMapping(QString::fromUtf8(DM_TAG_CONTAINER)).clear();
    dmsettings.getReadMapping(QString::fromUtf8(DM_TAG_CONTAINER))
             << tagNs3;

    toWrite   = tagSet1;
    toWrite   = toWrite.replaceInStrings(QLatin1String("/"), QLatin1String("|"));

    dmeta.setXmpTagStringSeq("Xmp.lr.HierarchicalSubject", toWrite);

    // We write some data to alternative namespace
    reference = dmeta.getXmpTagStringSeq("Xmp.lr.HierarchicalSubject", false);

    QCOMPARE(reference, toWrite);

    dmeta.getItemTagsPath(actual, dmsettings);

    QCOMPARE(actual, tagSet1);
}
开发者ID:,项目名称:,代码行数:38,代码来源:


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