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

Rosegarden::NotationStaff Class Reference

#include <NotationStaff.h>

Inheritance diagram for Rosegarden::NotationStaff:

Rosegarden::LinedStaff Rosegarden::Staff

List of all members.

Detailed Description

The Staff is a repository for information about the notation representation of a single Segment. This includes all of the NotationElements representing the Events on that Segment, the staff lines, as well as basic positional and size data. This class used to be in gui/staff.h, but it's been moved and renamed following the introduction of the core Staff base class, and much of the functionality has been extracted into the LinedStaff base class.

Definition at line 77 of file NotationStaff.h.

Public Types

enum  BarStyle {
  PlainBar = 0, DoubleBar, HeavyDoubleBar, RepeatEndBar,
  RepeatStartBar, RepeatBothBar, NoVisibleBar
typedef std::pair< double, int > LinedStaffCoords
enum  PageMode { LinearMode = 0, ContinuousPageMode, MultiPageMode }


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

Public Member Functions

void addObserver (StaffObserver *obs)
virtual void appearanceChanged (const Segment *)
virtual void changeFont (std::string fontName, int resolution)
virtual bool checkRendered (timeT from, timeT to)
virtual void clearPreviewNote ()
virtual bool containsCanvasCoords (double canvasX, int canvasY) const
virtual void deleteRepeatedClefsAndKeys ()
virtual void deleteTimeSignatures ()
virtual bool doRenderWork (timeT from, timeT to)
virtual void drawStaffName ()
virtual void endMarkerTimeChanged (const Segment *, bool shorten)
virtual void eventAdded (const Segment *, Event *)
virtual void eventRemoved (const Segment *, Event *)
ViewElementList::iterator findEvent (Event *)
virtual QRect getBarExtents (double x, int y) const
virtual double getBarInset (int barNo, bool isFirstBarInRow) const
LinedStaffCoords getCanvasCoordsForLayoutCoords (double x, int y) const
 !! fix NotationView::scrollToTime
virtual int getCanvasYForHeight (int height, double baseX=-1, int baseY=-1) const
virtual void getClefAndKeyAtCanvasCoords (double x, int y, Clef &clef,::Rosegarden::Key &key) const
virtual ViewElementList::iterator getClosestElementToCanvasCoords (double x, int y, Event *&clef, Event *&key, bool notesAndRestsOnly=false, int proximityThreshold=10)
virtual ViewElementList::iterator getClosestElementToLayoutX (double x, Event *&clef, Event *&key, bool notesAndRestsOnly=false, int proximityThreshold=10)
virtual ViewElementList::iterator getElementUnderCanvasCoords (double x, int y, Event *&clef, Event *&key)
virtual ViewElementList::iterator getElementUnderLayoutX (double x, Event *&clef, Event *&key)
virtual int getHeightAtCanvasCoords (double x, int y) const
virtual int getHeightOfRow () const
virtual int getId () const
virtual void getInsertCursorPosition (double &x, int &y) const
virtual timeT getInsertCursorTime (HorizontalLayoutEngine &) const
LinedStaffCoords getLayoutCoordsForCanvasCoords (double x, int y) const
 !! fix NotationView::doDeferredCursorMove
virtual double getLayoutXOfInsertCursor () const
virtual double getLayoutXOfPointer () const
virtual int getLayoutYForHeight (int height) const
int getLineSpacing () const
virtual double getMargin () const
virtual std::string getNoteNameAtCanvasCoords (double x, int y, Accidental accidental=Accidentals::NoAccidental) const
virtual NotePixmapFactorygetNotePixmapFactory (bool grace)
int getPageCount () const
virtual void getPointerPosition (double &x, int &y) const
const NotationPropertiesgetProperties () const
int getRowSpacing ()
const Segment & getSegment () const
Segment & getSegment ()
timeT getTimeAtCanvasCoords (double x, int y) const
virtual int getTitleHeight () const
virtual int getTotalHeight () const
virtual double getTotalWidth () const
ViewElementListgetViewElementList (Segment::iterator from, Segment::iterator to)
ViewElementListgetViewElementList ()
virtual double getX () const
virtual int getY () const
virtual void hideInsertCursor ()
virtual void hidePointer ()
virtual void insertRepeatedClefAndKey (double layoutX, int barNo)
virtual void insertTimeSignature (double layoutX, const TimeSignature &timeSig)
virtual bool isStaffNameUpToDate ()
virtual void markChanged (timeT from=0, timeT to=0, bool movedOnly=false)
 NotationStaff (QCanvas *, Segment *, SnapGrid *, int id, NotationView *view, std::string fontName, int resolution)
virtual void positionAllElements ()
virtual void positionElements (timeT from, timeT to)
void removeObserver (StaffObserver *obs)
virtual void renderAllElements ()
virtual void renderElements (NotationElementList::iterator from, NotationElementList::iterator to)
virtual void renderPrintable (timeT from, timeT to)
virtual void segmentDeleted (const Segment *)
void setBarNumbersEvery (int barNumbersEvery)
virtual void setCurrent (bool current)
virtual void setInsertCursorPosition (double x, int y)
virtual void setInsertCursorPosition (HorizontalLayoutEngine &, timeT)
void setLegerLineCount (int legerLineCount)
virtual void setMargin (double m)
virtual void setPointerPosition (double x)
virtual void setPointerPosition (double x, int y)
virtual void setPointerPosition (HorizontalLayoutEngine &, timeT)
virtual void setPrintPainter (QPainter *painter)
virtual void setTitleHeight (int h)
virtual void setX (double x)
virtual void setY (int y)
virtual void showPreviewNote (double layoutX, int heightOnStaff, const Note &note, bool grace)
virtual void sizeStaff (HorizontalLayoutEngine &layout)
virtual void startChanged (const Segment *, timeT)
virtual bool wrapEvent (Event *)

Protected Types

typedef FastVector< BarLine * > BarLineList
enum  BarStatus { UnRendered = 0, Rendered, Positioned }
typedef std::map< int, BarStatus > BarStatusMap
typedef std::pair< int, ClefClefChange
enum  FitPolicy { PretendItFittedAllAlong = 0, MoveBackToFit, SplitToFit }
typedef std::vector
< QCanvasItem * > 
typedef std::vector< ItemList > ItemMatrix
typedef std::set< QCanvasItem * > ItemSet
typedef std::pair< int,::Rosegarden::KeyKeyChange
typedef std::pair< double,
QCanvasItem * > 
typedef FastVector< LineRec > LineRecList
typedef std::list
< StaffObserver * > 
typedef std::set
< QCanvasSimpleSprite * > 

Protected Slots

virtual void slotCancel ()

Protected Member Functions

void checkAndCompleteClefsAndKeys (int bar)
virtual void clearStaffLineRow (int row)
virtual void deleteBars ()
virtual bool elementNotMoved (NotationElement *)
virtual bool elementNotMovedInY (NotationElement *)
virtual bool elementShiftedOnly (NotationElementList::iterator)
virtual bool elementsInSpaces () const
NotationElementList::iterator findUnchangedBarEnd (timeT)
NotationElementList::iterator findUnchangedBarStart (timeT)
int getBarLineHeight () const
virtual BarStyle getBarStyle (int barNo) const
virtual int getBottomLineHeight () const
LinedStaffCoords getCanvasOffsetsForLayoutCoords (double x, int y) const
double getCanvasXForLayoutX (double x) const
double getCanvasXForLeftOfRow (int row) const
double getCanvasXForRightOfRow (int row) const
int getCanvasYForTopLine (int row=-1) const
int getCanvasYForTopOfStaff (int row=-1) const
virtual int getHeightPerLine () const
virtual int getLegerLineCount () const
virtual int getLineCount () const
int getRowForCanvasCoords (double x, int y) const
int getRowForLayoutX (double x) const
int getRowsPerPage () const
int getTopLineHeight () const
int getTopLineOffset () const
void initCursors ()
virtual void insertBar (double layoutX, double width, bool isCorrect, const TimeSignature &, int barNo, bool showBarNo)
bool isDirectlyPrintable (ViewElement *elt)
bool isOperationCancelled () const
bool isSelected (NotationElementList::iterator)
virtual ViewElementmakeViewElement (Event *)
void notifyAdd (ViewElement *) const
void notifyRemove (ViewElement *) const
void notifySourceDeletion () const
virtual void renderNote (ViewElementList::iterator &)
virtual void renderSingleElement (ViewElementList::iterator &, const Clef &, const ::Rosegarden::Key &, bool selected)
virtual void resizeStaffLineRow (int row, double offset, double length)
virtual void resizeStaffLines ()
virtual void setConnectingLineLength (int length)
 Subclass may wish to expose this. Default is zero.
virtual void setLineThickness (int lineThickness)
 Subclass may wish to expose this.
virtual void setPageMode (PageMode pageMode)
 Subclass may wish to expose this.
virtual void setPageWidth (double pageWidth)
 Subclass may wish to expose this.
virtual double setPainterClipping (QPainter *, double layoutX, int layoutY, double dx, double w, LinedStaffCoords &coords, FitPolicy policy)
virtual void setPixmap (NotationElement *, QCanvasPixmap *, int z, FitPolicy policy)
virtual void setResolution (int resolution)
 Subclass may wish to expose this.
virtual void setRowSpacing (int rowSpacing)
 Subclass may wish to expose this.
virtual void setRowsPerPage (int rowsPerPage)
 Subclass may wish to expose this.
void setTuplingParameters (NotationElement *, NotePixmapParameters &)
virtual int showBarNumbersEvery () const
virtual bool showBeatLines () const
void throwIfCancelled ()
void truncateClefsAndKeysAt (int)

Static Protected Member Functions

static bool compareBars (const BarLine *, const BarLine *)
 !! should be multiset I reckon
static bool compareBarToLayoutX (const BarLine *, int)

Protected Attributes

LineRecList m_barConnectingLines
BarLineList m_barLines
ItemList m_barNumbers
int m_barNumbersEvery
LineRecList m_beatLines
QCanvas * m_canvas
FastVector< ClefChange > m_clefChanges
bool m_colourQuantize
int m_connectingLineLength
bool m_current
double m_endLayoutX
int m_id
QCanvasLine * m_insertCursor
timeT m_insertCursorTime
bool m_insertCursorTimeValid
bool m_isCancelled
FastVector< KeyChange > m_keyChanges
int m_keySigCancelMode
std::pair< int, int > m_lastRenderCheck
int m_lastRenderedBar
int m_legerLineCount
int m_lineThickness
double m_margin
ObserverSet m_observers
PageMode m_pageMode
double m_pageWidth
QCanvasLine * m_pointer
QPainter * m_printPainter
bool m_ready
ItemSet m_repeatedClefsAndKeys
int m_resolution
int m_rowSpacing
int m_rowsPerPage
Segment & m_segment
bool m_showCollisions
bool m_showRanges
bool m_showUnknowns
ItemList m_staffConnectingLines
ItemMatrix m_staffLines
std::string m_staffNameText
double m_startLayoutX
BarStatusMap m_status
SpriteSet m_timeSigs
int m_titleHeight
double m_x
int m_y

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

Generated by  Doxygen 1.6.0   Back to index