Beispiel #1
0
KExiv2::TagsMap KExiv2::getIptcTagsList() const
{
    try
    {
        QList<const Exiv2::DataSet*> tags;
        tags << Exiv2::IptcDataSets::envelopeRecordList()
             << Exiv2::IptcDataSets::application2RecordList();

        TagsMap tagsMap;
        for (QList<const Exiv2::DataSet*>::iterator it = tags.begin(); it != tags.end(); ++it)
        {
            do
            {
                QString     key = QLatin1String( Exiv2::IptcKey( (*it)->number_, (*it)->recordId_ ).key().c_str() );
                QStringList values;
                values << (*it)->name_ << (*it)->title_ << (*it)->desc_;
                tagsMap.insert(key, values);
                ++(*it);
            }
            while((*it)->number_ != 0xffff);
        }
        return tagsMap;
    }
    catch( Exiv2::Error& e )
    {
        d->printExiv2ExceptionError("Cannot get Iptc Tags list using Exiv2 ", e);
    }

    return TagsMap();
}
Beispiel #2
0
VersionInfo::TagsMap VersionInfo::GetTagsDiff(const TagsMap& from, const VersionInfo::TagsMap& what)
{
    TagsMap result;

    for (TagsMap::const_iterator it = from.begin(); it != from.end(); it++)
    {
        if (what.find( it->first ) == what.end())
        {
            result.insert(TagsMap::value_type(it->first,it->second));
        }
    }

    return result;
}
Beispiel #3
0
VersionInfo::TagsMap VersionInfo::GetTags(uint32 minVersion) const
{
    TagsMap tags;

    for (VersionMap::const_iterator itVersion = versionMap.begin(); itVersion != versionMap.end(); ++itVersion)
    {
        if (itVersion->first < minVersion)
            continue;

        const SceneVersion& version = itVersion->second;
        tags.insert(version.tags.begin(), version.tags.end());
    }

    return tags;
}