本文整理汇总了C++中meta::TrackPtr::createDate方法的典型用法代码示例。如果您正苦于以下问题:C++ TrackPtr::createDate方法的具体用法?C++ TrackPtr::createDate怎么用?C++ TrackPtr::createDate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类meta::TrackPtr
的用法示例。
在下文中一共展示了TrackPtr::createDate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: valueForField
QVariant Meta::valueForField( qint64 field, Meta::TrackPtr track )
{
if( !track )
return QVariant();
switch( field )
{
case 0:
{
// that is the simple search for MetaQueryWidget
QSet<QString> allInfos;
allInfos += track->playableUrl().path()
+= track->name()
+= track->comment();
if( track->artist() )
allInfos += track->artist()->name();
if( track->album() )
allInfos += track->album()->name();
if( track->genre() )
allInfos += track->genre()->name();
return QVariant( allInfos.toList() );
}
case Meta::valUrl: return track->playableUrl().path();
case Meta::valTitle: return track->name();
case Meta::valArtist: return track->artist() ?
QVariant(track->artist()->name()) : QVariant();
case Meta::valAlbum: return track->album() ?
QVariant(track->album()->name()) : QVariant();
case Meta::valGenre: return track->genre() ?
QVariant(track->genre()->name()) : QVariant();
case Meta::valComposer: return track->composer() ?
QVariant(track->composer()->name()) : QVariant();
case Meta::valYear: return track->year() ?
QVariant(track->year()->name().toInt()) : QVariant();
case Meta::valComment: return track->comment();
case Meta::valTrackNr: return track->trackNumber();
case Meta::valDiscNr: return track->discNumber();
case Meta::valBpm: return track->bpm();
case Meta::valLength: return track->length();
case Meta::valBitrate: return track->bitrate();
case Meta::valSamplerate: return track->sampleRate();
case Meta::valFilesize: return track->filesize();
case Meta::valFormat: return int(Amarok::FileTypeSupport::fileType(track->type()));
case Meta::valCreateDate: return track->createDate();
case Meta::valScore: return track->statistics()->score();
case Meta::valRating: return track->statistics()->rating();
case Meta::valFirstPlayed: return track->statistics()->firstPlayed();
case Meta::valLastPlayed: return track->statistics()->lastPlayed();
case Meta::valPlaycount: return track->statistics()->playCount();
case Meta::valUniqueId: return track->uidUrl();
// todo
case Meta::valTrackGain: return "track gain";
case Meta::valTrackGainPeak: return "track gain peak";
case Meta::valAlbumGain: return "album gain";
case Meta::valAlbumGainPeak: return "album gain peak";
case Meta::valAlbumArtist: return (track->album() && track->album()->albumArtist()) ?
QVariant(track->album()->albumArtist()->name()) : QVariant();
case Meta::valLabel:
{
Meta::LabelList labels = track->labels();
QStringList strLabels;
foreach( Meta::LabelPtr label, labels )
strLabels.append( label->name() );
return QVariant( strLabels );
}
case Meta::valModified: return track->modifyDate();
default: return QVariant();
}
}