本文整理汇总了C++中TimeSig::generated方法的典型用法代码示例。如果您正苦于以下问题:C++ TimeSig::generated方法的具体用法?C++ TimeSig::generated怎么用?C++ TimeSig::generated使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TimeSig
的用法示例。
在下文中一共展示了TimeSig::generated方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setElement
void InspectorTimeSig::setElement()
{
InspectorElementBase::setElement();
TimeSig* ts = toTimeSig(inspector->element());
if (ts->generated())
t.showCourtesy->setEnabled(false);
}
示例2: createElementPropertyMenu
void ScoreView::createElementPropertyMenu(Element* e, QMenu* popup)
{
if (e->type() == Element::BAR_LINE) {
genPropertyMenu1(e, popup);
}
else if (e->type() == Element::ARTICULATION) {
genPropertyMenu1(e, popup);
popup->addAction(tr("Articulation Properties..."))->setData("a-props");
}
else if (e->type() == Element::BEAM) {
popup->addAction(getAction("flip"));
}
else if (e->type() == Element::STEM) {
popup->addAction(getAction("flip"));
}
else if (e->type() == Element::HOOK) {
popup->addAction(getAction("flip"));
}
else if (e->type() == Element::BEND) {
genPropertyMenu1(e, popup);
popup->addAction(tr("Bend Properties..."))->setData("b-props");
}
else if (e->type() == Element::TREMOLOBAR) {
genPropertyMenu1(e, popup);
popup->addAction(tr("TremoloBar Properties..."))->setData("tr-props");
}
else if (e->type() == Element::HBOX) {
QMenu* textMenu = popup->addMenu(tr("Add"));
textMenu->addAction(getAction("frame-text"));
textMenu->addAction(getAction("picture"));
popup->addAction(tr("Frame Properties..."))->setData("f-props");
}
else if (e->type() == Element::VBOX) {
QMenu* textMenu = popup->addMenu(tr("Add"));
textMenu->addAction(getAction("frame-text"));
textMenu->addAction(getAction("title-text"));
textMenu->addAction(getAction("subtitle-text"));
textMenu->addAction(getAction("composer-text"));
textMenu->addAction(getAction("poet-text"));
textMenu->addAction(getAction("insert-hbox"));
textMenu->addAction(getAction("picture"));
popup->addAction(tr("Frame Properties..."))->setData("f-props");
}
else if (e->type() == Element::TBOX) {
popup->addAction(tr("Frame Properties..."))->setData("f-props");
}
else if (e->type() == Element::VOLTA_SEGMENT) {
genPropertyMenu1(e, popup);
popup->addAction(tr("Volta Properties..."))->setData("v-props");
}
else if (e->type() == Element::TIMESIG) {
genPropertyMenu1(e, popup);
TimeSig* ts = static_cast<TimeSig*>(e);
int _track = ts->track();
// if the time sig. is not generated (= not courtesy) and is in track 0
// add the specific menu item
QAction* a;
if (!ts->generated() && !_track) {
a = popup->addAction(ts->showCourtesySig()
? QT_TRANSLATE_NOOP("TimeSig", "Hide Courtesy Time Signature")
: QT_TRANSLATE_NOOP("TimeSig", "Show Courtesy Time Signature") );
a->setData("ts-courtesy");
}
popup->addSeparator();
popup->addAction(tr("Time Signature Properties..."))->setData("ts-props");
}
else if (e->type() == Element::ACCIDENTAL) {
Accidental* acc = static_cast<Accidental*>(e);
genPropertyMenu1(e, popup);
QAction* a = popup->addAction(QT_TRANSLATE_NOOP("Properties", "small"));
a->setCheckable(true);
a->setChecked(acc->small());
a->setData("smallAcc");
}
else if (e->type() == Element::CLEF) {
genPropertyMenu1(e, popup);
// if the clef is not generated (= not courtesy) add the specific menu item
if (!e->generated()) {
QAction* a = popup->addAction(static_cast<Clef*>(e)->showCourtesy()
? QT_TRANSLATE_NOOP("Clef", "Hide courtesy clef")
: QT_TRANSLATE_NOOP("Clef", "Show courtesy clef") );
a->setData("clef-courtesy");
}
}
else if (e->type() == Element::DYNAMIC) {
popup->addSeparator();
if (e->visible())
popup->addAction(tr("Set Invisible"))->setData("invisible");
else
popup->addAction(tr("Set Visible"))->setData("invisible");
popup->addAction(tr("MIDI Properties..."))->setData("d-dynamics");
popup->addAction(tr("Text Properties..."))->setData("d-props");
}
else if (e->type() == Element::TEXTLINE_SEGMENT
|| e->type() == Element::OTTAVA_SEGMENT
|| e->type() == Element::VOLTA_SEGMENT
|| e->type() == Element::PEDAL_SEGMENT) {
if (e->visible())
popup->addAction(tr("Set Invisible"))->setData("invisible");
else
//.........这里部分代码省略.........