|
Canorus
0.7
|
Music element which represents a barline in the score. More...
#include <barline.h>

Public Types | |
| enum | CABarlineType { Undefined = -1, Single, Double, End, RepeatOpen, RepeatClose, RepeatCloseOpen, Dotted } |
Public Types inherited from CAMusElement | |
| enum | CAMusElementType { Undefined = 0, Note, Rest, Barline, Clef, TimeSignature, KeySignature, Slur, Tuplet, Syllable, FunctionMark, Mark } |
Public Member Functions | |
| CABarline (CABarlineType type, CAStaff *staff, int startTime) | |
| virtual | ~CABarline () |
| CABarline * | clone (CAContext *context=0) |
| int | compare (CAMusElement *elt) |
| CABarlineType | barlineType () |
| void | setBarlineType (CABarlineType t) |
Public Member Functions inherited from CAMusElement | |
| CAMusElement (CAContext *context, int timeStart, int timeLength=0) | |
| virtual | ~CAMusElement () |
| CAMusElementType | musElementType () |
| CAContext * | context () |
| CAContext * | setContext (CAContext *context) |
| virtual int | timeStart () |
| void | setTimeStart (int time) |
| virtual int | timeLength () |
| void | setTimeLength (int length) |
| int | timeEnd () |
| const QString | name () |
| void | setName (const QString name) |
| const bool | isVisible () |
| void | setVisible (const bool v) |
| const QColor | color () |
| void | setColor (const QColor c) |
| const QList< CAMark * > | markList () |
| void | addMark (CAMark *mark) |
| void | addMarks (QList< CAMark * > marks) |
| void | removeMark (CAMark *mark) |
| bool | isPlayable () |
Static Public Member Functions | |
| static const QString | barlineTypeToString (CABarlineType) |
| static CABarlineType | barlineTypeFromString (const QString) |
Static Public Member Functions inherited from CAMusElement | |
| static const QString | musElementTypeToString (CAMusElementType) |
| static CAMusElementType | musElementTypeFromString (const QString) |
Private Attributes | |
| CABarlineType | _barlineType |
Additional Inherited Members | |
Protected Member Functions inherited from CAMusElement | |
| void | setMusElementType (CAMusElementType type) |
Protected Attributes inherited from CAMusElement | |
| QList< CAMark * > | _markList |
| CAMusElementType | _musElementType |
| CAContext * | _context |
| int | _timeStart |
| int | _timeLength |
| bool | _visible |
| QColor | _color |
| QString | _name |
Music element which represents a barline in the score.
Copyright (c) 2006-2007, Matevž Jekovec, Canorus development team All Rights Reserved. See AUTHORS for a complete list of authors.
Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE.GPL for details.
This class represents any type of barlines in the score. Barline type is defined in _barlineType.
| CABarline::CABarline | ( | CABarlineType | type, |
| CAStaff * | staff, | ||
| int | startTime | ||
| ) |
Creates a barline of type type, its parent staff and startTime. timeLength of a barline is always 0.
References CAMusElement::Barline, setBarlineType(), and CAMusElement::setMusElementType().
Referenced by clone().


|
virtual |
Destroys the barline.
|
inline |
References _barlineType.
Referenced by CADrawableBarline::CADrawableBarline(), clone(), compare(), CACanorusMLExport::exportVoiceImpl(), and CALilyPondExport::exportVoiceImpl().

|
static |
Converts the barline's type in QString to CABarlineType.
References Dotted, Double, End, RepeatClose, RepeatCloseOpen, RepeatOpen, and Single.
Referenced by CACanorusMLImport::startElement().

|
static |
Converts the given barline's type to QString.
References Dotted, Double, End, RepeatClose, RepeatCloseOpen, RepeatOpen, and Single.
Referenced by CACanorusMLExport::exportVoiceImpl().

Clones a music element with exact properties including the context.
Implements CAMusElement.
References CAMusElement::addMark(), barlineType(), CABarline(), CAMusElement::markList(), and CAMusElement::timeStart().

|
virtual |
Compares the music element with the given elt and returns number of differences in their properties. Returns 0, if the music elements are exact; -1 if the music element type differs; otherwise number greater than 0.
This method is usually used when opening a score document where music elements are written in various voices (eg. barlines), but are eventually merged and written only once per staff.
Implements CAMusElement.
References CAMusElement::Barline, barlineType(), and CAMusElement::musElementType().

|
inline |
|
private |
Referenced by barlineType(), and setBarlineType().
1.8.3