예제 #1
0
EditStaff::EditStaff(Staff* s, const Fraction& /*tick*/, QWidget* parent)
   : QDialog(parent)
      {
      setObjectName("EditStaff");
      setupUi(this);
      setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
      setModal(true);

      staff = nullptr;
      setStaff(s);

      MuseScore::restoreGeometry(this);

      connect(buttonBox,            SIGNAL(clicked(QAbstractButton*)), SLOT(bboxClicked(QAbstractButton*)));
      connect(changeInstrument,     SIGNAL(clicked()),            SLOT(showInstrumentDialog()));
      connect(changeStaffType,      SIGNAL(clicked()),            SLOT(showStaffTypeDialog()));
      connect(minPitchASelect,      SIGNAL(clicked()),            SLOT(minPitchAClicked()));
      connect(maxPitchASelect,      SIGNAL(clicked()),            SLOT(maxPitchAClicked()));
      connect(minPitchPSelect,      SIGNAL(clicked()),            SLOT(minPitchPClicked()));
      connect(maxPitchPSelect,      SIGNAL(clicked()),            SLOT(maxPitchPClicked()));
      connect(editStringData,       SIGNAL(clicked()),            SLOT(editStringDataClicked()));
      connect(lines,                SIGNAL(valueChanged(int)),    SLOT(numOfLinesChanged()));
      connect(lineDistance,         SIGNAL(valueChanged(double)), SLOT(lineDistanceChanged()));
      connect(showClef,             SIGNAL(clicked()),            SLOT(showClefChanged()));
      connect(showTimesig,          SIGNAL(clicked()),            SLOT(showTimeSigChanged()));
      connect(showBarlines,         SIGNAL(clicked()),            SLOT(showBarlinesChanged()));

      connect(nextButton,           SIGNAL(clicked()),            SLOT(gotoNextStaff()));
      connect(previousButton,       SIGNAL(clicked()),            SLOT(gotoPreviousStaff()));

      addAction(getAction("help"));  // why is this needed?
      }
예제 #2
0
void EditStaff::gotoPreviousStaff()
      {
      Staff* prevStaff = orgStaff->score()->staff(orgStaff->idx() - 1);
      if (prevStaff)
            {
            setStaff(prevStaff);
            }
      }
예제 #3
0
void EditStaff::gotoNextStaff()
      {
      Staff* nextStaff = orgStaff->score()->staff(orgStaff->idx() + 1);
      if (nextStaff)
            {
            setStaff(nextStaff);
            }
      }
예제 #4
0
Team& Team::operator=(const Team& other)
{
	if (this != &other)
	{
		setName(other.name);
		numberOfStaff = other.numberOfStaff;
		playerCounter = other.playerCounter;
		setStaff(other.staff, other.numberOfStaff);
		this->stadium = other.stadium;
	}
	return *this;
}
예제 #5
0
TscoreClef::TscoreClef(TscoreScene* scene, TscoreStaff* staff, Tclef clef) :
    TscoreItem(scene),
    m_clef(Tclef(Tclef::e_none)),
    m_textClef(0),
    m_readOnly(false)
{
    setStaff(staff);
    setParentItem(staff);
    if (m_typesList.size() == 0) // initialize types list
        m_typesList << Tclef::e_treble_G << Tclef::e_bass_F << Tclef::e_bass_F_8down <<
                    Tclef::e_alto_C << Tclef::e_tenor_C << Tclef::e_treble_G_8down;

    m_textClef = new QGraphicsSimpleTextItem();
    registryItem(m_textClef);
    m_textClef->setBrush(qApp->palette().text().color());

    m_textClef->setFont(TnooFont(18));
    setClef(clef);
}
예제 #6
0
void PianorollEditor::removeScore()
{
    setStaff(0);
}