Example #1
0
QString Tremolo::tremoloTypeName() const
      {
      switch(tremoloType()) {
            case TREMOLO_R8:  return QString("r8");
            case TREMOLO_R16: return QString("r16");
            case TREMOLO_R32: return QString("r32");
            case TREMOLO_R64: return QString("r64");
            case TREMOLO_C8:  return QString("c8");
            case TREMOLO_C16: return QString("c16");
            case TREMOLO_C32: return QString("c32");
            case TREMOLO_C64: return QString("c64");
            default:
                  break;
            }
      return QString("??");
      }
Example #2
0
void Tremolo::draw(QPainter* painter) const
      {
      if (tremoloType() == TremoloType::BUZZ_ROLL) {
            painter->setPen(curColor());
            drawSymbol(SymId::buzzRoll, painter);
            }
      else {
            painter->setBrush(QBrush(curColor()));
            painter->setPen(Qt::NoPen);
            painter->drawPath(path);
            }
      if ((parent() == 0) && !twoNotes()) {
            qreal x = 0.0; // bbox().width() * .25;
            QPen pen(curColor(), point(score()->styleS(Sid::stemWidth)));
            painter->setPen(pen);
            qreal _spatium = spatium() * mag();
            painter->drawLine(QLineF(x, -_spatium*.5, x, path.boundingRect().height() + _spatium));
            }
      }
Example #3
0
void Tremolo::setTremoloType(TremoloType t)
      {
      _tremoloType = t;
      switch (tremoloType()) {
            case TREMOLO_R16:
            case TREMOLO_C16:
                  _lines = 2;
                  break;
            case TREMOLO_R32:
            case TREMOLO_C32:
                  _lines = 3;
                  break;
            case TREMOLO_R64:
            case TREMOLO_C64:
                  _lines = 4;
                  break;
            default:
                  _lines = 1;
                  break;
            }
      }
Example #4
0
void Tremolo::setTremoloType(TremoloType t)
      {
      _tremoloType = t;
      switch (tremoloType()) {
            case TremoloType::R16:
            case TremoloType::C16:
                  _lines = 2;
                  break;
            case TremoloType::R32:
            case TremoloType::C32:
                  _lines = 3;
                  break;
            case TremoloType::R64:
            case TremoloType::C64:
                  _lines = 4;
                  break;
            default:
                  _lines = 1;
                  break;
            }
      }
Example #5
0
QString Tremolo::tremoloTypeName() const
      {
      return type2name(tremoloType());
      }