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


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

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


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

示例1: applyMetadata

void XMPSubjects::applyMetadata(QByteArray& xmpData)
{
    DMetadata meta;
    meta.setXmp(xmpData);
    QStringList newSubjects = subjectsList();

    // We remove in first all existing subjects.
    meta.removeXmpTag("Xmp.iptc.SubjectCode");

    // And add new list if necessary.
    if (m_subjectsCheck->isChecked())
        meta.setXmpSubjects(newSubjects);

    xmpData = meta.getXmp();
}
开发者ID:KDE,项目名称:digikam,代码行数:15,代码来源:xmpsubjects.cpp

示例2: applyMetadata

void XMPCredits::applyMetadata(QByteArray& xmpData)
{
    QStringList oldList, newList;
    DMetadata meta;
    meta.setXmp(xmpData);

    if (d->bylineEdit->getValues(oldList, newList))
        meta.setXmpTagStringSeq("Xmp.dc.creator", newList);
    else
        meta.removeXmpTag("Xmp.dc.creator");

    if (d->bylineTitleCheck->isChecked())
        meta.setXmpTagString("Xmp.photoshop.AuthorsPosition", d->bylineTitleEdit->text());
    else
        meta.removeXmpTag("Xmp.photoshop.AuthorsPosition");

    // --------------------------------------------------------

    if (d->emailCheck->isChecked())
    {
        meta.setXmpTagString("Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiEmailWork", d->emailEdit->text());
        meta.removeXmpTag("Xmp.iptc.CiEmailWork");
    }
    else
    {
        meta.removeXmpTag("Xmp.iptc.CiEmailWork");
        meta.removeXmpTag("Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiEmailWork");
    }

    if (d->urlCheck->isChecked())
    {
        meta.setXmpTagString("Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiUrlWork", d->urlEdit->text());
        meta.removeXmpTag("Xmp.iptc.CiUrlWork");
    }
    else
    {
        meta.removeXmpTag("Xmp.iptc.CiUrlWork");
        meta.removeXmpTag("Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiUrlWork");
    }

    if (d->phoneCheck->isChecked())
    {
        meta.setXmpTagString("Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiTelWork", d->phoneEdit->text());
        meta.removeXmpTag("Xmp.iptc.CiTelWork");
    }
    else
    {
        meta.removeXmpTag("Xmp.iptc.CiTelWork");
        meta.removeXmpTag("Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiTelWork");
    }

    if (d->addressCheck->isChecked())
    {
        meta.setXmpTagString("Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrExtadr", d->addressEdit->text());
        meta.removeXmpTag("Xmp.iptc.CiAdrExtadr");
    }
    else
    {
        meta.removeXmpTag("Xmp.iptc.CiAdrExtadr");
        meta.removeXmpTag("Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrExtadr");
    }

    if (d->postalCodeCheck->isChecked())
    {
        meta.setXmpTagString("Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrPcode", d->postalCodeEdit->text());
        meta.removeXmpTag("Xmp.iptc.CiAdrPcode");
    }
    else
    {
        meta.removeXmpTag("Xmp.iptc.CiAdrPcode");
        meta.removeXmpTag("Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrPcode");
    }

    if (d->cityCheck->isChecked())
    {
        meta.setXmpTagString("Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrCity", d->cityEdit->text());
        meta.removeXmpTag("Xmp.iptc.CiAdrCity");
    }
    else
    {
        meta.removeXmpTag("Xmp.iptc.CiAdrCity");
        meta.removeXmpTag("Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrCity");
    }

    if (d->countryCheck->isChecked())
    {
        meta.setXmpTagString("Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrCtry", d->countryEdit->text());
        meta.removeXmpTag("Xmp.iptc.CiAdrCtry");
    }
    else
    {
        meta.removeXmpTag("Xmp.iptc.CiAdrCtry");
        meta.removeXmpTag("Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiAdrCtry");
    }

    // --------------------------------------------------------

    if (d->creditCheck->isChecked())
        meta.setXmpTagString("Xmp.photoshop.Credit", d->creditEdit->text());
    else
//.........这里部分代码省略.........
开发者ID:KDE,项目名称:digikam,代码行数:101,代码来源:xmpcredits.cpp


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