Exemplo n.º 1
0
void EditStringData::newStringClicked()
      {
      int         i, newCode;

      EditPitch* ep = new EditPitch(this);
      if ( (newCode=ep->exec()) != -1) {
            // find sorted postion for new string tuning value
/*            for(i=_stringsLoc.size()-1; i >= 0 && newCode > _stringsLoc[i]; i--)
                  ;
            // insert in local string list and in dlg list control
            _stringsLoc.insert(i+1, newCode);
            stringList->insertItem(i+1, midiCodeToStr(newCode));
            // select last added item and ensure buttons are active
            stringList->setCurrentRow(i+1);
*/
            // add below selected string o at the end if no selected string
            i = stringList->currentRow();
            if(i < 0)
                  i = stringList->count() - 1;
            // insert in local string list and in dlg list control
            _stringsLoc.insert(i+1, newCode);
            stringList->insertItem(i+1, midiCodeToStr(newCode));
            // select last added item and ensure buttons are active
            stringList->setCurrentRow(i+1);
            editString->setEnabled(true);
            deleteString->setEnabled(true);
            _modified = true;
            }
      }
Exemplo n.º 2
0
void EditStaff::maxPitchPClicked()
      {
      int         newCode;

      EditPitch* ep = new EditPitch(this, instrument.maxPitchP() );
      if ( (newCode=ep->exec()) != -1) {
            maxPitchP->setText(midiCodeToStr(newCode));
            _maxPitchP = newCode;
            }
      }
Exemplo n.º 3
0
void EditStaff::minPitchAClicked()
      {
      int         newCode;

      EditPitch* ep = new EditPitch(this, instrument.minPitchA() );
      if ( (newCode=ep->exec()) != -1) {
            minPitchA->setText(midiCodeToStr(newCode));
            _minPitchA = newCode;
            }
      }
Exemplo n.º 4
0
void EditStaff::minPitchPClicked()
      {
      int         newCode;
      EditPitch* ep = new EditPitch(this, instrument.minPitchP() );
      ep->setWindowModality(Qt::WindowModal);
      if ( (newCode=ep->exec()) != -1) {
            minPitchP->setText(midiCodeToStr(newCode));
            _minPitchP = newCode;
            }
      }
Exemplo n.º 5
0
void EditStringData::editStringClicked()
      {
      int         i = stringList->currentRow();
      int         newCode;

      EditPitch* ep = new EditPitch(this, _stringsLoc[i]);
      if ( (newCode=ep->exec()) != -1) {
            // update item value in local string list and item text in dlg list control
            _stringsLoc[i] = newCode;
            QListWidgetItem * item = stringList->item(i);
            item->setText(midiCodeToStr(newCode));
            _modified = true;
            }
      }