annotate view/AlignmentView.h @ 1617:cbbb411da977

Merge
author Chris Cannam
date Tue, 21 Jul 2020 14:02:12 +0100
parents 911330a28a7c
children
rev   line source
Chris@867 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@867 2
Chris@867 3 /*
Chris@867 4 Sonic Visualiser
Chris@867 5 An audio file viewer and annotation editor.
Chris@867 6 Centre for Digital Music, Queen Mary, University of London.
Chris@867 7 This file copyright 2006-2014 Chris Cannam and QMUL.
Chris@867 8
Chris@867 9 This program is free software; you can redistribute it and/or
Chris@867 10 modify it under the terms of the GNU General Public License as
Chris@867 11 published by the Free Software Foundation; either version 2 of the
Chris@867 12 License, or (at your option) any later version. See the file
Chris@867 13 COPYING included with this distribution for more information.
Chris@867 14 */
Chris@867 15
Chris@867 16 #ifndef ALIGNMENT_VIEW_H
Chris@867 17 #define ALIGNMENT_VIEW_H
Chris@867 18
Chris@867 19 #include "View.h"
Chris@867 20
Chris@867 21 class AlignmentView : public View
Chris@867 22 {
Chris@867 23 Q_OBJECT
Chris@867 24
Chris@867 25 public:
Chris@867 26 AlignmentView(QWidget *parent = 0);
Chris@1406 27 QString getPropertyContainerIconName() const override { return "alignment"; }
Chris@867 28
Chris@1615 29 void setAboveView(View *view);
Chris@1615 30 void setBelowView(View *view);
Chris@1615 31 void setReferenceView(View *view);
Chris@867 32
Chris@867 33 public slots:
Chris@1406 34 void globalCentreFrameChanged(sv_frame_t) override;
Chris@1406 35 void viewCentreFrameChanged(View *, sv_frame_t) override;
Chris@1493 36
Chris@1183 37 virtual void viewAboveZoomLevelChanged(ZoomLevel, bool);
Chris@1183 38 virtual void viewBelowZoomLevelChanged(ZoomLevel, bool);
Chris@1493 39
Chris@1406 40 void viewManagerPlaybackFrameChanged(sv_frame_t) override;
Chris@867 41
Chris@1493 42 void keyFramesChanged();
Chris@1493 43
Chris@867 44 protected:
Chris@1406 45 void paintEvent(QPaintEvent *e) override;
Chris@1406 46 bool shouldLabelSelections() const override { return false; }
Chris@867 47
Chris@1615 48 void buildMaps();
Chris@1493 49
Chris@1493 50 std::vector<sv_frame_t> getKeyFrames(View *, sv_frame_t &resolution);
Chris@976 51 std::vector<sv_frame_t> getDefaultKeyFrames();
Chris@868 52
Chris@1493 53 ModelId getSalientModel(View *);
Chris@1493 54
Chris@1493 55 void reconnectModels();
Chris@1493 56
Chris@867 57 View *m_above;
Chris@867 58 View *m_below;
Chris@1615 59 View *m_reference;
Chris@1493 60
Chris@1615 61 QMutex m_mapsMutex;
Chris@1615 62 std::multimap<sv_frame_t, sv_frame_t> m_fromAboveMap;
Chris@1615 63 std::multimap<sv_frame_t, sv_frame_t> m_fromReferenceMap;
Chris@1615 64 sv_frame_t m_leftmostAbove;
Chris@1615 65 sv_frame_t m_rightmostAbove;
Chris@867 66 };
Chris@867 67
Chris@867 68 #endif