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

NotationView Class Reference

#include <notationview.h>

Inheritance diagram for NotationView:

List of all members.

Detailed Description

NotationView is a view for one or more Staff objects, each of which contains the notation data associated with a Segment. NotationView owns the Staff objects it displays.

This class manages the relationship between NotationHLayout/ NotationVLayout and Staff data, as well as using rendering the actual notes (using NotePixmapFactory to generate the pixmaps).

Definition at line 74 of file notationview.h.

Public Slots

virtual void slotActiveItemPressed (QMouseEvent *, QCanvasItem *)
void slotAddControlRuler (int)
void slotAddDot ()
void slotAddDotNotationOnly ()
void slotAddIndication (std::string type, QString cat)
void slotAddMark ()
void slotAddSlashes ()
void slotAddTempo ()
void slotAddTimeSignature ()
void slotAltoClef ()
void slotBassClef ()
void slotBeginLilypondRepeat ()
void slotCancelCautionary ()
void slotChangeFont (const QString &newFont)
 Changes the font of the staffs on the view.
void slotChangeFont (std::string newFont, int newSize)
 Changes the font and font size of the staffs on the view.
void slotChangeFont (std::string newFont)
 Changes the font of the staffs on the view.
void slotChangeFontFromAction ()
 Changes the font of the staffs on the view, gets font name from sender.
void slotChangeFontSize (int newSize)
 Changes the font size of the staffs on the view.
void slotChangeFontSizeFromAction ()
 Changes the font size of the staffs on the view, gets size from sender.
void slotChangeFontSizeFromStringValue (const QString &)
 Changes the font size of the staffs on the view to the nth size in the available size list.
void slotChangeProportion (int newProportion)
 Changes the hlayout proportion of the staffs on the view.
void slotChangeProportionFromAction ()
 Changes the hlayout proportion of the staffs on the view.
void slotChangeProportionFromIndex (int newProportionIndex)
 Changes the hlayout proportion of the staffs on the view.
void slotChangeSpacing (int newSpacing)
 Changes the hlayout spacing of the staffs on the view.
void slotChangeSpacingFromAction ()
 Changes the hlayout spacing of the staffs on the view.
void slotChangeSpacingFromStringValue (const QString &)
 Changes the hlayout spacing of the staffs on the view.
void slotCheckRendered (double cx0, double cx1)
 Do on-demand rendering for a region.
void slotClearControlRulerItem ()
void slotClearLoop ()
void slotClearSelection ()
virtual void slotCloseWindow ()
virtual void slotCompositionStateUpdate ()
void slotContinuousPageMode ()
void slotCurrentStaffDown ()
 Change the current staff to the one following the current one.
void slotCurrentStaffUp ()
 Change the current staff to the one preceding the current one.
void slotDebugDump ()
void slotDoubleFlat ()
void slotDoubleSharp ()
void slotDrawPropertyLine ()
void slotEditAddClef ()
void slotEditAddKeySignature ()
void slotEditAddSustain (bool down)
void slotEditAddSustainDown ()
void slotEditAddSustainUp ()
void slotEditCopy ()
void slotEditCut ()
void slotEditCutAndClose ()
void slotEditDelete ()
void slotEditElement (NotationStaff *, NotationElement *, bool advanced)
void slotEditGeneralPaste ()
void slotEditLyrics ()
void slotEditPaste ()
void slotEditSelectFromStart ()
 !! these should be in matrix too
void slotEditSelectToEnd ()
void slotEditSelectWholeStaff ()
void slotEraseControlRulerItem ()
void slotEraseSelected ()
 editing tools
void slotExtendSelectionBackward (bool bar)
void slotExtendSelectionBackward ()
void slotExtendSelectionBackwardBar ()
void slotExtendSelectionForward (bool bar)
void slotExtendSelectionForward ()
void slotExtendSelectionForwardBar ()
void slotFilePrint ()
void slotFilePrintPreview ()
void slotFilterSelection ()
void slotFinePositionDown ()
void slotFinePositionLeft ()
void slotFinePositionRestore ()
void slotFinePositionRight ()
void slotFinePositionUp ()
void slotFlat ()
void slotFlipBackwards ()
void slotFlipForwards ()
void slotFollowAccidental ()
void slotFretboard ()
 fretboard tool
