本文整理汇总了C++中Bar::addStaffElement方法的典型用法代码示例。如果您正苦于以下问题:C++ Bar::addStaffElement方法的具体用法?C++ Bar::addStaffElement怎么用?C++ Bar::addStaffElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bar
的用法示例。
在下文中一共展示了Bar::addStaffElement方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KoFrameShape
MusicShape::MusicShape()
: KoFrameShape("http://www.koffice.org/music", "shape"),
m_firstSystem(0),
m_style(new MusicStyle),
m_engraver(new Engraver()),
m_renderer(new MusicRenderer(m_style)),
m_successor(0),
m_predecessor(0)
{
/* kDebug() << "firstShape:" << firstShape << "this:" << this;
if (firstShape) {
firstShape->m_successor = this;
m_predecessor = firstShape;
m_sheet = firstShape->m_sheet;
m_firstSystem = firstShape->m_lastSystem+1;
m_engraver->engraveSheet(m_sheet, m_firstSystem, QSizeF(1e9, 1e9), true, &m_lastSystem);
firstShape = this;
} else {
firstShape = this;*/
m_sheet = new Sheet();
Bar* bar = m_sheet->addBar();
Part* part = m_sheet->addPart("Part 1");
Staff* staff = part->addStaff();
part->addVoice();
bar->addStaffElement(new Clef(staff, 0, Clef::Trebble, 2, 0));
bar->addStaffElement(new TimeSignature(staff, 0, 4, 4));
// add some more default bars
for (int i = 0; i < 9; i++) {
m_sheet->addBar();
}
m_engraver->engraveSheet(m_sheet, 0, QSizeF(1e9, 1e9), true, &m_lastSystem);
// }
}