Пример #1
0
const StaffType* StaffListItem::staffType() const
      {
      int typeIdx = staffTypeIdx();
      Q_ASSERT(typeIdx != CUSTOM_STAFF_TYPE_IDX);
      if (typeIdx == CUSTOM_STAFF_TYPE_IDX)
            typeIdx = 0;
      return StaffType::preset(StaffTypes(typeIdx));
      }
Пример #2
0
void StaffListItem::staffTypeChanged(int idx)
      {
      // check current clef matches new staff type
      const int typeIdx = staffTypeIdx(idx);
      if (typeIdx == CUSTOM_STAFF_TYPE_IDX) // consider it not changed
            return;

      const StaffType* stfType = StaffType::preset(StaffTypes(typeIdx));

      PartListItem* pli = static_cast<PartListItem*>(QTreeWidgetItem::parent());
      pli->updateClefs();

      if (_staff && _staff->staffType(0)->name() != stfType->name()) {
            if (_op != ListItemOp::I_DELETE && _op != ListItemOp::ADD)
                  _op = ListItemOp::UPDATE;
            }
      }
Пример #3
0
const StaffType* StaffListItem::staffType() const
      {
      return StaffType::preset(StaffTypes((staffTypeIdx())));
      }
Пример #4
0
int StaffListItem::staffTypeIdx() const
      {
      return staffTypeIdx(_staffTypeCombo->currentIndex());
      }