本文整理汇总了C++中DMetadata::getImageTagsPath方法的典型用法代码示例。如果您正苦于以下问题:C++ DMetadata::getImageTagsPath方法的具体用法?C++ DMetadata::getImageTagsPath怎么用?C++ DMetadata::getImageTagsPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DMetadata
的用法示例。
在下文中一共展示了DMetadata::getImageTagsPath方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testSimpleReadAfterWrite
void TagsReadWriteTest::testSimpleReadAfterWrite()
{
DMetadata dmeta;
QStringList tagPaths2;
dmeta.setImageTagsPath(this->tagSet1);
dmeta.getImageTagsPath(tagPaths2);
QCOMPARE(tagSet1, tagPaths2);
}
示例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 = QLatin1String("/");
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 = QLatin1String("|");
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(QLatin1String(DM_TAG_CONTAINER)).clear();
dmsettings.getReadMapping(QLatin1String(DM_TAG_CONTAINER))
<< tagNs2
<< tagNs3;
dmeta.setXmpTagStringBag("Xmp.MicrosoftPhoto.LastKeywordXMP", tagSet1);
dmeta.setXmpTagStringBag("Xmp.lr.hierarchicalSubject", tagSet2);
dmeta.getImageTagsPath(actual, dmsettings);
QCOMPARE(actual, tagSet2);
}
示例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 = QLatin1String("|");
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(QLatin1String(DM_TAG_CONTAINER)).clear();
dmsettings.getReadMapping(QLatin1String(DM_TAG_CONTAINER))
<< tagNs3;
toWrite = tagSet1;
toWrite = toWrite.replaceInStrings(QLatin1String("/"),QLatin1String("|"));
dmeta.setXmpTagStringSeq("Xmp.lr.HierarchicalSubject",toWrite, false);
// We write some data to alternative namespace
reference = dmeta.getXmpTagStringSeq("Xmp.lr.HierarchicalSubject", false);
QCOMPARE(reference, toWrite);
dmeta.getImageTagsPath(actual, dmsettings);
QCOMPARE(actual, tagSet1);
}