Chris@867: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@867: Chris@867: /* Chris@867: Sonic Visualiser Chris@867: An audio file viewer and annotation editor. Chris@867: Centre for Digital Music, Queen Mary, University of London. Chris@867: This file copyright 2006-2014 Chris Cannam and QMUL. Chris@867: Chris@867: This program is free software; you can redistribute it and/or Chris@867: modify it under the terms of the GNU General Public License as Chris@867: published by the Free Software Foundation; either version 2 of the Chris@867: License, or (at your option) any later version. See the file Chris@867: COPYING included with this distribution for more information. Chris@867: */ Chris@867: Chris@867: #ifndef ALIGNMENT_VIEW_H Chris@867: #define ALIGNMENT_VIEW_H Chris@867: Chris@867: #include "View.h" Chris@867: Chris@867: class AlignmentView : public View Chris@867: { Chris@867: Q_OBJECT Chris@867: Chris@867: public: Chris@867: AlignmentView(QWidget *parent = 0); Chris@1406: QString getPropertyContainerIconName() const override { return "alignment"; } Chris@867: Chris@1615: void setAboveView(View *view); Chris@1615: void setBelowView(View *view); Chris@1615: void setReferenceView(View *view); Chris@867: Chris@867: public slots: Chris@1406: void globalCentreFrameChanged(sv_frame_t) override; Chris@1406: void viewCentreFrameChanged(View *, sv_frame_t) override; Chris@1493: Chris@1183: virtual void viewAboveZoomLevelChanged(ZoomLevel, bool); Chris@1183: virtual void viewBelowZoomLevelChanged(ZoomLevel, bool); Chris@1493: Chris@1406: void viewManagerPlaybackFrameChanged(sv_frame_t) override; Chris@867: Chris@1493: void keyFramesChanged(); Chris@1493: Chris@867: protected: Chris@1406: void paintEvent(QPaintEvent *e) override; Chris@1406: bool shouldLabelSelections() const override { return false; } Chris@867: Chris@1615: void buildMaps(); Chris@1493: Chris@1493: std::vector getKeyFrames(View *, sv_frame_t &resolution); Chris@976: std::vector getDefaultKeyFrames(); Chris@868: Chris@1493: ModelId getSalientModel(View *); Chris@1493: Chris@1493: void reconnectModels(); Chris@1493: Chris@867: View *m_above; Chris@867: View *m_below; Chris@1615: View *m_reference; Chris@1493: Chris@1615: QMutex m_mapsMutex; Chris@1615: std::multimap m_fromAboveMap; Chris@1615: std::multimap m_fromReferenceMap; Chris@1615: sv_frame_t m_leftmostAbove; Chris@1615: sv_frame_t m_rightmostAbove; Chris@867: }; Chris@867: Chris@867: #endif