Tremolo::Tremolo(const Tremolo& t) : Element(t) { setTremoloType(t.tremoloType()); _chord1 = t.chord1(); _chord2 = t.chord2(); }
Tremolo::Tremolo(Score* score) : Element(score, ElementFlag::MOVABLE) { setTremoloType(TremoloType::R8); _chord1 = 0; _chord2 = 0; }
Tremolo::Tremolo(const Tremolo& t) : Element(t) { setTremoloType(t.tremoloType()); _chord1 = t.chord1(); _chord2 = t.chord2(); setFlags(ELEMENT_MOVABLE | ELEMENT_SELECTABLE); }
Tremolo::Tremolo(Score* score) : Element(score) { setTremoloType(TREMOLO_R8); _chord1 = 0; _chord2 = 0; setFlags(ELEMENT_MOVABLE | ELEMENT_SELECTABLE); }
Tremolo::Tremolo(Score* score) : Element(score) { setTremoloType(TremoloType::R8); _chord1 = 0; _chord2 = 0; setFlags(ElementFlag::MOVABLE | ElementFlag::SELECTABLE); }
void Tremolo::read(XmlReader& e) { while (e.readNextStartElement()) { if (e.name() == "subtype") setTremoloType(e.readElementText()); else if (!Element::readProperties(e)) e.unknown(); } }
void Tremolo::setTremoloType(const QString& s) { TremoloType t; if (s == "r8") t = TREMOLO_R8; else if (s == "r16") t = TREMOLO_R16; else if (s == "r32") t = TREMOLO_R32; else if (s == "r64") t = TREMOLO_R64; else if (s == "c8") t = TREMOLO_C8; else if (s == "c16") t = TREMOLO_C16; else if (s == "c32") t = TREMOLO_C32; else if (s == "c64") t = TREMOLO_C64; else t = TremoloType(s.toInt()); // for compatibility with old tremolo type setTremoloType(t); }
void Tremolo::setTremoloType(const QString& s) { setTremoloType(name2Type(s)); }