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

Rosegarden::Key Class Reference

#include <NotationTypes.h>

List of all members.

Detailed Description

All we store in a key Event is the name of the key. A Key object can be constructed from such an Event or just from its name, and will return all the properties of the key. The Key class also provides some useful mechanisms for getting information about and transposing between keys.

Definition at line 376 of file NotationTypes.h.

Public Types

typedef Exception BadKeyName
typedef Exception BadKeySpec
typedef std::vector< KeyKeyList

Public Member Functions

int convertFrom (int pitch, const Key &previousKey, const Accidental &explicitAccidental=Accidentals::NoAccidental) const
Accidental getAccidentalAtHeight (int height, const Clef &clef) const
int getAccidentalCount () const
Accidental getAccidentalForStep (int steps) const
std::vector< int > getAccidentalHeights (const Clef &clef) const
EventgetAsEvent (timeT absoluteTime) const
 Returned event is on heap; caller takes responsibility for ownership.
Key getEquivalent () const
std::string getName () const
std::string getRosegarden2Name () const
int getTonicPitch () const
bool isMinor () const
bool isSharp () const
 Key (const Key &kc)
 Key (int tonicPitch, bool isMinor)
 Key (int accidentalCount, bool isSharp, bool isMinor)
 Key (const std::string &name)
 Key (const Event &e)
 Key ()
bool operator!= (const Key &k) const
Keyoperator= (const Key &kc)
bool operator== (const Key &k) const
Key transpose (int pitchDelta, int heightDelta)
int transposeFrom (int pitch, const Key &previousKey) const

Static Public Member Functions

static unsigned int canonicalHeight (int height)
static KeyList getKeys (bool minor=false)
static bool isValid (const Event &e)

Static Public Attributes

static const Key DefaultKey = Key("C major")
static const int EventSubOrdering = -200
static const std::string EventType = "keychange"
static const PropertyName KeyPropertyName = "key"

Private Types

typedef std::map< std::string,
KeyDetails > 

Private Member Functions

void checkAccidentalHeights () const

Static Private Member Functions

static void checkMap ()

Private Attributes

std::vector< int > * m_accidentalHeights
std::string m_name

Static Private Attributes

static KeyDetailMap m_keyDetailMap = Key::KeyDetailMap()


struct  KeyDetails

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

Generated by  Doxygen 1.6.0   Back to index