Esempio n. 1
0
KExiv2::AltLangMap CaptionsMap::datesList() const
{
    KExiv2::AltLangMap map;

    for (CaptionsMap::const_iterator it = constBegin(); it != constEnd(); ++it)
    {
        map.insert(it.key(), (*it).date.toString(Qt::ISODate));
    }

    return map;
}
Esempio n. 2
0
KExiv2::AltLangMap CaptionsMap::toAltLangMap() const
{
    KExiv2::AltLangMap map;

    for (CaptionsMap::const_iterator it = constBegin(); it != constEnd(); ++it)
    {
        map.insert(it.key(), (*it).caption);
    }

    return map;
}
Esempio n. 3
0
bool AltLangStringsEdit::getValues(KExiv2::AltLangMap& oldValues,
                                   KExiv2::AltLangMap& newValues)
{
    oldValues = d->oldValues;

    newValues.clear();
    for (int i = 0 ; i < d->valueBox->count(); i++)
    {
        QListWidgetItem *item = d->valueBox->item(i);
        QString lang          = item->text().left(item->text().indexOf("] "));
        lang.remove(0, 1);
        QString text          = item->text().remove(0, lang.size()+3);
        newValues.insert(lang, text);
    }

    return d->valueCheck->isChecked();
}