本文整理汇总了C++中Note::getDots方法的典型用法代码示例。如果您正苦于以下问题:C++ Note::getDots方法的具体用法?C++ Note::getDots怎么用?C++ Note::getDots使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Note
的用法示例。
在下文中一共展示了Note::getDots方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addDots
QString
NotationStrings::getAmericanName(Note note, bool plural, bool triplet)
{
Note::Type type = note.getNoteType();
int dots = note.getDots();
static const QString names[] = {
"sixty-fourth note", "thirty-second note",
"sixteenth note", "eighth note",
"quarter note", "half note",
"whole note", "double whole note"
};
static const QString pluralnames[] = {
"sixty-fourth notes", "thirty-second notes",
"sixteenth notes", "eighth notes",
"quarter notes", "half notes",
"whole notes", "double whole notes"
};
if (plural && triplet) {
return addDots(QString("%1 triplets").arg(names[type]), dots, false, false);
} else if (plural) {
return addDots(pluralnames[type], dots, false, false);
} else if (triplet) {
return addDots(QString("%1 triplet").arg(names[type]), dots, false, false);
} else {
return addDots(names[type], dots, false, false);
}
}
示例2: name
QString
NotationStrings::getReferenceName(Note note, bool isRest)
{
Note::Type type = note.getNoteType();
int dots = note.getDots();
static const QString names[] = {
"hemidemisemi", "demisemi", "semiquaver",
"quaver", "crotchet", "minim", "semibreve", "breve"
};
QString name(names[type]);
if (isRest) name = "rest-" + name;
return addDots(name, dots, true, false);
}