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

Slur, Tie, Phrasing slur and Laissez vibrer tie This class represents any type of slur. Holds pointers to the first and last notes. More...

#include <slur.h>

Inheritance diagram for CASlur:
Inheritance graph
[legend]

Public Types

enum  CASlurDirection { SlurUp , SlurDown , SlurNeutral , SlurPreferred }
 Direction of the slur. More...
 
enum  CASlurStyle { Undefined = 0 , SlurSolid , SlurDotted }
 
enum  CASlurType { TieType , SlurType , PhrasingSlurType }
 
- 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

 CASlur (CASlurType, CASlurDirection, CAContext *c, CANote *noteStart, CANote *noteEnd=0, CASlurStyle style=SlurSolid)
 
virtual ~CASlur ()
 
CASlurclone (CAContext *context=0)
 
CASlurclone (CAContext *context, CANote *noteStart, CANote *noteEnd)
 
int compare (CAMusElement *elt)
 
CASlurDirection slurDirection ()
 
void setSlurDirection (CASlurDirection dir)
 
CASlurType slurType ()
 
CANotenoteStart ()
 
CANotenoteEnd ()
 
CASlurStyle slurStyle ()
 
void setNoteStart (CANote *noteStart)
 
void setNoteEnd (CANote *noteEnd)
 
void setSlurStyle (CASlurStyle slurStyle)
 
- 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 slurStyleToString (CASlurStyle style)
 
static CASlurStyle slurStyleFromString (const QString style)
 
static const QString slurDirectionToString (CASlurDirection dir)
 
static CASlurDirection slurDirectionFromString (const QString dir)
 
- Static Public Member Functions inherited from CAMusElement
static const QString musElementTypeToString (CAMusElementType)
 
static CAMusElementType musElementTypeFromString (const QString)
 

Private Member Functions

void setSlurType (CASlurType type)
 

Private Attributes

CASlurDirection _slurDirection
 
CASlurStyle _slurStyle
 
CASlurType _slurType
 
CANote_noteStart
 
CANote_noteEnd
 

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

Slur, Tie, Phrasing slur and Laissez vibrer tie This class represents any type of slur. Holds pointers to the first and last notes.

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.

See also
CANote::_slurStart,
CANote::_tieStart,
CANote::_phrasingSlurStart

Member Enumeration Documentation

◆ CASlurDirection

Direction of the slur.

This type represents the direction of the note's slur.

Possible values:

  • SlurUp Slur high point above the left and right points.
  • SlurDown Slur high point below the left and right points.
  • SlurNeutral Slur on the oposite side of the stem.
  • SlurPreferred Slur direction determined by CANote::determineSlurDirection() (default)
Enumerator
SlurUp 
SlurDown 
SlurNeutral 
SlurPreferred 

◆ CASlurStyle

Enumerator
Undefined 
SlurSolid 
SlurDotted 

◆ CASlurType

Enumerator
TieType 
SlurType 
PhrasingSlurType 

Constructor & Destructor Documentation

◆ CASlur()

CASlur::CASlur ( CASlurType  type,
CASlurDirection  dir,
CAContext c,
CANote noteStart,
CANote noteEnd = 0,
CASlurStyle  style = SlurSolid 
)

Default constructor.

References noteEnd(), noteStart(), CAMusElement::setMusElementType(), setNoteEnd(), setNoteStart(), setSlurDirection(), setSlurStyle(), setSlurType(), CAMusElement::setTimeLength(), CAMusElement::Slur, CAMusElement::timeLength(), and CAMusElement::timeStart().

Referenced by clone().

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

◆ ~CASlur()

CASlur::~CASlur ( )
virtual

Member Function Documentation

◆ clone() [1/2]

CASlur * CASlur::clone ( CAContext context,
CANote noteStart,
CANote noteEnd 
)

References CASlur(), CAMusElement::context(), noteEnd(), noteStart(), slurDirection(), slurStyle(), and slurType().

Here is the call graph for this function:

◆ clone() [2/2]

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

Clones a music element with exact properties including the context.

Implements CAMusElement.

References CASlur(), CAMusElement::context(), noteEnd(), noteStart(), slurDirection(), slurStyle(), and slurType().

Referenced by CAStaff::clone(), CAMainWin::copySelection(), and CAMainWin::pasteAt().

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

◆ compare()

int CASlur::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::musElementType(), CAMusElement::Slur, and slurDirection().

