Logo Search packages:      
Sourcecode: rosegarden version File versions  Download package

Accidental Rosegarden::Key::getAccidentalAtHeight ( int  height,
const Clef clef 
) const

Return the accidental at the given height-on-staff (in Pitch terminology) in the given clef.

Definition at line 571 of file NotationTypes.cpp.

References canonicalHeight(), Rosegarden::Clef::getPitchOffset(), and isSharp().

    height = canonicalHeight(height);
    for (unsigned int i = 0; i < m_accidentalHeights->size(); ++i) {
        if (height ==static_cast<int>(canonicalHeight((*m_accidentalHeights)[i] +
                                                     clef.getPitchOffset()))) {
            return isSharp() ? Sharp : Flat;
    return NoAccidental;

Generated by  Doxygen 1.6.0   Back to index