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


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

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


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

示例1: applyMetadata

void IPTCStatus::applyMetadata(QByteArray& iptcData)
{
    DMetadata meta;
    meta.setIptc(iptcData);

    if (d->objectNameCheck->isChecked())
        meta.setIptcTagString("Iptc.Application2.ObjectName", d->objectNameEdit->text());
    else
        meta.removeIptcTag("Iptc.Application2.ObjectName");

    if (d->statusCheck->isChecked())
        meta.setIptcTagString("Iptc.Application2.EditStatus", d->statusEdit->text());
    else
        meta.removeIptcTag("Iptc.Application2.EditStatus");

    if (d->JobIDCheck->isChecked())
        meta.setIptcTagString("Iptc.Application2.FixtureId", d->JobIDEdit->text());
    else
        meta.removeIptcTag("Iptc.Application2.FixtureId");

    if (d->specialInstructionCheck->isChecked())
        meta.setIptcTagString("Iptc.Application2.SpecialInstructions", d->specialInstructionEdit->toPlainText());
    else
        meta.removeIptcTag("Iptc.Application2.SpecialInstructions");

    iptcData = meta.getIptc();
}
开发者ID:KDE,项目名称:digikam,代码行数:27,代码来源:iptcstatus.cpp

示例2: applyMetadata

void IPTCSubjects::applyMetadata(QByteArray& iptcData)
{
    DMetadata meta;
    meta.setIptc(iptcData);
    QStringList newSubjects = subjectsList();

    if (m_subjectsCheck->isChecked())
        meta.setIptcSubjects(meta.getIptcSubjects(), newSubjects);
    else
        meta.setIptcSubjects(meta.getIptcSubjects(), QStringList());

    iptcData = meta.getIptc();
}
开发者ID:,项目名称:,代码行数:13,代码来源:

示例3: applyMetadata

void IPTCKeywords::applyMetadata(QByteArray& iptcData)
{
    DMetadata meta;
    meta.setIptc(iptcData);
    QStringList newKeywords;

    for (int i = 0 ; i < d->keywordsBox->count(); ++i)
    {
        QListWidgetItem* const item = d->keywordsBox->item(i);
        newKeywords.append(item->text());
    }

    if (d->keywordsCheck->isChecked())
        meta.setIptcKeywords(d->oldKeywords, newKeywords);
    else
        meta.setIptcKeywords(d->oldKeywords, QStringList());

    iptcData = meta.getIptc();
}
开发者ID:KDE,项目名称:digikam,代码行数:19,代码来源:iptckeywords.cpp

示例4: apply

void IPTCEditWidget::apply()
{
    if (d->modified && !d->isReadOnly)
    {
        d->contentPage->applyMetadata(d->exifData, d->iptcData);
        d->originPage->applyMetadata(d->exifData, d->iptcData);
        d->creditsPage->applyMetadata(d->iptcData);
        d->subjectsPage->applyMetadata(d->iptcData);
        d->keywordsPage->applyMetadata(d->iptcData);
        d->categoriesPage->applyMetadata(d->iptcData);
        d->statusPage->applyMetadata(d->iptcData);
        d->propertiesPage->applyMetadata(d->iptcData);
        d->envelopePage->applyMetadata(d->iptcData);

        DMetadata meta;

        meta.load((*d->dlg->currentItem()).path());
        meta.setExif(d->exifData);
        meta.setIptc(d->iptcData);
        meta.save((*d->dlg->currentItem()).path());
        d->modified = false;
    }
}
开发者ID:Match-Yang,项目名称:digikam,代码行数:23,代码来源:iptceditwidget.cpp

示例5: readMetadata

void IPTCKeywords::readMetadata(QByteArray& iptcData)
{
    blockSignals(true);
    DMetadata meta;
    meta.setIptc(iptcData);
    d->oldKeywords = meta.getIptcKeywords();

    d->keywordsBox->clear();
    d->keywordsCheck->setChecked(false);

    if (!d->oldKeywords.isEmpty())
    {
        d->keywordsBox->insertItems(0, d->oldKeywords);
        d->keywordsCheck->setChecked(true);
    }

    d->keywordEdit->setEnabled(d->keywordsCheck->isChecked());
    d->keywordsBox->setEnabled(d->keywordsCheck->isChecked());
    d->addKeywordButton->setEnabled(d->keywordsCheck->isChecked());
    d->delKeywordButton->setEnabled(d->keywordsCheck->isChecked());

    blockSignals(false);
}
开发者ID:KDE,项目名称:digikam,代码行数:23,代码来源:iptckeywords.cpp

示例6: readMetadata

void IPTCSubjects::readMetadata(QByteArray& iptcData)
{
    DMetadata meta;
    meta.setIptc(iptcData);
    setSubjectsList(meta.getIptcSubjects());
}
开发者ID:,项目名称:,代码行数:6,代码来源:


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