Canorus 0.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
CAMark Class Reference

Marks that depend on other music elements. More...

#include <mark.h>

Inheritance diagram for CAMark:
Inheritance graph
[legend]

Public Types

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 , MidiNote ,
  Barline , Clef , TimeSignature , KeySignature ,
  Slur , Tuplet , Syllable , FunctionMark ,
  FiguredBassMark , Mark
}
 

Public Member Functions

 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)
 
virtual CAMarkclone (CAMusElement *elt=0)
 
virtual int compare (CAMusElement *elt)
 
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 ()
 
virtual CAMusElementclone (CAContext *context=0)=0
 
virtual int compare (CAMusElement *elt)=0
 
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 ()
 

Static Public Member Functions

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)
 

Protected Member Functions

void setCommon (bool c)
 
- Protected Member Functions inherited from CAMusElement
void setMusElementType (CAMusElementType type)
 

Private Attributes

CAMusElement_associatedElt
 
CAMarkType _markType
 
bool _common
 

Additional Inherited Members

- 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
 

Detailed Description

Marks that depend on other music elements.

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 covers all marks that depend on other music elements. This includes all text signs, dynamic marks, articulation, fingering, etc.

Member Enumeration Documentation

◆ CAMarkType

Enumerator
Undefined 
Text 
Tempo 
Ritardando 
Dynamic 
Crescendo 
Pedal 
InstrumentChange 
BookMark 
RehersalMark 
Fermata 
RepeatMark 
Articulation 
Fingering 

Constructor & Destructor Documentation

◆ CAMark() [1/2]

CAMark::CAMark ( CAMarkType  type,
CAMusElement associatedElt,
int  timeStart = -1,
int  timeLength = -1 
)

References CAMusElement::Mark, setAssociatedElement(), setCommon(), setMarkType(), and CAMusElement::setMusElementType().

Referenced by clone().

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

◆ CAMark() [2/2]

CAMark::CAMark ( CAMarkType  type,
CAContext context,
int  timeStart,
int  timeLength 
)

References CAMusElement::Mark, setAssociatedElement(), setCommon(), setMarkType(), and CAMusElement::setMusElementType().

Here is the call graph for this function:

◆ ~CAMark()

CAMark::~CAMark ( )
virtual

References associatedElement(), and CAMusElement::removeMark().

Here is the call graph for this function:

Member Function Documentation

◆ associatedElement()

CAMusElement * CAMark::associatedElement ( )
inline

References _associatedElt.

Referenced by CAArticulation::associatedNote(), CAMainWin::deleteSelection(), and ~CAMark().

Here is the caller graph for this function:

◆ clone() [1/2]

virtual CAMark * CAMark::clone ( CAContext context)
inlinevirtual

Clones a music element with exact properties including the context.

Implements CAMusElement.

References clone(), CAMusElement::context(), and CAMusElement::setContext().

Referenced by clone().

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

◆ clone() [2/2]

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

◆ compare()

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

Reimplemented in CACrescendo, CADynamic, CAFermata, CAInstrumentChange, CARepeatMark, CARitardando, CAArticulation, CABookMark, CAFingering, CATempo, and CAText.

References CAMusElement::Mark, markType(), and CAMusElement::musElementType().

Here is the call graph for this function:

◆ isCommon()

bool CAMark::isCommon ( )
inline

References _common.

Referenced by CACanorusMLExport::exportMarks(), and CAVoice::updateTimes().

Here is the caller graph for this function:

◆ markType()

CAMarkType CAMark::markType ( )
inline

◆ markTypeFromString()

CAMark::CAMarkType CAMark::markTypeFromString ( const QString  s)
static

Converts mark type from string.

See also
markTypeToString()

References Articulation, BookMark, Crescendo, Dynamic, Fermata, Fingering, InstrumentChange, Pedal, RehersalMark, RepeatMark, Ritardando, Tempo, Text, and Undefined.

Referenced by CACanorusMLImport::importMark().

Here is the caller graph for this function:

◆ markTypeToString()

const QString CAMark::markTypeToString ( CAMark::CAMarkType  t)
static

Converts mark type to string.

See also
markTypeFromString()

References Articulation, BookMark, Crescendo, Dynamic, Fermata, Fingering, InstrumentChange, Pedal, RehersalMark, RepeatMark, Ritardando, Tempo, and Text.

Referenced by CACanorusMLExport::exportMarks().

Here is the caller graph for this function:

◆ setAssociatedElement()

void CAMark::setAssociatedElement ( CAMusElement elt)
inline

References _associatedElt, CAMusElement::_context, and CAMusElement::context().

Referenced by CAMark(), and CAArticulation::setAssociatedNote().

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

◆ setCommon()

void CAMark::setCommon ( bool  c)
inlineprotected

References _common.

Referenced by CAFingering::CAFingering(), and CAMark().

Here is the caller graph for this function:

◆ setMarkType()

void CAMark::setMarkType ( CAMarkType  type)
inline

References _markType.

Referenced by CAMark().

Here is the caller graph for this function:

Member Data Documentation

◆ _associatedElt

CAMusElement* CAMark::_associatedElt
private

◆ _common

bool CAMark::_common
private

Is mark present in all music elements in the chord. Default: True.

The exception is the fingering which is assigned explicitly to the specific note inside the chord

Referenced by isCommon(), and setCommon().

◆ _markType

CAMarkType CAMark::_markType
private

Referenced by markType(), and setMarkType().


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