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

NoteInserter Class Reference

#include <notationtool.h>

Inheritance diagram for NoteInserter:

NotationTool EditTool BaseTool RestInserter

List of all members.

Detailed Description

This tool will insert notes on mouse click events

Definition at line 119 of file notationtool.h.

Public Slots

void slotSetAccidental (Rosegarden::Accidental, bool follow)
 Set the accidental for the notes which will be inserted.
void slotSetDots (unsigned int dots)
 Set the nb of dots the inserted note will have.
void slotSetNote (Rosegarden::Note::Type)
 Set the type of note (quaver, breve...) which will be inserted.

Public Member Functions

Rosegarden::Note getCurrentNote ()
virtual void handleEventRemoved (Rosegarden::Event *)
virtual void handleLeftButtonPress (Rosegarden::timeT, int height, int staffNo, QMouseEvent *, Rosegarden::ViewElement *el)
virtual void handleMidButtonPress (Rosegarden::timeT time, int height, int staffNo, QMouseEvent *, Rosegarden::ViewElement *)
virtual void handleMouseDoubleClick (Rosegarden::timeT time, int height, int staffNo, QMouseEvent *, Rosegarden::ViewElement *)
virtual int handleMouseMove (Rosegarden::timeT time, int height, QMouseEvent *)
virtual void handleMousePress (Rosegarden::timeT time, int height, int staffNo, QMouseEvent *event, Rosegarden::ViewElement *)
virtual void handleMouseRelease (Rosegarden::timeT time, int height, QMouseEvent *)
virtual void handleRightButtonPress (Rosegarden::timeT time, int height, int staffNo, QMouseEvent *, Rosegarden::ViewElement *)
void insertNote (Rosegarden::Segment &segment, Rosegarden::timeT insertionTime, int pitch, Rosegarden::Accidental accidental, bool suppressPreview=false)
 Insert a note as if the user has clicked at the given time & pitch.
virtual void ready ()
virtual void showMenu ()
virtual void stow ()

Static Public Attributes

static const QString ToolName = "noteinserter"

Protected Slots

void slotDoubleFlat ()
void slotDoubleSharp ()
void slotEraseSelected ()
void slotFlat ()
void slotFollowAccidental ()
void slotNatural ()
void slotNoAccidental ()
void slotRestsSelected ()
void slotSelectSelected ()
void slotSharp ()
void slotToggleAutoBeam ()
void slotToggleDot ()

Protected Member Functions

virtual void clearPreview ()
virtual bool computeLocationAndPreview (QMouseEvent *e)
virtual void createMenu (QString rcFileName)
virtual void createMenu ()
virtual Rosegarden::EventdoAddCommand (Rosegarden::Segment &, Rosegarden::timeT time, Rosegarden::timeT endTime, const Rosegarden::Note &, int pitch, Rosegarden::Accidental)
Rosegarden::timeT getOffsetWithinRest (int staffNo, const NotationElementList::iterator &, double &canvasX)
int getOttavaShift (Rosegarden::Segment &segment, Rosegarden::timeT time)
virtual bool hasMenu ()
 NoteInserter (const QString &menuName, NotationView *)
 this ctor is used by RestInserter
 NoteInserter (NotationView *)
void setRCFileName (QString rcfilename)
virtual void showPreview ()

Protected Attributes

Rosegarden::Accidental m_accidental
bool m_autoBeam
bool m_clickHappened
int m_clickHeight
double m_clickInsertX
int m_clickPitch
int m_clickStaffNo
Rosegarden::timeT m_clickTime
NoteStyleName m_defaultStyle
bool m_followAccidental
Rosegarden::Accidental m_lastAccidental
bool m_matrixInsertType
QPopupMenu * m_menu
QString m_menuName
unsigned int m_noteDots
Rosegarden::Note::Type m_noteType
KXMLGUIFactory * m_parentFactory
EditView * m_parentView
QString m_rcFileName

Static Protected Attributes

static const char * m_actionsAccidental [][4]


class NotationToolBox

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

Generated by  Doxygen 1.6.0   Back to index