Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
CAInstrumentChange Class Reference

Instrument change during the score. More...

#include <instrumentchange.h>

Inheritance diagram for CAInstrumentChange:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CAInstrumentChange (int instrument, CANote *note)
virtual ~CAInstrumentChange ()
CAInstrumentChangeclone (CAMusElement *elt=0)
int compare (CAMusElement *)
const int instrument ()
void setInstrument (const int instrument)

Private Attributes

int _instrument

Detailed Description

Instrument change during the score.

    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.



    This class is used to allow the playback to change the default voice instrument.
Todo:
Instrument is now int. This should probably be moved out someday to enum (eg. into CAInstrument?).

Constructor & Destructor Documentation

CAInstrumentChange::CAInstrumentChange ( int  instrument,
CANote note 
)

References setInstrument().

Referenced by clone().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Function Documentation

Reimplemented from CAMark.

References CAInstrumentChange(), instrument(), CAMusElement::musElementType(), and CAMusElement::Note.

Here is the call graph for this function:

int CAInstrumentChange::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 instrument(), CAMark::InstrumentChange, CAMusElement::Mark, and CAMusElement::musElementType().

Here is the call graph for this function:

References _instrument.

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

Here is the caller graph for this function:

void CAInstrumentChange::setInstrument ( const int  instrument) [inline]

References _instrument, and instrument().

Referenced by CAInstrumentChange(), and CAMainWin::on_uiInstrumentChange_activated().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Referenced by instrument(), and setInstrument().


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