本文整理汇总了C++中PropertyName::getName方法的典型用法代码示例。如果您正苦于以下问题:C++ PropertyName::getName方法的具体用法?C++ PropertyName::getName怎么用?C++ PropertyName::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropertyName
的用法示例。
在下文中一共展示了PropertyName::getName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getByte
static MidiByte getByte(const Event &e, const PropertyName &name) {
long value = -1;
try {
value = e.get<Int>(name);
} catch (...) { }
if (value < 0 || value > 255) throw MIDIValueOutOfRange(name.getName());
return MidiByte(value);
}
示例2: NoData
string
Event::getAsString(const PropertyName &name) const
// throw (NoData)
{
PropertyMap::const_iterator i;
const PropertyMap *map = find(name, i);
if (map) {
return i->second->unparse();
} else {
throw NoData(name.getName(), __FILE__, __LINE__);
}
}
示例3: PropertyControlRuler
void
ControlRulerWidget::slotAddPropertyRuler(const PropertyName &propertyName)
{
if (!m_viewSegment) return;
PropertyControlRuler *controlruler = new PropertyControlRuler(propertyName, m_viewSegment, m_scale, this);
controlruler->setXOffset(m_gutter);
controlruler->updateSelection(&m_selectedElements);
// little kludge here, we only have the one property ruler, and the string
// "velocity" wasn't already in a context (any context) where it could be
// translated, and "velocity" doesn't look good with "PitchBend" or "Reverb"
// so we address a number of little problems thus:
QString name = QString::fromStdString(propertyName.getName());
if (name == "velocity") name = tr("Velocity");
addRuler(controlruler, name);
}