本文整理汇总了C++中DMetadata::getVideoInformation方法的典型用法代码示例。如果您正苦于以下问题:C++ DMetadata::getVideoInformation方法的具体用法?C++ DMetadata::getVideoInformation怎么用?C++ DMetadata::getVideoInformation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DMetadata
的用法示例。
在下文中一共展示了DMetadata::getVideoInformation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setCurrentItem
//.........这里部分代码省略.........
}
else if (itemInfo.downloaded == CamItemInfo::DownloadedYes)
{
str = i18n("Yes");
}
else
{
str = i18n("No");
}
d->labelAlreadyDownloaded->setAdjustedText(str);
// -- Photograph information ------------------------------------------
// Note: If something is changed here, please updated albumfiletip section too.
QString unavailable(i18n("<i>unavailable</i>"));
PhotoInfoContainer photoInfo = meta.getPhotographInformation();
if (photoInfo.isEmpty())
{
widget(1)->hide();
}
else
{
widget(1)->show();
}
ImagePropertiesTab::shortenedMakeInfo(photoInfo.make);
ImagePropertiesTab::shortenedModelInfo(photoInfo.model);
d->labelPhotoMake->setAdjustedText(photoInfo.make.isEmpty() ? unavailable : photoInfo.make);
d->labelPhotoModel->setAdjustedText(photoInfo.model.isEmpty() ? unavailable : photoInfo.model);
if (photoInfo.dateTime.isValid())
{
str = QLocale().toString(photoInfo.dateTime, QLocale::ShortFormat);
d->labelPhotoDateTime->setAdjustedText(str);
}
else
{
d->labelPhotoDateTime->setAdjustedText(unavailable);
}
d->labelPhotoLens->setAdjustedText(photoInfo.lens.isEmpty() ? unavailable : photoInfo.lens);
d->labelPhotoAperture->setAdjustedText(photoInfo.aperture.isEmpty() ? unavailable : photoInfo.aperture);
if (photoInfo.focalLength35mm.isEmpty())
{
d->labelPhotoFocalLength->setAdjustedText(photoInfo.focalLength.isEmpty() ? unavailable : photoInfo.focalLength);
}
else
{
str = i18n("%1 (%2)", photoInfo.focalLength, photoInfo.focalLength35mm);
d->labelPhotoFocalLength->setAdjustedText(str);
}
d->labelPhotoExposureTime->setAdjustedText(photoInfo.exposureTime.isEmpty() ? unavailable : photoInfo.exposureTime);
d->labelPhotoSensitivity->setAdjustedText(photoInfo.sensitivity.isEmpty() ? unavailable : i18n("%1 ISO", photoInfo.sensitivity));
if (photoInfo.exposureMode.isEmpty() && photoInfo.exposureProgram.isEmpty())
{
d->labelPhotoExposureMode->setAdjustedText(unavailable);
}
else if (!photoInfo.exposureMode.isEmpty() && photoInfo.exposureProgram.isEmpty())
{
d->labelPhotoExposureMode->setAdjustedText(photoInfo.exposureMode);
}
else if (photoInfo.exposureMode.isEmpty() && !photoInfo.exposureProgram.isEmpty())
{
d->labelPhotoExposureMode->setAdjustedText(photoInfo.exposureProgram);
}
else
{
str = QString::fromUtf8("%1 / %2").arg(photoInfo.exposureMode).arg(photoInfo.exposureProgram);
d->labelPhotoExposureMode->setAdjustedText(str);
}
d->labelPhotoFlash->setAdjustedText(photoInfo.flash.isEmpty() ? unavailable : photoInfo.flash);
d->labelPhotoWhiteBalance->setAdjustedText(photoInfo.whiteBalance.isEmpty() ? unavailable : photoInfo.whiteBalance);
// -- Video information ------------------------------------------
VideoInfoContainer videoInfo = meta.getVideoInformation();
if (videoInfo.isEmpty())
{
widget(2)->hide();
}
else
{
widget(2)->show();
}
d->labelVideoAspectRatio->setAdjustedText(videoInfo.aspectRatio.isEmpty() ? unavailable : videoInfo.aspectRatio);
d->labelVideoAudioBitRate->setAdjustedText(videoInfo.audioBitRate.isEmpty() ? unavailable : videoInfo.audioBitRate);
d->labelVideoAudioChannelType->setAdjustedText(videoInfo.audioChannelType.isEmpty() ? unavailable : videoInfo.audioChannelType);
d->labelVideoAudioCompressor->setAdjustedText(videoInfo.audioCompressor.isEmpty() ? unavailable : videoInfo.audioCompressor);
d->labelVideoDuration->setAdjustedText(videoInfo.duration.isEmpty() ? unavailable : videoInfo.duration);
d->labelVideoFrameRate->setAdjustedText(videoInfo.frameRate.isEmpty() ? unavailable : videoInfo.frameRate);
d->labelVideoVideoCodec->setAdjustedText(videoInfo.videoCodec.isEmpty() ? unavailable : videoInfo.videoCodec);
}