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

NotationStaff Class Reference

#include <notationstaff.h>

Inheritance diagram for NotationStaff:

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 51 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 }

Signals

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 (Rosegarden::timeT from, Rosegarden::timeT to)
virtual void clearPreviewNote ()
virtual bool containsCanvasCoords (double canvasX, int canvasY) const
virtual void deleteRepeatedClefsAndKeys ()
virtual void deleteTimeSignatures ()
virtual bool doRenderWork (Rosegarden::timeT from, Rosegarden::timeT to)
virtual void drawStaffName ()
virtual void endMarkerTimeChanged (const Segment *, bool shorten)
virtual void eventAdded (const Segment *, Event *)
virtual void eventRemoved (const Rosegarden::Segment *, Rosegarden::Event *)
ViewElementList::iterator findEvent (Rosegarden::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, Rosegarden::Clef &clef, Rosegarden::Key &key) const
virtual
Rosegarden::ViewElementList::iterator 
getClosestElementToCanvasCoords (double x, int y, Rosegarden::Event *&clef, Rosegarden::Event *&key, bool notesAndRestsOnly=false, int proximityThreshold=10)
virtual
Rosegarden::ViewElementList::iterator 
getClosestElementToLayoutX (double x, Rosegarden::Event *&clef, Rosegarden::Event *&key, bool notesAndRestsOnly=false, int proximityThreshold=10)
virtual
Rosegarden::ViewElementList::iterator 
getElementUnderCanvasCoords (double x, int y, Rosegarden::Event *&clef, Rosegarden::Event *&key)
virtual
Rosegarden::ViewElementList::iterator 
getElementUnderLayoutX (double x, Rosegarden::Event *&clef, Rosegarden::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
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, Rosegarden::Accidental accidental=Rosegarden::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 ()
virtual int getTitleHeight () const
virtual int getTotalHeight () const
virtual double getTotalWidth () const
ViewElementList * getViewElementList (Segment::iterator from, Segment::iterator to)
ViewElementList * getViewElementList ()
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 Rosegarden::TimeSignature &timeSig)
virtual bool isStaffNameUpToDate ()
virtual void markChanged (Rosegarden::timeT from=0, Rosegarden::timeT to=0, bool movedOnly=false)
 NotationStaff (QCanvas *, Rosegarden::Segment *, Rosegarden::SnapGrid *, int id, NotationView *view, std::string fontName, int resolution)
virtual void positionAllElements ()
virtual void positionElements (Rosegarden::timeT from, Rosegarden::timeT to)
void removeObserver (StaffObserver *obs)
virtual void renderAllElements ()
virtual void renderElements (Rosegarden::ViewElementList::iterator from, Rosegarden::ViewElementList::iterator to)
virtual void renderElements (NotationElementList::iterator from, NotationElementList::iterator to)
virtual void renderPrintable (Rosegarden::timeT from, Rosegarden::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 (Rosegarden::HorizontalLayoutEngine &, Rosegarden::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 (Rosegarden::HorizontalLayoutEngine &, Rosegarden::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 Rosegarden::Note &note)
virtual void sizeStaff (Rosegarden::HorizontalLayoutEngine &layout)
virtual bool wrapEvent (Rosegarden::Event *)

Protected Types

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

Protected Slots

virtual void slotCancel ()

Protected Member Functions

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 (Rosegarden::timeT)
NotationElementList::iterator findUnchangedBarStart (Rosegarden::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 Rosegarden::TimeSignature &, int barNo, bool showBarNo)
bool isDirectlyPrintable (Rosegarden::ViewElement *elt)
bool isOperationCancelled () const
bool isSelected (NotationElementList::iterator)
virtual Rosegarden::ViewElementmakeViewElement (Rosegarden::Event *)
void notifyAdd (ViewElement *) const
void notifyRemove (ViewElement *) const
void notifySourceDeletion () const
virtual void renderNote (Rosegarden::ViewElementList::iterator &)
virtual void renderSingleElement (Rosegarden::ViewElementList::iterator &, const Rosegarden::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
NotePixmapFactorym_graceNotePixmapFactory
int m_id
QCanvasLine * m_insertCursor
bool m_isCancelled
FastVector< KeyChange > m_keyChanges
int m_keySigCancelMode
std::pair< int, int > m_lastRenderCheck
int m_legerLineCount
int m_lineThickness
double m_margin
NotationViewm_notationView
NotePixmapFactorym_notePixmapFactory
ObserverSet m_observers
PageMode m_pageMode
double m_pageWidth
QCanvasLine * m_pointer
QCanvasSimpleSpritem_previewSprite
QPainter * m_printPainter
bool m_ready
ItemSet m_repeatedClefsAndKeys
int m_resolution
int m_rowSpacing
int m_rowsPerPage
Segment & m_segment
bool m_showRanges
bool m_showUnknowns
Rosegarden::SnapGridm_snapGrid
ItemList m_staffConnectingLines
ItemMatrix m_staffLines
QCanvasSimpleSpritem_staffName
std::string m_staffNameText
double m_startLayoutX
BarStatusMap m_status
SpriteSet m_timeSigs
int m_titleHeight
ViewElementList * m_viewElementList
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