本文整理汇总了C++中Sheet::addPartGroup方法的典型用法代码示例。如果您正苦于以下问题:C++ Sheet::addPartGroup方法的具体用法?C++ Sheet::addPartGroup怎么用?C++ Sheet::addPartGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sheet
的用法示例。
在下文中一共展示了Sheet::addPartGroup方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testNestedPartGroups
void testNestedPartGroups()
{
Sheet* sheet = new Sheet();
sheet->addBar();
for (int i = 0; i < 7; i++) {
sheet->addPart(QString("part %1").arg(i));
}
sheet->addPartGroup(0, 1)->setName("group 1");
sheet->addPartGroup(1, 2)->setName("group 2");
sheet->addPartGroup(2, 3)->setName("group 3");
sheet->addPartGroup(0, 6)->setName("group 4");
sheet->addPartGroup(4, 5)->setName("group 5");
sheet->addPartGroup(4, 5)->setName("group 6");
validateOutput(sheet, "nestedpartgroups.xml");
delete sheet;
}
示例2: testPartGroups
void testPartGroups()
{
Sheet* sheet = new Sheet();
sheet->addBar();
for (int i = 0; i < 8; i++) {
sheet->addPart(QString("part %1").arg(i));
}
PartGroup* pg = sheet->addPartGroup(0, 1);
pg->setName("group 1");
pg = sheet->addPartGroup(2, 3);
pg->setSymbol(PartGroup::Brace);
pg = sheet->addPartGroup(4, 5);
pg->setSymbol(PartGroup::Line);
pg = sheet->addPartGroup(6, 7);
pg->setSymbol(PartGroup::Bracket);
pg->setCommonBarLines(false);
validateOutput(sheet, "partgroups.xml");
delete sheet;
}