Here is the call graph for this function:

◆ noteEnd()

CANote * CASlur::noteEnd ( )
inline

References _noteEnd.

Referenced by CASlur(), clone(), CAMainWin::deleteSelection(), CAMainWin::pasteAt(), CAPlayback::run(), setNoteEnd(), CANote::updateTies(), and ~CASlur().

Here is the caller graph for this function:

◆ noteStart()

CANote * CASlur::noteStart ( )
inline

References _noteStart.

Referenced by CASlur(), clone(), CAMainWin::deleteSelection(), setNoteStart(), CACanorusMLImport::startElement(), and ~CASlur().

Here is the caller graph for this function:

◆ setNoteEnd()

void CASlur::setNoteEnd ( CANote noteEnd)
inline

References _noteEnd, and noteEnd().

Referenced by CASlur(), CAStaff::clone(), CALilyPondImport::importVoiceImpl(), CACanorusMLImport::startElement(), CANote::updateTies(), and CANote::~CANote().

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

◆ setNoteStart()

void CASlur::setNoteStart ( CANote noteStart)
inline

References _noteStart, and noteStart().

Referenced by CASlur(), and CAStaff::clone().

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

◆ setSlurDirection()

void CASlur::setSlurDirection ( CASlurDirection  dir)
inline

References _slurDirection.

Referenced by CASlur(), and CACanorusMLImport::startElement().

Here is the caller graph for this function:

◆ setSlurStyle()

void CASlur::setSlurStyle ( CASlurStyle  slurStyle)
inline

References _slurStyle, and slurStyle().

Referenced by CASlur(), CAMusElementFactory::configureSlur(), and CACanorusMLImport::startElement().

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

◆ setSlurType()

void CASlur::setSlurType ( CASlurType  type)
inlineprivate

References _slurType.

Referenced by CASlur().

Here is the caller graph for this function:

◆ slurDirection()

CASlurDirection CASlur::slurDirection ( )
inline

References _slurDirection.

Referenced by clone(), compare(), and CACanorusMLExport::exportVoiceImpl().

Here is the caller graph for this function:

◆ slurDirectionFromString()

CASlur::CASlurDirection CASlur::slurDirectionFromString ( const QString  dir)
static

References SlurDown, SlurNeutral, SlurPreferred, and SlurUp.

Referenced by CACanorusMLImport::startElement().

Here is the caller graph for this function:

◆ slurDirectionToString()

const QString CASlur::slurDirectionToString ( CASlur::CASlurDirection  dir)
static

References SlurDown, SlurNeutral, SlurPreferred, and SlurUp.

Referenced by CACanorusMLExport::exportVoiceImpl().

Here is the caller graph for this function:

◆ slurStyle()

CASlurStyle CASlur::slurStyle ( )
inline

References _slurStyle.

Referenced by clone(), CACanorusMLExport::exportVoiceImpl(), and setSlurStyle().

Here is the caller graph for this function:

◆ slurStyleFromString()

CASlur::CASlurStyle CASlur::slurStyleFromString ( const QString  style)
static

References SlurDotted, SlurSolid, and Undefined.

Referenced by CACanorusMLImport::startElement().

Here is the caller graph for this function:

◆ slurStyleToString()

const QString CASlur::slurStyleToString ( CASlur::CASlurStyle  style)
static

References SlurDotted, SlurSolid, and Undefined.

Referenced by CACanorusMLExport::exportVoiceImpl().

Here is the caller graph for this function:

◆ slurType()

CASlurType CASlur::slurType ( )
inline

References _slurType.

Referenced by clone(), CAMainWin::copySelection(), CAMainWin::pasteAt(), and ~CASlur().

Here is the caller graph for this function:

Member Data Documentation

◆ _noteEnd

CANote* CASlur::_noteEnd
private

Referenced by noteEnd(), and setNoteEnd().

◆ _noteStart

CANote* CASlur::_noteStart
private

Referenced by noteStart(), and setNoteStart().

◆ _slurDirection

CASlurDirection CASlur::_slurDirection
private

Referenced by setSlurDirection(), and slurDirection().

◆ _slurStyle

CASlurStyle CASlur::_slurStyle
private

Referenced by setSlurStyle(), and slurStyle().

◆ _slurType

CASlurType CASlur::_slurType
private

Referenced by setSlurType(), and slurType().


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