Chris@173: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@173: Chris@173: /* Chris@173: Sonic Visualiser Chris@173: An audio file viewer and annotation editor. Chris@173: Centre for Digital Music, Queen Mary, University of London. Chris@182: This file copyright 2006 Chris Cannam and QMUL. Chris@173: Chris@173: This program is free software; you can redistribute it and/or Chris@173: modify it under the terms of the GNU General Public License as Chris@173: published by the Free Software Foundation; either version 2 of the Chris@173: License, or (at your option) any later version. See the file Chris@173: COPYING included with this distribution for more information. Chris@173: */ Chris@173: Chris@1325: #ifndef SV_OVERVIEW_H Chris@1325: #define SV_OVERVIEW_H Chris@173: Chris@173: #include "View.h" Chris@173: Chris@173: #include Chris@274: #include Chris@173: Chris@173: class QWidget; Chris@173: class QPaintEvent; Chris@173: class Layer; Chris@173: class View; Chris@173: Chris@173: #include Chris@173: Chris@173: class Overview : public View Chris@173: { Chris@173: Q_OBJECT Chris@173: Chris@173: public: Chris@173: Overview(QWidget *parent = 0); Chris@173: Chris@211: void registerView(View *view); Chris@211: void unregisterView(View *view); Chris@173: Chris@1406: QString getPropertyContainerIconName() const override { return "panner"; } Chris@173: Chris@173: public slots: Chris@1481: void modelChangedWithin(ModelId, sv_frame_t startFrame, sv_frame_t endFrame) override; Chris@1406: void modelReplaced() override; Chris@173: Chris@1406: void globalCentreFrameChanged(sv_frame_t) override; Chris@1406: void viewCentreFrameChanged(View *, sv_frame_t) override; Chris@1406: void viewZoomLevelChanged(View *, ZoomLevel, bool) override; Chris@1406: void viewManagerPlaybackFrameChanged(sv_frame_t) override; Chris@173: Chris@965: virtual void setBoxColour(QColor); Chris@965: Chris@173: protected: Chris@1406: void paintEvent(QPaintEvent *e) override; Chris@1406: void mousePressEvent(QMouseEvent *e) override; Chris@1406: void mouseReleaseEvent(QMouseEvent *e) override; Chris@1406: void mouseMoveEvent(QMouseEvent *e) override; Chris@1406: void mouseDoubleClickEvent(QMouseEvent *e) override; Chris@1406: void enterEvent(QEvent *) override; Chris@1406: void leaveEvent(QEvent *) override; Chris@1406: bool shouldLabelSelections() const override { return false; } Chris@173: Chris@871: QColor getFillWithin() const; Chris@871: QColor getFillWithout() const; Chris@871: Chris@173: QPoint m_clickPos; Chris@173: QPoint m_mousePos; Chris@173: bool m_clickedInRange; Chris@908: sv_frame_t m_dragCentreFrame; Chris@274: QTime m_modelTestTime; Chris@965: QColor m_boxColour; Chris@173: Chris@211: typedef std::set ViewSet; Chris@211: ViewSet m_views; Chris@173: }; Chris@173: Chris@173: #endif Chris@173: