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

Rosegarden::NotationTool Class Reference

#include <NotationTool.h>

Inheritance diagram for Rosegarden::NotationTool:

Rosegarden::EditTool Rosegarden::BaseTool Rosegarden::ClefInserter Rosegarden::GuitarChordInserter Rosegarden::NotationEraser Rosegarden::NotationSelectionPaster Rosegarden::NotationSelector Rosegarden::NoteInserter Rosegarden::TextInserter Rosegarden::RestInserter

List of all members.

Detailed Description

Notation tool base class.

A NotationTool represents one of the items on the notation toolbars (notes, rests, clefs, eraser, etc...). It handle mouse click events for the NotationView ('State' design pattern).

A NotationTool can have a menu, normally activated through a right mouse button click. This menu is defined in an XML file, see NoteInserter and noteinserter.rc for an example.

This class is a "semi-singleton", that is, only one instance per NotationView window is created. This is because menu creation is slow, and the fact that a tool can trigger the setting of another tool through a menu choice). This is maintained with the NotationToolBox class This means we can't rely on the ctor/dtor to perform setting up, like mouse cursor changes for instance. Use the ready() and stow() method for this.

See also:


Definition at line 56 of file NotationTool.h.


void showContextHelp (const QString &)

Public Member Functions

virtual QString getCurrentContextHelp () const
virtual void handleEventRemoved (Event *)
virtual void handleLeftButtonPress (timeT time, int height, int staffNo, QMouseEvent *event, ViewElement *)=0
virtual void handleMidButtonPress (timeT time, int height, int staffNo, QMouseEvent *, ViewElement *)
virtual void handleMouseDoubleClick (timeT time, int height, int staffNo, QMouseEvent *, ViewElement *)
virtual int handleMouseMove (timeT time, int height, QMouseEvent *)
virtual void handleMousePress (timeT time, int height, int staffNo, QMouseEvent *event, ViewElement *)
virtual void handleMouseRelease (timeT time, int height, QMouseEvent *)
virtual void handleRightButtonPress (timeT time, int height, int staffNo, QMouseEvent *, ViewElement *)
virtual void ready ()
virtual void showMenu ()
virtual void stow ()

Protected Member Functions

virtual void clearContextHelp ()
virtual void createMenu (QString rcFileName)
virtual void createMenu ()
virtual bool hasMenu ()
 NotationTool (const QString &menuName, NotationView *)
virtual void setContextHelp (const QString &help)
void setRCFileName (QString rcfilename)

Protected Attributes

QString m_contextHelp
QPopupMenu * m_menu
QString m_menuName
KXMLGUIFactory * m_parentFactory
EditView * m_parentView
QString m_rcFileName


class NotationToolBox

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

Generated by  Doxygen 1.6.0   Back to index