void slotGroupAutoBeam ()
void slotGroupBeam ()
 group slots
void slotGroupBreak ()
void slotGroupCrescendo ()
void slotGroupDecrescendo ()
void slotGroupGeneralTuplet ()
void slotGroupGlissando ()
void slotGroupGrace ()
void slotGroupMakeChord ()
void slotGroupOctave2Down ()
void slotGroupOctave2Up ()
void slotGroupOctaveDown ()
void slotGroupOctaveUp ()
void slotGroupPhrasingSlur ()
void slotGroupSimpleTuplet ()
void slotGroupSlur ()
void slotGroupTuplet (bool simple)
void slotGroupUnGrace ()
void slotGroupUnTuplet ()
void slotHoveredOverAbsoluteTimeChanged (unsigned int)
void slotHoveredOverNoteChanged (const QString &)
void slotInsertableNoteEventReceived (int pitch, int velocity, bool noteOn)
 Note-on or note-off received asynchronously -- as above.
void slotInsertableNoteOffReceived (int pitch, int velocity)
 Note-off received asynchronously -- consider step-by-step editing.
void slotInsertableNoteOnReceived (int pitch, int velocity)
 Note-on received asynchronously -- consider step-by-step editing.
void slotInsertableTimerElapsed ()
 A timer set when a note-on event was received has elapsed.
void slotInsertControlRulerItem ()
void slotInsertNoteFromAction ()
void slotInsertRest ()
void slotItemPressed (int height, int staffNo, QMouseEvent *, NotationElement *)
 Canvas actions slots.
void slotJogLeft ()
void slotJogRight ()
void slotJumpBackward ()
void slotJumpCursorToPlayback ()
 Set insert cursor to playback pointer position.
void slotJumpForward ()
void slotJumpPlaybackToCursor ()
 Set playback pointer to insert cursor position (affects playback).
void slotJumpToEnd ()
void slotJumpToStart ()
void slotLastNoteAction ()
 switch to last selected note
void slotLinearMode ()
 view menu
void slotMakeInvisible ()
void slotMakeOrnament ()
void slotMakeVisible ()
void slotMarksAddFingeringMark ()
void slotMarksAddFingeringMarkFromAction ()
void slotMarksAddTextMark ()
void slotMarksRemoveFingeringMarks ()
void slotMarksRemoveMarks ()
void slotMouseMoved (QMouseEvent *)
void slotMouseReleased (QMouseEvent *)
void slotMultiPageMode ()
void slotNatural ()
void slotNoAccidental ()
 accidental switch slots
void slotNonNotationItemPressed (QMouseEvent *e, QCanvasItem *i)
void slotNoteAction ()
 note switch slot
void slotNoteChangeAction ()
virtual void slotOpenInEventList ()
virtual void slotOpenInMatrix ()
virtual void slotOpenInNotation ()
virtual void slotOpenInPercussionMatrix ()
void slotPreviewSelection ()
 edit menu
void slotRemoveControlRuler (QWidget *)
void slotRemoveOrnament ()
void slotRenderSomething ()
 Do some background rendering work.
void slotRespellDoubleFlat ()
void slotRespellDoubleSharp ()
void slotRespellDown ()
void slotRespellFlat ()
void slotRespellNatural ()
void slotRespellRestore ()
void slotRespellSharp ()
void slotRespellUp ()
void slotSelectAllProperties ()
void slotSelectSelected ()
void slotSetCurrentStaff (int staffNo)
 Set the current staff to that with the given id.
void slotSetCurrentStaff (double canvasX, int canvasY)
 Set the current staff to the one containing the given canvas Y coord.
void slotSetInsertCursorAndRecentre (Rosegarden::timeT position, double cx, double cy)
void slotSetInsertCursorAndRecentre (Rosegarden::timeT position, double cx, int cy, bool updateNow=true)
void slotSetInsertCursorPosition (double canvasX, int canvasY)
void slotSetInsertCursorPosition (double canvasX, int canvasY, bool scroll, bool updateNow)
 Set the insert cursor position from a mouse event location.
virtual void slotSetInsertCursorPosition (Rosegarden::timeT position)
void slotSetInsertCursorPosition (Rosegarden::timeT position, bool scroll, bool updateNow)
void slotSetNoteDurations (Rosegarden::Note::Type, bool notationOnly)
void slotSetOperationNameAndStatus (QString)
void slotSetPointerPosition (Rosegarden::timeT position, bool scroll)
void slotSetPointerPosition (Rosegarden::timeT position)
void slotSetSegmentDuration ()
void slotSetSegmentStartTime ()
void slotSetStyleFromAction ()
void slotSharp ()
void slotShowCautionary ()
virtual void slotShowControllerEventsRuler ()
virtual void slotShowPropertyControlRuler ()
virtual void slotShowVelocityControlRuler ()
void slotStartControlLineItem ()
void slotStateChanged (const QString &, bool noReverse)
virtual void slotStatusHelpMsg (const QString &text)
virtual void slotStatusMsg (const QString &text)
virtual void slotStepBackward ()
void slotStepByStepTargetRequested (QObject *)
 The given QObject has originated a step-by-step-editing request.
virtual void slotStepForward ()
void slotSwitchFromNoteToRest ()
void slotSwitchFromRestToNote ()
void slotTenorClef ()
virtual void slotTestClipboard ()
void slotText ()
 text tool
void slotTextItemPressed (QMouseEvent *e, QCanvasItem *i)
void slotToggleAccidentalsToolBar ()
void slotToggleAnnotations ()
void slotToggleChordsRuler ()
void slotToggleClefsToolBar ()
void slotToggleDot ()
void slotToggleGroupToolBar ()
void slotToggleLayoutToolBar ()
void slotToggleLilyPondDirectives ()
void slotToggleMarksToolBar ()
void slotToggleMetaToolBar ()
void slotToggleNotesToolBar ()
void slotToggleRawNoteRuler ()
void slotToggleRestsToolBar ()
virtual void slotToggleSolo ()
virtual void slotToggleStatusBar ()
void slotToggleStepByStep ()
void slotToggleTempoRuler ()
virtual void slotToggleToolBar ()
void slotToggleToolsToolBar ()
void slotToggleTracking ()
 Toggle tracking with the position pointer during playback.
void slotToggleTransportToolBar ()
void slotTransformsCollapseNotes ()
void slotTransformsCollapseRests ()
void slotTransformsDeCounterpoint ()
void slotTransformsFixQuantization ()
void slotTransformsInterpret ()
void slotTransformsMakeNotesViable ()
void slotTransformsNormalizeRests ()
 transforms slots
void slotTransformsQuantize ()
void slotTransformsRemoveQuantization ()
void slotTransformsRestoreSlurs ()
void slotTransformsRestoreStems ()
void slotTransformsSlursAbove ()
void slotTransformsSlursBelow ()
void slotTransformsStemsDown ()
void slotTransformsStemsUp ()
void slotTransformsTieNotes ()
void slotTransformsUntieNotes ()
void slotTranspose ()
void slotTransposeDown ()
void slotTransposeDownOctave ()
void slotTransposeUp ()
void slotTransposeUpOctave ()
void slotTrebleClef ()
 clef switch slots
void slotUpdateAnnotationsStatus ()
void slotUpdateInsertModeStatus ()
 status stuff
void slotUpdateLilyPondDirectivesStatus ()
void slotUpdateRecordingSegment (Rosegarden::Segment *recordingSegment, Rosegarden::timeT updatedFrom)
void slotUpdateStaffName ()
void slotUseOrnament ()
void slotZoomIn ()
 Changes to the next font size up.
void slotZoomOut ()
 Changes to the next font size down.


void changeAccidental (Rosegarden::Accidental, bool follow)
void changeCurrentNote (bool isRest, Rosegarden::Note::Type)
void changeTempo (Rosegarden::timeT, Rosegarden::tempoT, Rosegarden::tempoT, TempoDialog::TempoDialogAction)
void editMetadata (QString)
void editTimeSignature (Rosegarden::timeT)
void editTriggerSegment (int)
void fastForwardPlayback ()
void fastForwardPlaybackToEnd ()
void incrementProgress (int)
void jumpPlaybackTo (Rosegarden::timeT)
void openInEventList (std::vector< Rosegarden::Segment * >)
void openInMatrix (std::vector< Rosegarden::Segment * >)
void openInNotation (std::vector< Rosegarden::Segment * >)
void openInPercussionMatrix (std::vector< Rosegarden::Segment * >)
void panic ()
void play ()
void renderComplete ()
void rewindPlayback ()
void rewindPlaybackToBeginning ()
void saveFile ()
void selectTrack (int)
void setOperationName (QString)
void setProgress (int)
 progress Report
