Esempio n. 1
0
void CaptionsMap::fromAltLangMap(const KExiv2::AltLangMap& map)
{
    clear();

    for (KExiv2::AltLangMap::const_iterator it = map.constBegin(); it != map.constEnd(); ++it)
    {
        CaptionValues val;
        val.caption = it.value();
        insert(it.key(), val);
    }
}
Esempio n. 2
0
void CaptionsMap::setDatesList(const KExiv2::AltLangMap& map)
{
    for (KExiv2::AltLangMap::const_iterator it = map.constBegin(); it != map.constEnd(); ++it)
    {
        CaptionsMap::iterator val = find(it.key());

        if (val != end())
        {
            (*val).date = QDateTime::fromString(it.value(), Qt::ISODate);
        }
    }
}
Esempio n. 3
0
void CaptionsMap::setAuthorsList(const KExiv2::AltLangMap& map, const QString& commonAuthor)
{
    for (CaptionsMap::iterator it = begin(); it != end(); ++it)
    {
        KExiv2::AltLangMap::const_iterator authorIt = map.find(it.key());

        if (authorIt != map.constEnd())
        {
            (*it).author = authorIt.value();
        }
        else if (!commonAuthor.isNull())
        {
            (*it).author = commonAuthor;
        }
    }
}