Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
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]

List of all members.

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

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)

Private Member Functions

void setSlurType (CASlurType type)

Private Attributes

CASlurDirection _slurDirection
CASlurStyle _slurStyle
CASlurType _slurType
CANote_noteStart
CANote_noteEnd

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.

    \sa CANote::_slurStart, \sa CANote::_tieStart, \sa CANote::_phrasingSlurStart

Member Enumeration Documentation

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 
Enumerator:
Undefined 
SlurSolid 
SlurDotted 
Enumerator:
TieType 
SlurType 
PhrasingSlurType 

Constructor & Destructor Documentation

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

Default constructor.

References 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 ( ) [virtual]

Member Function Documentation

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

Clones a music element with exact properties including the context.

Implements CAMusElement.

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

References CASlur(), slurDirection(), slurStyle(), and slurType().

Here is the call graph for this function:

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:

CANote* CASlur::noteEnd ( ) [inline]

References _noteEnd.

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

Here is the caller graph for this function:

CANote* CASlur::noteStart ( ) [inline]

References _noteStart.

Referenced by clone(), setNoteStart(), and ~CASlur().

Here is the caller graph for this function:

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:

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:

void CASlur::setSlurDirection ( CASlurDirection  dir) [inline]

References _slurDirection.

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

Here is the caller graph for this function:

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:

void CASlur::setSlurType ( CASlurType  type) [inline, private]

References _slurType.

Referenced by CASlur().

Here is the caller graph for this function:

References _slurDirection.

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

Here is the caller graph for this function:

References SlurDown, SlurNeutral, SlurPreferred, and SlurUp.

Referenced by CACanorusMLImport::startElement().

Here is the caller graph for this function:

References SlurDown, SlurNeutral, SlurPreferred, and SlurUp.

Referenced by CACanorusMLExport::exportVoiceImpl().

Here is the caller graph for this function:

References _slurStyle.

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

Here is the caller graph for this function:

References SlurDotted, SlurSolid, and Undefined.

Referenced by CACanorusMLImport::startElement().

Here is the caller graph for this function:

References SlurDotted, and SlurSolid.

Referenced by CACanorusMLExport::exportVoiceImpl().

Here is the caller graph for this function:

References _slurType.

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

Here is the caller graph for this function:


Member Data Documentation

Referenced by noteEnd(), and setNoteEnd().

Referenced by noteStart(), and setNoteStart().

Referenced by setSlurDirection(), and slurDirection().

Referenced by setSlurStyle(), and slurStyle().

Referenced by setSlurType(), and slurType().


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