void staffLabelChanged (Rosegarden::TrackId id, QString label)
void stepByStepTargetRequested (QObject *)
void stop ()
void toggleSolo (bool)
void usedSelection ()
void windowActivated ()

Public Member Functions

ActiveItemactiveItem ()
virtual void addCommandToHistory (KCommand *)
bool areAnnotationsVisible ()
bool areLilyPondDirectivesVisible ()
QCanvas * canvas ()
void clearPreviewNote ()
 Remove any visible preview note.
QAccel * getAccelerators ()
virtual MultiViewCommandHistorygetCommandHistory ()
Rosegarden::EventSelectiongetCurrentSelection ()
RosegardenGUIDocgetDocument ()
const RosegardenGUIDocgetDocument () const
LinedStaffgetLinedStaff (const Rosegarden::Segment &segment)
 Return a pointer to the staff corresponding to the given segment.
LinedStaffgetLinedStaff (int i)
 Return a pointer to the staff at the specified index.
NotationStaffgetNotationStaff (const Rosegarden::Segment &segment)
 Return a pointer to the staff corresponding to the given segment.
NotationStaffgetNotationStaff (int i)
 Return a pointer to the staff at the specified index.
NotePixmapFactorygetNotePixmapFactory () const
int getPageHeight ()
 Returns the page height according to the layout mode (page/linear).
void getPageMargins (int &left, int &top)
 Returns the margins within the page (zero if not in MultiPageMode).
int getPageWidth ()
 Returns the page width according to the layout mode (page/linear).
const NotationPropertiesgetProperties () const
RosegardenCanvasViewgetRawCanvasView ()
Rosegarden::StaffgetStaff (const Rosegarden::Segment &segment)
 Return a pointer to the staff corresponding to the given segment.
Rosegarden::StaffgetStaff (int i)
 Return a pointer to the staff at the specified index.
int getStaffCount ()
 Return the number of staffs.
virtual LinedStaffgetStaffForCanvasCoords (int x, int y) const
EditToolBoxgetToolBox ()
std::string getViewLocalPropertyPrefix ()
virtual void handleEventRemoved (Rosegarden::Event *event)
bool isInChordMode ()
bool isInPrintMode ()
bool isInTripletMode ()
bool isOK () const
 constructed successfully? (main reason it might not is user hit Cancel)
 NotationView (RosegardenGUIDoc *doc, std::vector< Rosegarden::Segment * > segments, QWidget *parent, NotationView *referenceView)
 NotationView (RosegardenGUIDoc *doc, std::vector< Rosegarden::Segment * > segments, QWidget *parent, bool showProgressive)
void playNote (Rosegarden::Segment &segment, int pitch, int velocity=-1)
 Sound the given note.
virtual void print (bool previewOnly=false)
virtual void readjustViewSize (QSize newSize, bool exact=false)
virtual void refreshSegment (Rosegarden::Segment *segment, Rosegarden::timeT startTime=0, Rosegarden::timeT endTime=0)
void scrollToTime (Rosegarden::timeT t)
 Scrolls the view such that the given time is centered.
void setActiveItem (ActiveItem *i)
void setCanvasCursor (const QCursor &cursor)
void setCurrentSelectedNote (NoteActionData)
void setCurrentSelectedNote (const char *pixmapName, bool isRest, Rosegarden::Note::Type, int dots=0)
virtual void setCurrentSelection (Rosegarden::EventSelection *, bool preview=false, bool redrawNow=false)
void setHeightTracking (bool t)
void setPageMode (LinedStaff::PageMode mode)
 Switches between page- and linear- layout modes.
void setSingleSelectedEvent (Rosegarden::Segment &segment, Rosegarden::Event *event, bool preview=false, bool redrawNow=false)
void setSingleSelectedEvent (int staffNo, Rosegarden::Event *event, bool preview=false, bool redrawNow=false)
void showPreviewNote (int staffNo, double layoutX, int pitch, int height, const Rosegarden::Note &note, int velocity=-1)
virtual void updateView ()

