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

Tempo mark. More...

#include <tempo.h>

Inheritance diagram for CATempo:
Inheritance graph
[legend]

Public Member Functions

 CATempo (CAPlayableLength l, int bpm, CAMusElement *m)
 
virtual ~CATempo ()
 
CATempoclone (CAMusElement *elt=0)
 
int compare (CAMusElement *elt)
 
int bpm ()
 
void setBpm (int bpm)
 
CAPlayableLength beat ()
 
void setBeat (CAPlayableLength l)
 
int beatDotted ()
 
void setBeatDotted (int dotted)
 
- 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 ()
 

Private Attributes

CAPlayableLength _beat
 
int _beatDotted
 
int _bpm
 

Additional Inherited Members

- Public Types inherited from CAMark
enum  CAMarkType {
  Undefined = -1, Text, Tempo, Ritardando,
  Dynamic, Crescendo, Pedal, InstrumentChange,
  BookMark, RehersalMark, Fermata, RepeatMark,
  Articulation, Fingering
}
 
- Static Public Member Functions inherited from CAMark
static const QString markTypeToString (CAMarkType t)
 
static CAMarkType markTypeFromString (const QString s)
 
- 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

Tempo mark.

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

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

Sets and shows the tempo mark. It consists of the note (beat) and beats per minute number.

Constructor & Destructor Documentation

CATempo::CATempo ( CAPlayableLength  l,
int  bpm,
CAMusElement m 
)

References setBeat(), and setBpm().

Referenced by clone().

Here is the call graph for this function:

Here is the caller graph for this function:

CATempo::~CATempo ( )
virtual

Member Function Documentation

CAPlayableLength CATempo::beat ( )
inline

References _beat.

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

Here is the caller graph for this function:

int CATempo::beatDotted ( )
inline

References _beatDotted.

Referenced by compare().

Here is the caller graph for this function:

int CATempo::bpm ( )
inline

References _bpm.

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

Here is the caller graph for this function:

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

Reimplemented from CAMark.

References beat(), bpm(), and CATempo().

Here is the call graph for this function:

int CATempo::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 beat(), beatDotted(), bpm(), CAMusElement::Mark, CAMusElement::musElementType(), and CAMark::Tempo.

Here is the call graph for this function:

void CATempo::setBeat ( CAPlayableLength  l)
inline

References _beat.

Referenced by CATempo(), and CAMainWin::on_uiTempoBeat_toggled().

Here is the caller graph for this function:

void CATempo::setBeatDotted ( int  dotted)
inline

References _beatDotted.

void CATempo::setBpm ( int  bpm)
inline

References _bpm, and bpm().

Referenced by CATempo(), and CAMainWin::on_uiTempoBpm_returnPressed().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

CAPlayableLength CATempo::_beat
private

Referenced by beat(), and setBeat().

int CATempo::_beatDotted
private

Referenced by beatDotted(), and setBeatDotted().

int CATempo::_bpm
private

Referenced by bpm(), and setBpm().


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