Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | Related Pages

TimeConstraint Class Reference

#include <TimeConstraint.h>

List of all members.

Public Member Functions

 TimeConstraint ()
 ~TimeConstraint ()
void reset (double)
void moveX (double)
void moveXAfterDivision (int, double)
double getMinimumXAttribute (int)
double getMinimumX (int)
double getLastX ()
double getFirstXNote ()
void setMinimumXNote (int, double)
void setMinimumXAttribute (int, double)
void sideMapMusicSymbol (int start, MusicSymbol *ms)
void mapMusicSymbol (int start, int end, MusicSymbol *ms)
void adjustSize (int)
int countWhiteSpace ()
QString toString ()
void applyKerning (double)


Detailed Description

This class represent the time constrain of a measure It give the minimu xstart position for a given time The time are discrete and have the size of the divisions * nbbeats of a measure


Constructor & Destructor Documentation

TimeConstraint::TimeConstraint  ) 
 

Construct a time constraint

TimeConstraint::~TimeConstraint  ) 
 

Detructor of the time constraint not implemnted yet


Member Function Documentation

void TimeConstraint::adjustSize int  newsize  ) 
 

This adjust the size of the vector

Parameters:
newsize the new size

void TimeConstraint::applyKerning double  kerning  ) 
 

This apply the kerning is the extra white we add

double TimeConstraint::getFirstXNote  ) 
 

Returns:
the first note x coord

double TimeConstraint::getLastX  ) 
 

Returns:
the x position of the last division

double TimeConstraint::getMinimumX int  div  ) 
 

Returns:
the minimum x for the division div in the measure

double TimeConstraint::getMinimumXAttribute int  attributeSeq  ) 
 

Returns:
the minimum x for the attributes of sequence number attributeSeq in the beginning of measure

void TimeConstraint::mapMusicSymbol int  start,
int  end,
MusicSymbol ms
 

This function associate a music symbol to a division this set the minimum X note to ms->getX()+ms->length()

Parameters:
ms the music symbol to put on the division
start the start division of the note related with the ms
start the end division of the note related with the ms

void TimeConstraint::moveX double  movement  ) 
 

Is called in the second pass it displace the whole time constraint to X by substracting the difference to all the elements of the time constraint This also move the attributes

Parameters:
movement the x movement

void TimeConstraint::moveXAfterDivision int  start,
double  movement
 

Move all the note after the start division of the value specified by the movement variable Note : This does not move the atributes

Parameters:
movement the x movement
start the start division

void TimeConstraint::reset double  start  ) 
 

Is called by the Constructor and when a new line is started. It set all the minimum x to start

Parameters:
start : the x start

void TimeConstraint::setMinimumXAttribute int  attributeSeq,
double  minix
 

Set the minimum x for the division div Consequently it also set the minimum x for the following divisions

void TimeConstraint::setMinimumXNote int  div,
double  minix
 

Set the minimum x for the division div Consequently it also set the minimum x for the following divisions Implementation Notes : The two fields manipulated by this method

  • divisionMap
  • constraints[] are not implicitly coherent. That is why you must pay attention that each time you modify one, you also modify the other this method imply that a division support is created for each division whitch is going against the principe of concetion. A good optimisation is to look at this.

void TimeConstraint::sideMapMusicSymbol int  start,
MusicSymbol ms
 

This attach to the left a music symbol on the division map. This is useful for grace notes. this function works fine in quite rare case. For instance, this assume that the length of the side symbol is always the same. actually the set minimumXnote should use the greatest length of all the side symbols

QString TimeConstraint::toString  ) 
 

Returns:
a strfing representation of the time constraint


The documentation for this class was generated from the following files:
Generated on Tue Jun 1 21:13:37 2004 for Alternate Take by doxygen 1.3.6