Static Public Attributes

static const char *const ConfigGroup = Rosegarden::NotationViewConfigGroup

Protected Types

enum  DeferredCursorMoveType { NoCursorMoveNeeded, CursorMoveOnly, CursorMoveAndMakeVisible, CursorMoveAndScrollToPosition }
typedef QMap< QString,
MarkActionData > 
typedef QMap< QString,
NoteActionData > 
typedef QMap< QString,
NoteChangeActionData > 

Protected Slots

virtual void slotConfigure ()
virtual void slotEditKeys ()
virtual void slotEditToolbars ()
virtual void slotSaveOptions ()
virtual void slotUpdateToolbars ()

Protected Member Functions

void addControlRuler (ControlRuler *ruler)
void addPropertyBox (QWidget *)
void addRuler (QWidget *)
virtual bool applyLayout (int staffNo=-1, Rosegarden::timeT startTime=0, Rosegarden::timeT endTime=0)
 Calls all the relevant preparse and layout methods.
bool canPreviewAnotherNote ()
virtual void closeEvent (QCloseEvent *e)
void createInsertPitchActionMenu ()
void disconnectProgress ()
void doDeferredCursorMove ()
ControlRulerfindRuler (const Rosegarden::ControlParameter &controller, int &index)
ControlRulerfindRuler (Rosegarden::PropertyName propertyName, int &index)
QVBox * getBottomWidget ()
virtual NotationCanvasViewgetCanvasView ()
QWidget * getCentralWidget ()
int getConfigDialogPageIndex ()
ControlRulergetCurrentControlRuler ()
Rosegarden::Device * getCurrentDevice ()
virtual LinedStaffgetCurrentLinedStaff ()
virtual Rosegarden::Segment * getCurrentSegment ()
virtual Rosegarden::StaffgetCurrentStaff ()
virtual Rosegarden::RulerScalegetHLayout ()
virtual Rosegarden::timeT getInsertionTime (Rosegarden::Clef &clef, Rosegarden::Key &key)
virtual Rosegarden::timeT getInsertionTime ()
int getPitchFromNoteInsertAction (QString actionName, Rosegarden::Accidental &acc, const Rosegarden::Clef &clef, const Rosegarden::Key &key)
QString getRCFileName ()
bool getSegmentsOnlyRestsAndClefs ()
KToggleAction * getToggleAction (const QString &actionName)
 Convenience function around actionCollection()->action().
virtual QSize getViewSize ()
void initActionDataMaps ()
void initLayoutToolbar ()
void initSegmentRefreshStatusIds ()
virtual void initStatusBar ()
bool isCompositionModified ()
bool isInCtor ()
ControllerEventsRulermakeControllerEventRuler (const Rosegarden::ControlParameter *controller=0)
PropertyControlRulermakePropertyControlRuler (Rosegarden::PropertyName propertyName)
std::string makeViewLocalPropertyPrefix ()
virtual void paintEvent (QPaintEvent *e)
void positionPages ()
void positionStaffs ()
void readjustCanvasSize ()
virtual void readOptions ()
void removeViewLocalProperties (Rosegarden::Event *)
void setBottomBarButtons (BarButtons *)
virtual void setCanvasView (RosegardenCanvasView *cv)
void setCompositionModified (bool)
void setConfigDialogPageIndex (int p)
void setControlRulersCurrentSegment ()
void setControlRulersZoom (QWMatrix)
virtual void setMenuStates ()
void setNotePixmapFactory (NotePixmapFactory *)
void setOneToolbar (const char *actionName, const char *toolbarName)
void setOutOfCtor ()
void setRCFileName (QString s)
void setRewFFwdToAutoRepeat ()
void setTool (EditTool *)
void setTopBarButtons (BarButtons *)
virtual void setupActions (QString rcFileName, bool haveClipboard=true)
virtual void setupActions ()
void setupAddControlRulerMenu ()
bool setupControllerTabs ()
void setupDefaultProgress ()
virtual void setupFontSizeMenu (std::string oldFontName="")
void setupProgress (RosegardenProgressDialog *)
void setupProgress (KProgress *)
virtual void setViewSize (QSize)
void showPropertyControlRuler (Rosegarden::PropertyName propertyName)
void toggleNamedToolBar (const QString &toolBarName, bool *force=0)
virtual void toggleWidget (QWidget *widget, const QString &toggleActionName)
virtual void updateBottomWidgetGeometry ()
void updateControlRulers (bool updateHPos=false)
void updateThumbnails (bool complete)
virtual void updateViewCaption ()
virtual void windowActivationChange (bool)

