Canorus  0.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CAFiguredBassMark Class Reference

#include <figuredbassmark.h>

Inheritance diagram for CAFiguredBassMark:
Inheritance graph
[legend]

Public Member Functions

 CAFiguredBassMark (CAFiguredBassContext *c, int timeStart, int timeLength)
 
 ~CAFiguredBassMark ()
 
CAMusElementclone (CAContext *context=0)
 
int compare (CAMusElement *elt)
 
void addNumber (int number)
 
void addNumber (int number, int accs)
 
void removeNumber (int number)
 
QList< int > & numbers ()
 
QHash< int, int > & accs ()
 
- Public Member Functions inherited from CAMusElement
 CAMusElement (CAContext *context, int timeStart, int timeLength=0)
 
virtual ~CAMusElement ()
 
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 ()
 

Private Member Functions

void insertNumber (int number)
 

Private Attributes

QList< int > _numbers
 
QHash< int, int > _accs
 

Additional Inherited Members

- Public Types inherited from CAMusElement
enum  CAMusElementType {
  Undefined = 0, Note, Rest, MidiNote,
  Barline, Clef, TimeSignature, KeySignature,
  Slur, Tuplet, Syllable, FunctionMark,
  FiguredBassMark, Mark
}
 
- Static Public Member Functions inherited from CAMusElement
static const QString musElementTypeToString (CAMusElementType)
 
static CAMusElementType musElementTypeFromString (const QString)
 
- 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
 

Constructor & Destructor Documentation

◆ CAFiguredBassMark()

CAFiguredBassMark::CAFiguredBassMark ( CAFiguredBassContext c,
int  timeStart,
int  timeLength 
)

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

References CAMusElement::FiguredBassMark, and CAMusElement::setMusElementType().

Referenced by clone().

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

◆ ~CAFiguredBassMark()

CAFiguredBassMark::~CAFiguredBassMark ( )

References CAMusElement::_context, and CAContext::remove().

Here is the call graph for this function:

Member Function Documentation

◆ accs()

QHash<int, int>& CAFiguredBassMark::accs ( )
inline

References _accs.

Referenced by addNumber(), compare(), CALayoutEngine::reposit(), and CAMainWin::updateFBMToolBar().

Here is the caller graph for this function:

◆ addNumber() [1/2]

void CAFiguredBassMark::addNumber ( int  number)

Adds or replaces the given figured bass number. The new number will not contain any accidentals. Allowed values are from 1 to 15.

References _accs, and insertNumber().

Referenced by clone(), CAMusElementFactory::configureFiguredBassNumber(), CAMainWin::on_uiFBMAccs_toggled(), CAMainWin::on_uiFBMNumber_toggled(), and CACanorusMLImport::startElement().

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

◆ addNumber() [2/2]

void CAFiguredBassMark::addNumber ( int  number,
int  accs 
)

Adds or replaces the given figured bass number. Allowed values are from 0 (no number) to 15.

Show the accidental accs:

  • +1 for one sharp
  • +2 for two sharps
  • 0 for neutral
  • -1 for one flat
  • -2 for two flats

References _accs, accs(), and insertNumber().

Here is the call graph for this function:

◆ clone()

CAMusElement * CAFiguredBassMark::clone ( CAContext context = 0)
virtual

Clones a music element with exact properties including the context.

Implements CAMusElement.

References _accs, _numbers, addNumber(), CAFiguredBassMark(), CAMusElement::context(), CAContext::contextType(), CAContext::FiguredBassContext, CAMusElement::timeLength(), and CAMusElement::timeStart().

Here is the call graph for this function:

◆ compare()

int CAFiguredBassMark::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 accs(), CAMusElement::FiguredBassMark, CAMusElement::musElementType(), and numbers().

Here is the call graph for this function:

◆ insertNumber()

void CAFiguredBassMark::insertNumber ( int  number)
private

Inserts or replaces the given number into a sorted list of numbers.

References _numbers.

Referenced by addNumber().

Here is the caller graph for this function:

◆ numbers()

QList<int>& CAFiguredBassMark::numbers ( )
inline

References _numbers.

Referenced by compare(), CAMainWin::deleteSelection(), and CALayoutEngine::reposit().

Here is the caller graph for this function:

◆ removeNumber()

void CAFiguredBassMark::removeNumber ( int  number)

Removes the given figured bass number and its accidental.

References _accs, and _numbers.

Referenced by CAMainWin::deleteSelection(), CAMainWin::on_uiFBMAccs_toggled(), and CAMainWin::on_uiFBMNumber_toggled().

Here is the caller graph for this function:

Member Data Documentation

◆ _accs

QHash<int, int> CAFiguredBassMark::_accs
private

Referenced by accs(), addNumber(), clone(), and removeNumber().

◆ _numbers

QList<int> CAFiguredBassMark::_numbers
private

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