void MarkerView::tickChanged(const Pos& pos) { MarkerItem* item = (MarkerItem*) table->currentItem(); if (item) { item->setTick(pos.tick()); Pos p(pos.tick(), true); song->setPos(0, p, true, true, false); table->sortByColumn(COL_TICK, Qt::AscendingOrder); } }
bool Pos::operator==(const Pos& s) const { if (_type == FRAMES) return _frame == s.frame(); else return _tick == s.tick(); }
void PosLen::setPos(const Pos& pos) { switch(pos.type()) { case FRAMES: setFrame(pos.frame()); break; case TICKS: setTick(pos.tick()); break; } }
void MidiEventBase::write(int level, Xml& xml, const Pos& offset, bool /*forcePath*/) const { xml.nput(level++, "<event tick=\"%d\"", tick() + offset.tick()); switch (type()) { case Note: xml.nput(" len=\"%d\"", lenTick()); break; default: xml.nput(" type=\"%d\"", type()); break; } // Changed by T356. BUG: *.oom does not save meta event types - ID: 2879426 if (a) xml.nput(" a=\"%d\"", a); if (b) xml.nput(" b=\"%d\"", b); if (c) xml.nput(" c=\"%d\"", c); if (edata.dataLen) { xml.nput(" datalen=\"%d\">\n", edata.dataLen); xml.nput(level, ""); for (int i = 0; i < edata.dataLen; ++i) xml.nput("%02x ", edata.data[i] & 0xff); xml.nput("\n"); xml.tag(level, "/event"); } else { //if (a) // xml.nput(" a=\"%d\"", a); //if (b) // xml.nput(" b=\"%d\"", b); //if (c) // xml.nput(" c=\"%d\"", c); xml.nput(" />\n"); } }
void PianorollEditor::moveLocator(int i, const Pos& pos) { if (locator[i].valid()) score()->setPos(POS(i), pos.tick()); }
void NoteInfo::timeChanged(const Pos& pos) { if (!signalsBlocked()) emit valueChanged(VAL_TIME, pos.tick()); }