Protected Attributes

QAccel * m_accelerators
QLabel * m_annotationsLabel
 Displayed in the status bar, shows when annotations are hidden.
bool m_annotationsVisible
QVBox * m_bottomBox
QFrame * m_centralFrame
QCanvasItem * m_composer
unsigned int m_compositionRefreshStatusId
KConfig * m_config
int m_configDialogPageIndex
QVBoxLayout * m_controlBox
KTabWidget * m_controlRulers
QCanvasItem * m_copyright
 The current selection of Events (for cut/copy/paste).
QLabel * m_currentNotePixmap
 Displayed in the status bar, holds the pixmap of the current note.
QWMatrix m_currentRulerZoomMatrix
int m_currentStaff
DeferredCursorMoveType m_deferredCursorMove
double m_deferredCursorScrollToX
KComboBox * m_fontCombo
std::string m_fontName
int m_fontSize
KActionMenu * m_fontSizeActionMenu
KComboBox * m_fontSizeCombo
QGridLayout * m_grid
bool m_havePendingPaintEvent
QLabel * m_hoveredOverAbsoluteTime
 Displayed in the status bar, shows the absolute time the cursor is at.
QLabel * m_hoveredOverNoteName
 Displayed in the status bar, shows the pitch the cursor is at.
bool m_inCtor
bool m_inhibitRefresh
Rosegarden::timeT m_insertionTime
QLabel * m_insertModeLabel
 Displayed in the status bar, shows insertion mode.
int m_lastFinishingStaff
QString m_lastNoteAction
int m_leftGutter
QLabel * m_lilypondDirectivesLabel
 Displayed in the status bar, shows when LilyPond directives are hidden.
bool m_lilypondDirectivesVisible
unsigned int m_mainCol
KDockWidget * m_mainDockWidget
bool m_needUpdate
bool m_ok
LinedStaff::PageMode m_pageMode
std::vector< QCanvasItem * > m_pageNumbers
std::vector< QCanvasItem * > m_pages
ScrollBoxDialog * m_pannerDialog
std::vector< std::pair< int,
int > > 
QPaintEvent * m_pendingPaintEvent
bool m_playTracking
bool m_printMode
int m_printSize
RosegardenProgressBar * m_progressBar
 Displayed in the status bar, shows progress of current operation.
enum NotationView:: { ... }  m_progressDisplayer
NotationProperties m_properties
QString m_rcFileName
QTimer * m_renderTimer
QVBoxLayout * m_rulerBox
< Rosegarden::Segment * > 
std::vector< unsigned int > m_segmentsRefreshStatusIds
KAction * m_selectDefaultNote
QLabel * m_selectionCounter
 Displayed in the status bar, shows number of events selected.
KComboBox * m_spacingCombo
std::vector< NotationStaff * > m_staffs
QCanvasItem * m_subtitle
QWidget * m_tempoRuler
EditViewTimeSigNotifier * m_timeSigNotifier
QCanvasItem * m_title
std::string m_viewLocalPropertyPrefix
int m_viewNumber

Static Protected Attributes

static const unsigned int CANVASVIEW_ROW = TOPBARBUTTONS_ROW + 1
static const unsigned int CONTROLRULER_ROW = CANVASVIEW_ROW + 1
static const unsigned int CONTROLS_ROW = 0
static bool m_inPaintEvent = false
static MarkActionDataMap * m_markActionDataMap = 0
static NoteActionDataMap * m_noteActionDataMap = 0
static NoteChangeActionDataMap * m_noteChangeActionDataMap = 0
static std::set< int > m_viewNumberPool
static const unsigned int RULERS_ROW = CONTROLS_ROW + 1
static const unsigned int TOPBARBUTTONS_ROW = RULERS_ROW + 1


class ClefInserter
class NotationEraser
class NotationSelectionPaster
class NoteInserter

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

Generated by  Doxygen 1.6.0   Back to index