#include <pawssheetline.h>
Definition at line 84 of file pawssheetline.h.
Constructor.
Default duration is a quarter.
Chord::Chord |
( |
Chord * |
chord | ) |
|
Copy constructor.
It copies notes and duration.
- Parameters
-
Destructor.
It removes itself from the list.
void Chord::AddNote |
( |
int |
position, |
|
|
int |
alter, |
|
|
bool |
isRest |
|
) |
| |
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.
- Parameters
-
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.
- Parameters
-
pitch | the <pitch> XML node. |
void Chord::AttachChord |
( |
Chord * |
chord | ) |
|
Inserts the given chord after this one.
- Parameters
-
chord | the chord to insert. |
Draws this chord.
- Parameters
-
pawsLine | the pawsSheetLine that store the font-dependent parameters. |
selectedChord | the current selected chord. |
horizontalPos | the horizontal position of the chord. |
Deletes all the notes in the chord.
int Chord::GetDuration |
( |
| ) |
|
|
inline |
Gets the duration of this chord.
- Returns
- the duration of this chord.
Definition at line 137 of file pawssheetline.h.
Returns true if there are not notes in this chord.
- Returns
- true if this chord is empty, false otherwise.
Definition at line 130 of file pawssheetline.h.
Return true if this chord is a rest, false otherwise.
- Returns
- true if this is a rest.
Definition at line 123 of file pawssheetline.h.
void Chord::SetDuration |
( |
int |
duration | ) |
|
Sets the duration of this chord.
- Parameters
-
duration | one of the values of the enum Duration. |
csString Chord::ToXML |
( |
| ) |
|
Write this chord as a <note> XML node.
- Returns
- the <note> XML node.
The documentation for this class was generated from the following file: