Canorus 0.0
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
CABarline Class Reference

Music element which represents a barline in the score. More...

#include <barline.h>

Inheritance diagram for CABarline:
Inheritance graph
[legend]

Public Types

enum  CABarlineType {
  Undefined = -1 , Single , Double , End ,
  RepeatOpen , RepeatClose , RepeatCloseOpen , Dotted
}
 
- Public Types inherited from CAMusElement
enum  CAMusElementType {
  Undefined = 0 , Note , Rest , MidiNote ,
  Barline , Clef , TimeSignature , KeySignature ,
  Slur , Tuplet , Syllable , FunctionMark ,
  FiguredBassMark , Mark
}
 

Public Member Functions

 CABarline (CABarlineType type, CAStaff *staff, int startTime)
 
virtual ~CABarline ()
 
CABarlineclone (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 ()
 
virtual CAMusElementclone (CAContext *context=0)=0
 
virtual int compare (CAMusElement *elt)=0
 
CAMusElementType musElementType ()
 
CAContextcontext ()
 
void setContext (CAContext *context)
 
virtual int timeStart () const
 
void setTimeStart (int time)
 
virtual int timeLength () const
 
void setTimeLength (int length)
 
int timeEnd ()
 
virtual int realTimeStart ()
 
virtual int realTimeLength ()
 
int realTimeEnd ()
 
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)
 
const QList< CANoteCheckerError * > & noteCheckerErrorList ()
 
void addNoteCheckerError (CANoteCheckerError *nce)
 
void removeNoteCheckerError (CANoteCheckerError *nce)
 
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
CAMusElementType _musElementType
 
QList< CAMark * > _markList
 
QList< CANoteCheckerError * > _noteCheckerErrorList
 
CAContext_context
 
int _timeStart
 
int _timeLength
 
bool _visible
 
QColor _color
 
QString _name
 

Detailed Description

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.

See also
CAMusElement

Member Enumeration Documentation

◆ CABarlineType

Enumerator
Undefined 
Single 
Double 
End 
RepeatOpen 
RepeatClose 
RepeatCloseOpen 
Dotted 

Constructor & Destructor Documentation

◆ CABarline()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~CABarline()

CABarline::~CABarline ( )
virtual

Destroys the barline.

Member Function Documentation

◆ barlineType()

CABarlineType CABarline::barlineType ( )
inline

◆ barlineTypeFromString()

CABarline::CABarlineType CABarline::barlineTypeFromString ( const QString  type)
static

Converts the barline's type in QString to CABarlineType.

See also
CABarlineType, barlineTypeToString()

References Dotted, Double, End, RepeatClose, RepeatCloseOpen, RepeatOpen, and Single.

Referenced by CACanorusMLImport::startElement().

Here is the caller graph for this function:

◆ barlineTypeToString()

const QString CABarline::barlineTypeToString ( CABarlineType  type)
static

Converts the given barline's type to QString.

See also
CABarlineType, barlineTypeFromString()

References Dotted, Double, End, RepeatClose, RepeatCloseOpen, RepeatOpen, and Single.

Referenced by CACanorusMLExport::exportVoiceImpl(), and CALilyPondExport::scanForRepeats().

Here is the caller graph for this function:

◆ clone()

CABarline * CABarline::clone ( CAContext context = 0)
virtual

Clones a music element with exact properties including the context.

Implements CAMusElement.

References CAMusElement::addMark(), barlineType(), CABarline(), CAMusElement::context(), CAMusElement::markList(), and CAMusElement::timeStart().

Here is the call graph for this function:

◆ compare()

int CABarline::compare ( CAMusElement elt)
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().

Here is the call graph for this function:

◆ setBarlineType()

void CABarline::setBarlineType ( CABarlineType  t)
inline

References _barlineType.

Referenced by CABarline().

Here is the caller graph for this function:

Member Data Documentation

◆ _barlineType

CABarlineType CABarline::_barlineType
private

Referenced by barlineType(), and setBarlineType().


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