Example #1
0
void InspectorBeam::setElement(Element* e)
      {
      Beam* beam = static_cast<Beam*>(e);

      b.distribute->blockSignals(true);
      b.distribute->setChecked(beam->distribute());
      b.distribute->blockSignals(false);
      b.direction->setCurrentIndex(beam->beamDirection());
      b.resetDirection->setEnabled(beam->beamDirection() != AUTO);
      }
Example #2
0
void InspectorBeam::apply()
      {
      Beam* beam   = static_cast<Beam*>(inspector->element());
      Score* score = beam->score();

      bool distribute = b.distribute->isChecked();
      Direction d     = Direction(b.direction->currentIndex());
      score->startCmd();
      if (beam->distribute() != distribute)
            score->undoChangeProperty(beam, P_DISTRIBUTE, distribute);
      if (beam->beamDirection() != d)
            score->undoChangeProperty(beam, P_DIRECTION, d);
      score->setLayoutAll(true);
      score->endCmd();
      mscore->endCmd();
      }