本文整理汇总了C++中Disk::track方法的典型用法代码示例。如果您正苦于以下问题:C++ Disk::track方法的具体用法?C++ Disk::track怎么用?C++ Disk::track使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Disk
的用法示例。
在下文中一共展示了Disk::track方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testOutFormatEncoderArgs
void TestFlacon::testOutFormatEncoderArgs()
{
QFETCH(QString, formatId);
QFETCH(SettingsValues, config);
QFETCH(QString, expected);
applySettings(config);
foreach (OutFormat *format, OutFormat::allFormats())
{
if (format->id() != formatId)
continue;
Disk *disk = standardDisk();
QStringList args = format->encoderArgs(disk->track(0), "OutFile.wav");
QString result = args.join(" ");
if (result != expected)
{
QString msg = QString("Compared values are not the same\n Format %1\n Actual: %2\n Expected: %3").arg(
formatId,
result,
expected);
QFAIL(msg.toLocal8Bit());
}
return;
}
FAIL(QString("Unknown format \"%1\"").arg(formatId).toLocal8Bit());
}
示例2: initGlobalTags
void CueCreator::initGlobalTags()
{
QStringList tagNames;
tagNames << TAG_GENRE;
tagNames << TAG_DATE;
tagNames << TAG_PERFORMER;
tagNames << TAG_SONGWRITER;
tagNames << TAG_ALBUM;
Track *firstTrack = mDisk->track(0);
foreach(QString tagName, tagNames)
{
QString value = firstTrack->tag(tagName);
for (int i=1; i<mDisk->count(); ++i)
{
if (mDisk->track(i)->tag(tagName) != value)
value = "";
}
mGlobalTags.insert(tagName, value);
}
示例3: index
QModelIndex TrackViewModel::index(int row, int column, const QModelIndex &parent) const
{
if (!hasIndex(row, column, parent))
return QModelIndex();
if (parent.internalPointer() == project)
return createIndex(row, column, project->disk(row));
QObject *obj = static_cast<QObject*>(parent.internalPointer());
Disk *disk = qobject_cast<Disk*>(obj);
if(disk)
return createIndex(row, column, disk->track(row));
else
return createIndex(row, column, project->disk(row));
return QModelIndex();
}