Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
CARitardando Class Reference

Ritardando and Accellerando marks. More...

#include <ritardando.h>

Inheritance diagram for CARitardando:
Inheritance graph
[legend]

Public Types

enum  CARitardandoType { Ritardando, Accellerando }
 
- Public Types inherited from CAMark
enum  CAMarkType {
  Undefined = -1, Text, Tempo, Ritardando,
  Dynamic, Crescendo, Pedal, InstrumentChange,
  BookMark, RehersalMark, Fermata, RepeatMark,
  Articulation, Fingering
}
 
- Public Types inherited from CAMusElement
enum  CAMusElementType {
  Undefined = 0, Note, Rest, Barline,
  Clef, TimeSignature, KeySignature, Slur,
  Tuplet, Syllable, FunctionMark, Mark
}
 

Public Member Functions

 CARitardando (int finalTempo, CAPlayable *p, int timeLength, CARitardandoType t=Ritardando)
 
virtual ~CARitardando ()
 
CARitardandoclone (CAMusElement *elt=0)
 
int compare (CAMusElement *)
 
const int finalTempo ()
 
void setFinalTempo (const int t)
 
const CARitardandoType ritardandoType ()
 
void setRitardandoType (CARitardandoType t)
 
- Public Member Functions inherited from CAMark
 CAMark (CAMarkType type, CAMusElement *associatedElt, int timeStart=-1, int timeLength=-1)
 
 CAMark (CAMarkType type, CAContext *context, int timeStart, int timeLength)
 
virtual ~CAMark ()
 
virtual CAMarkclone (CAContext *context)
 
CAMusElementassociatedElement ()
 
void setAssociatedElement (CAMusElement *elt)
 
CAMarkType markType ()
 
void setMarkType (CAMarkType type)
 
bool isCommon ()
 
- Public Member Functions inherited from CAMusElement
 CAMusElement (CAContext *context, int timeStart, int timeLength=0)
 
virtual ~CAMusElement ()
 
CAMusElementType musElementType ()
 
CAContextcontext ()
 
CAContextsetContext (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 ritardandoTypeToString (CARitardandoType t)
 
static CARitardandoType ritardandoTypeFromString (const QString r)
 
- Static Public Member Functions inherited from CAMark
static const QString markTypeToString (CAMarkType t)
 
static CAMarkType markTypeFromString (const QString s)
 
- Static Public Member Functions inherited from CAMusElement
static const QString musElementTypeToString (CAMusElementType)
 
static CAMusElementType musElementTypeFromString (const QString)
 

Private Attributes

int _finalTempo
 
CARitardandoType _ritardandoType
 

Additional Inherited Members

- Protected Member Functions inherited from CAMark
void setCommon (bool c)
 
- Protected Attributes inherited from CAMusElement
QList< CAMark * > _markList
 
CAMusElementType _musElementType
 
CAContext_context
 
int _timeStart
 
int _timeLength
 
bool _visible
 
QColor _color
 
QString _name
 

Detailed Description

Ritardando and Accellerando marks.

Copyright (c) 2008, 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.

Relative tempo marks.

Ritardando starts with the current tempo and linearily decreases the tempo to the final tempo. The original tempo is restored after the ritardando is finished.

Accellerando does the opposite.

Member Enumeration Documentation

Enumerator
Ritardando 
Accellerando 

Constructor & Destructor Documentation

CARitardando::CARitardando ( int  finalTempo,
CAPlayable p,
int  timeLength,
CARitardandoType  t = Ritardando 
)

References setFinalTempo(), and setRitardandoType().

Referenced by clone().

Here is the call graph for this function:

Here is the caller graph for this function:

CARitardando::~CARitardando ( )
virtual

Member Function Documentation

CARitardando * CARitardando::clone ( CAMusElement elt = 0)
virtual

Reimplemented from CAMark.

References CARitardando(), finalTempo(), CAMusElement::isPlayable(), ritardandoType(), and CAMusElement::timeLength().

Here is the call graph for this function:

int CARitardando::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.

Reimplemented from CAMark.

References finalTempo(), CAMusElement::Mark, CAMusElement::musElementType(), CAMark::Ritardando, and ritardandoType().

Here is the call graph for this function:

const int CARitardando::finalTempo ( )
inline

References _finalTempo.

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

Here is the caller graph for this function:

const CARitardandoType CARitardando::ritardandoType ( )
inline

References _ritardandoType.

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

Here is the caller graph for this function:

CARitardando::CARitardandoType CARitardando::ritardandoTypeFromString ( const QString  r)
static

References Accellerando, and Ritardando.

Referenced by CACanorusMLImport::importMark().

Here is the caller graph for this function:

const QString CARitardando::ritardandoTypeToString ( CARitardandoType  t)
static

References Accellerando, and Ritardando.

Referenced by CACanorusMLExport::exportMarks().

Here is the caller graph for this function:

void CARitardando::setFinalTempo ( const int  t)
inline

References _finalTempo.

Referenced by CARitardando().

Here is the caller graph for this function:

void CARitardando::setRitardandoType ( CARitardandoType  t)
inline

References _ritardandoType.

Referenced by CARitardando().

Here is the caller graph for this function:

Member Data Documentation

int CARitardando::_finalTempo
private

Referenced by finalTempo(), and setFinalTempo().

CARitardandoType CARitardando::_ritardandoType
private

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