|
Planeshift
|
#include <pawssheetline.h>
Public Member Functions | |
| void | AddNote (int position, int alter, bool isRest) |
| Adds a note to the chord. | |
| void | AddNote (csRef< iDocumentNode > pitch) |
| Adds a not-rest note to this chord from a <pitch> XML node. | |
| void | AttachChord (Chord *chord) |
| Inserts the given chord after this one. | |
| Chord () | |
| Constructor. | |
| Chord (Chord *chord) | |
| Copy constructor. | |
| void | Draw (pawsSheetLine *pawsLine, Chord *selectedChord, int horizontalPos) |
| Draws this chord. | |
| void | Empty () |
| Deletes all the notes in the chord. | |
| int | GetDuration () |
| Gets the duration of this chord. | |
| bool | IsEmpty () |
| Returns true if there are not notes in this chord. | |
| bool | IsRest () |
| Return true if this chord is a rest, false otherwise. | |
| Chord * | Next () |
| Returns the next Chord. | |
| Chord * | Prev () |
| Returns the previous Chord. | |
| void | SetDuration (int duration) |
| Sets the duration of this chord. | |
| csString | ToXML () |
| Write this chord as a <note> XML node. | |
| ~Chord () | |
| Destructor. | |
Definition at line 84 of file pawssheetline.h.
| Chord::Chord | ( | ) |
Constructor.
Default duration is a quarter.
| Chord::Chord | ( | Chord * | chord | ) |
| Chord::~Chord | ( | ) |
Destructor.
It removes itself from the list.
Adds a note to the chord.
If a note in the same position already exists this overwrites it (i.e. the alteration of the note is updated with the new one). If the added note is a rest and there are already other notes in the chord, these are deleted from the chord. Viceversa if the added note is not a rest and there is already a rest in the chord, the rest is removed.
| position | the position where the note (or the rest) must be drawn. |
| alter | the alteration of the note (-1 flat, 0 normal, 1 sharp). |
| isRest | true if it is a rest. |
| void Chord::AddNote | ( | csRef< iDocumentNode > | pitch | ) |
Adds a not-rest note to this chord from a <pitch> XML node.
| pitch | the <pitch> XML node. |
| void Chord::AttachChord | ( | Chord * | chord | ) |
Inserts the given chord after this one.
| chord | the chord to insert. |
| void Chord::Draw | ( | pawsSheetLine * | pawsLine, |
| Chord * | selectedChord, | ||
| int | horizontalPos | ||
| ) |
Draws this chord.
| pawsLine | the pawsSheetLine that store the font-dependent parameters. |
| selectedChord | the current selected chord. |
| horizontalPos | the horizontal position of the chord. |
| void Chord::Empty | ( | ) |
Deletes all the notes in the chord.
| int Chord::GetDuration | ( | ) | [inline] |
Gets the duration of this chord.
Definition at line 137 of file pawssheetline.h.
| bool Chord::IsEmpty | ( | ) | [inline] |
Returns true if there are not notes in this chord.
Definition at line 130 of file pawssheetline.h.
| bool Chord::IsRest | ( | ) | [inline] |
Return true if this chord is a rest, false otherwise.
Definition at line 123 of file pawssheetline.h.
| Chord* Chord::Next | ( | ) | [inline] |
| Chord* Chord::Prev | ( | ) | [inline] |
Returns the previous Chord.
Definition at line 116 of file pawssheetline.h.
| void Chord::SetDuration | ( | int | duration | ) |
Sets the duration of this chord.
| duration | one of the values of the enum Duration. |
| csString Chord::ToXML | ( | ) |
Write this chord as a <note> XML node.
1.7.3