Logo Search packages:      
Sourcecode: rosegarden version File versions  Download package

Rosegarden::NotationHLayout Class Reference

#include <NotationHLayout.h>

Inheritance diagram for Rosegarden::NotationHLayout:

Rosegarden::LayoutEngine Rosegarden::RulerScale

List of all members.

Detailed Description

Horizontal notation layout

computes the X coordinates of notation elements

Definition at line 64 of file NotationHLayout.h.


void incrementProgress (int)
void setOperationName (QString)
void setProgress (int)
 Report progress.

Public Member Functions

virtual void finishLayout (timeT startTime=0, timeT endTime=0)
virtual int getBarForX (double x) const
virtual double getBarPosition (int barNo) const
virtual double getBarWidth (int n) const
virtual double getBeatWidth (int n) const
Composition * getComposition () const
virtual timeT getDurationForWidth (double x, double width) const
virtual int getFirstVisibleBar () const
virtual int getFirstVisibleBarOnStaff (Staff &staff)
virtual int getLastVisibleBar () const
virtual int getLastVisibleBarOnStaff (Staff &)
virtual int getLastVisibleBarOnStaff (Staff &staff) const
virtual double getPageWidth ()
int getProportion () const
int getSpacing () const
unsigned int getStatus () const
virtual timeT getTimeForX (double x) const
virtual bool getTimeSignaturePosition (Staff &staff, int barNo, TimeSignature &timeSig, double &timeSigX)
virtual double getTotalWidth () const
virtual double getWidthForDuration (timeT startTime, timeT duration) const
virtual double getXForTime (timeT time) const
virtual double getXForTimeByEvent (timeT time) const
virtual bool isBarCorrectOnStaff (Staff &staff, int barNo)
virtual bool isPageMode ()
 NotationHLayout (Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, QObject *parent, const char *name=0)
virtual void reset ()
virtual void resetStaff (Staff &staff, timeT startTime=0, timeT endTime=0)
virtual void scanStaff (Staff &staff, timeT startTime=0, timeT endTime=0)
void setNotePixmapFactory (NotePixmapFactory *npf)
virtual void setPageMode (bool pageMode)
virtual void setPageWidth (double pageWidth)
void setProportion (int proportion)
void setSpacing (int spacing)
void setStaffCount (int staffCount)
 purely optional, used only for progress reporting

Static Public Member Functions

static std::vector< int > getAvailableProportions ()
static std::vector< int > getAvailableSpacings ()

Protected Types

typedef std::map< int, BarDataBarDataList
typedef std::map< Staff
*, BarDataList > 
typedef BarDataList::value_type BarDataPair
typedef std::map< int, double > BarPositionList
typedef std::vector< Chunk > ChunkList
typedef std::map< long,
NotationGroup * > 
typedef std::map< Staff *, int > StaffIntMap
typedef std::map< int,
NotationElementList::iterator > 

Protected Slots

virtual void slotCancel ()

Protected Member Functions

void clearBarList (Staff &)
const BarDataList & getBarData (Staff &staff) const
BarDataList & getBarData (Staff &staff)
int getBarMargin () const
int getFixedItemSpacing () const
float getLayoutWidth (ViewElement &, const ::Rosegarden::Key &) const
int getMaxRepeatedClefAndKeyWidth (int barNo)
 Find width of clef+key in the staff in which they're widest in this bar.
int getPostBarMargin () const
int getPreBarMargin () const
timeT getSpacingDuration (Staff &staff, const NotationChord &)
 Difference between absolute time of chord and of first event not in it.
timeT getSpacingDuration (Staff &staff, const NotationElementList::iterator &)
 Difference between absolute time of next event and of this.
StaffgetStaffWithWidestBar (int barNo)
 Find the staff in which bar "barNo" is widest.
NotationElementList::iterator getStartOfQuantizedSlice (NotationElementList *, timeT t) const
 Find earliest element with quantized time of t or greater.
bool isOperationCancelled () const
void layout (BarDataMap::iterator, timeT startTime, timeT endTime)
void positionChord (Staff &staff, NotationElementList::iterator &, const Clef &clef, const ::Rosegarden::Key &key, TieMap &, NotationElementList::iterator &to)
void preSquishBar (int barNo)
 For a single bar, makes sure synchronisation points align in all staves.
void reconcileBarsLinear ()
 Tries to harmonize the bar positions for all the staves (linear mode).
void reconcileBarsPage ()
 Tries to harmonize the bar positions for all the staves (page mode).
void sampleGroupElement (Staff &staff, const Clef &clef, const ::Rosegarden::Key &key, const NotationElementList::iterator &)
void scanChord (NotationElementList *notes, NotationElementList::iterator &i, const Clef &, const ::Rosegarden::Key &, AccidentalTable &, float &lyricWidth, ChunkList &chunks, int &graceCount, int ottavaShift, NotationElementList::iterator &to)
void setBarBasicData (Staff &staff, int barNo, NotationElementList::iterator start, bool correct, TimeSignature timeSig, bool newTimeSig)
void setBarSizeData (Staff &staff, int barNo, float fixedWidth, timeT actualDuration)
void throwIfCancelled ()

Protected Attributes

BarDataMap m_barData
BarPositionList m_barPositions
Composition * m_composition
NotationGroupMap m_groupsExtant
std::map< Staff *, bool > m_haveOttavaSomewhere
bool m_isCancelled
int m_keySigCancelMode
const Quantizerm_notationQuantizer
bool m_pageMode
double m_pageWidth
const NotationPropertiesm_properties
int m_proportion
int m_spacing
int m_staffCount
StaffIntMap m_staffNameWidths
unsigned int m_status
int m_timePerProgressIncrement
double m_totalWidth

Static Protected Attributes

static std::vector< int > m_availableProportions
static std::vector< int > m_availableSpacings


struct  BarData
struct  Chunk

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

Generated by  Doxygen 1.6.0   Back to index