1 /***************************************************************************
2 trackpanelfunction.h - description
4 begin : Sun May 18 2003
5 copyright : (C) 2003 by Jason Wood
6 email : jasonwood@blueyonder.co.uk
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
17 #ifndef TRACKPANELFUNCTION_H
18 #define TRACKPANELFUNCTION_H
23 #include "documenttrack.h"
29 Abstract Base Class for track panel functionality decorators. This and it's
30 derived classes allow different behaviours to be added to panels as required.
33 */ class TrackPanelFunction:public QObject
38 virtual ~ TrackPanelFunction();
41 Returns true if the specified position should cause this function to activate,
42 otherwise returns false.
44 virtual bool mouseApplies(DocumentTrack * panel,
45 QMouseEvent * event) const = 0;
48 Returns a relevant mouse cursor for the given mouse position
50 virtual QCursor getMouseCursor(DocumentTrack * panel,
51 QMouseEvent * event) = 0;
54 A mouse button has been pressed. Returns true if we want to handle this event
56 virtual bool mousePressed(DocumentTrack * panel,
57 QMouseEvent * event) = 0;
59 virtual bool mouseDoubleClicked(DocumentTrack * panel, QMouseEvent * event) = 0;
62 Mouse Release Events in the track view area. Returns true if we have finished
65 virtual bool mouseReleased(DocumentTrack * panel,
66 QMouseEvent * event) = 0;
69 Processes Mouse Move events in the track view area. Returns true if we are
70 continuing with the drag.*/
71 virtual bool mouseMoved(DocumentTrack * panel,
72 QMouseEvent * event) = 0;
76 virtual bool dragEntered(DocumentTrack * , QDragEnterEvent *) {
79 virtual bool dragMoved(DocumentTrack * , QDragMoveEvent *) {
82 virtual bool dragLeft(DocumentTrack * , QDragLeaveEvent *) {
85 virtual bool dragDropped(DocumentTrack * , QDropEvent *) {