Chris@0: Chris@0: /* -*- c-basic-offset: 4 -*- vi:set ts=8 sts=4 sw=4: */ Chris@0: Chris@0: /* Chris@0: A waveform viewer and audio annotation editor. Chris@0: Chris Cannam, Queen Mary University of London, 2005 Chris@0: Chris@0: This is experimental software. Not for distribution. Chris@0: */ Chris@0: Chris@0: #ifndef _PANE_H_ Chris@0: #define _PANE_H_ Chris@0: Chris@0: #include Chris@0: #include Chris@0: Chris@0: #include "base/ZoomConstraint.h" Chris@0: #include "base/View.h" Chris@0: Chris@0: class QWidget; Chris@0: class QPaintEvent; Chris@0: class Layer; Chris@0: Chris@0: class Pane : public View Chris@0: { Chris@0: Q_OBJECT Chris@0: Chris@0: public: Chris@0: Pane(QWidget *parent = 0); Chris@0: virtual QString getPropertyContainerIconName() const { return "pane"; } Chris@0: Chris@0: virtual bool shouldIlluminateLocalFeatures(const Layer *layer, QPoint &pos); Chris@0: Chris@0: void setCentreLineVisible(bool visible); Chris@0: bool getCentreLineVisible() const { return m_centreLineVisible; } Chris@0: Chris@0: signals: Chris@0: void paneInteractedWith(); Chris@0: Chris@0: protected: Chris@0: virtual void paintEvent(QPaintEvent *e); Chris@0: virtual void mousePressEvent(QMouseEvent *e); Chris@0: virtual void mouseReleaseEvent(QMouseEvent *e); Chris@0: virtual void mouseMoveEvent(QMouseEvent *e); Chris@0: virtual void mouseDoubleClickEvent(QMouseEvent *e); Chris@0: virtual void leaveEvent(QEvent *e); Chris@0: virtual void wheelEvent(QWheelEvent *e); Chris@0: Chris@0: bool m_identifyFeatures; Chris@0: QPoint m_identifyPoint; Chris@0: QPoint m_clickPos; Chris@0: QPoint m_mousePos; Chris@0: bool m_clickedInRange; Chris@0: bool m_shiftPressed; Chris@0: size_t m_dragCentreFrame; Chris@0: bool m_centreLineVisible; Chris@0: }; Chris@0: Chris@0: #endif Chris@0: