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

Rosegarden::AccidentalTable Class Reference

#include <NotationTypes.h>

List of all members.

Detailed Description

AccidentalTable represents a set of accidentals in force at a given time.

Keep an AccidentalTable variable on-hand as you track through a staff; then when reading a chord, call processDisplayAccidental on the accidentals found in the chord to obtain the actual displayed accidentals and to tell the AccidentalTable to remember the accidentals that have been found in the chord. Then when the chord ends, call update() on the AccidentalTable so that that chord's accidentals are taken into account for the next one.

Create a new AccidentalTable whenever a new key is encountered, and call newBar() or newClef() when a new bar happens or a new clef is encountered.

Definition at line 1279 of file NotationTypes.h.

Public Types

enum  BarResetType { BarResetNone, BarResetCautionary, BarResetExplicit }
enum  OctaveType { OctavesIndependent, OctavesCautionary, OctavesEquivalent }

Public Member Functions

 AccidentalTable (const AccidentalTable &)
 AccidentalTable (const Key &, const Clef &, OctaveType=OctavesCautionary, BarResetType=BarResetCautionary)
void newBar ()
void newClef (const Clef &)
AccidentalTableoperator= (const AccidentalTable &)
Accidental processDisplayAccidental (const Accidental &displayAcc, int heightOnStaff, bool &cautionary)
void update ()

Private Types

typedef std::map< int,
AccidentalRec > 

Private Attributes

AccidentalMap m_accidentals
BarResetType m_barReset
AccidentalMap m_canonicalAccidentals
Clef m_clef
Key m_key
AccidentalMap m_newAccidentals
AccidentalMap m_newCanonicalAccidentals
OctaveType m_octaves


struct  AccidentalRec

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index