TextProperties::TextProperties(Text* t, QWidget* parent) : QDialog(parent) { setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowTitle(tr("MuseScore: Text Properties")); QGridLayout* layout = new QGridLayout; tp = new TextProp; tp->setScore(false, t->score()); layout->addWidget(tp, 0, 1); QHBoxLayout* hb = new QHBoxLayout; QDialogButtonBox* bb = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); hb->addWidget(bb); layout->addLayout(hb, 1, 1); setLayout(layout); text = t; tp->setStyle(t->textStyleType(), t->textStyle()); connect(bb, SIGNAL(accepted()), SLOT(accept())); connect(bb, SIGNAL(rejected()), SLOT(reject())); connect(tp, SIGNAL(resetToStyleClicked()), SLOT(resetToStyle())); }
InspectorText::InspectorText(QWidget* parent) : InspectorElementBase(parent) { t.setupUi(addWidget()); iList.push_back({ P_ID::TEXT_STYLE_TYPE, 0, 0, t.style, t.resetStyle }); pList.push_back({ t.title, t.panel }); connect(t.resetToStyle, SIGNAL(clicked()), SLOT(resetToStyle())); mapSignals(); }
InspectorLyric::InspectorLyric(QWidget* parent) : InspectorTextBase(parent) { l.setupUi(addWidget()); const std::vector<InspectorItem> il = { { Pid::PLACEMENT, 0, l.placement, l.resetPlacement }, { Pid::VERSE, 0, l.verse, l.resetVerse } }; const std::vector<InspectorPanel> ppList = { { l.title, l.panel } }; populatePlacement(l.placement); mapSignals(il, ppList); connect(t.resetToStyle, SIGNAL(clicked()), SLOT(resetToStyle())); }
InspectorText::InspectorText(QWidget* parent) : InspectorBase(parent) { e.setupUi(addWidget()); t.setupUi(addWidget()); iList = { { P_ID::COLOR, 0, 0, e.color, e.resetColor }, { P_ID::VISIBLE, 0, 0, e.visible, e.resetVisible }, { P_ID::USER_OFF, 0, 0, e.offsetX, e.resetX }, { P_ID::USER_OFF, 1, 0, e.offsetY, e.resetY }, { P_ID::TEXT_STYLE_TYPE, 0, 0, t.style, t.resetStyle } }; mapSignals(); connect(t.resetToStyle, SIGNAL(clicked()), SLOT(resetToStyle())); }
InspectorMarker::InspectorMarker(QWidget* parent) : InspectorElementBase(parent) { t.setupUi(addWidget()); m.setupUi(addWidget()); const std::vector<InspectorItem> iiList = { { P_ID::MARKER_TYPE, 0, false, m.markerType, 0 }, { P_ID::LABEL, 0, false, m.jumpLabel, 0 } }; const std::vector<InspectorPanel> ppList = { { t.title, t.panel }, { m.title, m.panel } }; mapSignals(iiList, ppList); connect(t.resetToStyle, SIGNAL(clicked()), SLOT(resetToStyle())); }
InspectorTempoText::InspectorTempoText(QWidget* parent) : InspectorElementBase(parent) { t.setupUi(addWidget()); tt.setupUi(addWidget()); const std::vector<InspectorItem> il = { { P_ID::TEXT_STYLE_TYPE, 0, 0, t.style, t.resetStyle }, { P_ID::TEMPO, 0, 0, tt.tempo, tt.resetTempo }, { P_ID::TEMPO_FOLLOW_TEXT, 0, 0, tt.followText, tt.resetFollowText } }; const std::vector<InspectorPanel> ppList = { { t.title, t.panel }, { tt.title, tt.panel } }; mapSignals(il, ppList); connect(t.resetToStyle, SIGNAL(clicked()), SLOT(resetToStyle())); connect(tt.followText, SIGNAL(toggled(bool)), tt.tempo, SLOT(setDisabled(bool))); }
InspectorMarker::InspectorMarker(QWidget* parent) : InspectorBase(parent) { b.setupUi(addWidget()); t.setupUi(addWidget()); m.setupUi(addWidget()); iList = { { P_ID::COLOR, 0, false, b.color, b.resetColor }, { P_ID::VISIBLE, 0, false, b.visible, b.resetVisible }, { P_ID::USER_OFF, 0, false, b.offsetX, b.resetX }, { P_ID::USER_OFF, 1, false, b.offsetY, b.resetY }, { P_ID::TEXT_STYLE_TYPE, 0, 0, t.style, t.resetStyle }, { P_ID::MARKER_TYPE, 0, false, m.markerType, m.resetMarkerType }, { P_ID::LABEL, 0, false, m.jumpLabel, m.resetJumpLabel } }; mapSignals(); connect(t.resetToStyle, SIGNAL(clicked()), SLOT(resetToStyle())); }
InspectorJump::InspectorJump(QWidget* parent) : InspectorBase(parent) { b.setupUi(addWidget()); t.setupUi(addWidget()); j.setupUi(addWidget()); iList = { { P_ID::COLOR, 0, false, b.color, b.resetColor }, { P_ID::VISIBLE, 0, false, b.visible, b.resetVisible }, { P_ID::USER_OFF, 0, false, b.offsetX, b.resetX }, { P_ID::USER_OFF, 1, false, b.offsetY, b.resetY }, { P_ID::TEXT_STYLE_TYPE, 0, 0, t.style, t.resetStyle }, { P_ID::JUMP_TO, 0, false, j.jumpTo, j.resetJumpTo }, { P_ID::PLAY_UNTIL, 0, false, j.playUntil, j.resetPlayUntil }, { P_ID::CONTINUE_AT, 0, false, j.continueAt, j.resetContinueAt } }; mapSignals(); connect(t.resetToStyle, SIGNAL(clicked()), SLOT(resetToStyle())); }
InspectorLyric::InspectorLyric(QWidget* parent) : InspectorElementBase(parent) { t.setupUi(addWidget()); l.setupUi(addWidget()); const std::vector<InspectorItem> il = { { P_ID::TEXT_STYLE_TYPE, 0, 0, t.style, t.resetStyle }, { P_ID::PLACEMENT, 0, 0, l.placement, l.resetPlacement }, { P_ID::VERSE, 0, 0, l.verse, l.resetVerse } }; const std::vector<InspectorPanel> ppList = { { t.title, t.panel }, { l.title, l.panel } }; l.placement->clear(); l.placement->addItem(tr("Above"), 0); l.placement->addItem(tr("Below"), 1); mapSignals(il, ppList); connect(t.resetToStyle, SIGNAL(clicked()), SLOT(resetToStyle())); }
InspectorDynamic::InspectorDynamic(QWidget* parent) : InspectorElementBase(parent) { t.setupUi(addWidget()); d.setupUi(addWidget()); const std::vector<InspectorItem> il = { { P_ID::TEXT_STYLE_TYPE, 0, 0, t.style, t.resetStyle }, { P_ID::DYNAMIC_RANGE, 0, 0, d.dynRange, d.resetDynRange }, { P_ID::VELOCITY, 0, 0, d.velocity, 0 }, { P_ID::PLACEMENT, 0, 0, d.placement, d.resetPlacement } }; const std::vector<InspectorPanel> ppList = { { t.title, t.panel }, { d.title, d.panel } }; d.placement->clear(); d.placement->addItem(tr("Above"), 0); d.placement->addItem(tr("Below"), 1); mapSignals(il, ppList); connect(t.resetToStyle, SIGNAL(clicked()), SLOT(resetToStyle())); }
InspectorStafftext::InspectorStafftext(QWidget* parent) : InspectorElementBase(parent) { t.setupUi(addWidget()); s.setupUi(addWidget()); Element* e = inspector->element(); Text* te = static_cast<Text*>(e); bool sameType = true; for (const auto& ee : inspector->el()) { Text* tt = static_cast<Text*>(ee); if (tt->systemFlag() != te->systemFlag()) { sameType = false; break; } } if (sameType) { if (te->systemFlag()) s.title->setText(tr("System Text")); else s.title->setText(tr("Staff Text")); } const std::vector<InspectorItem> il = { { P_ID::TEXT_STYLE_TYPE, 0, 0, t.style, t.resetStyle }, { P_ID::PLACEMENT, 0, 0, s.placement, s.resetPlacement }, }; const std::vector<InspectorPanel> ppList = { { t.title, t.panel }, { s.title, s.panel } }; s.placement->clear(); s.placement->addItem(tr("Above"), 0); s.placement->addItem(tr("Below"), 1); mapSignals(il, ppList); connect(t.resetToStyle, SIGNAL(clicked()), SLOT(resetToStyle())); }