annotate view/AlignmentView.h @ 1608:6616e1899daa

Make ImageLayer able to report whether an image format can be opened
author Chris Cannam
date Mon, 11 May 2020 17:28:12 +0100
parents c5589d94b731
children 911330a28a7c
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@867 29 void setViewAbove(View *view);
Chris@867 30 void setViewBelow(View *view);
Chris@867 31
Chris@867 32 public slots:
Chris@1406 33 void globalCentreFrameChanged(sv_frame_t) override;
Chris@1406 34 void viewCentreFrameChanged(View *, sv_frame_t) override;
Chris@1493 35
Chris@1183 36 virtual void viewAboveZoomLevelChanged(ZoomLevel, bool);
Chris@1183 37 virtual void viewBelowZoomLevelChanged(ZoomLevel, bool);
Chris@1493 38
Chris@1406 39 void viewManagerPlaybackFrameChanged(sv_frame_t) override;
Chris@867 40
Chris@1493 41 void keyFramesChanged();
Chris@1493 42
Chris@867 43 protected:
Chris@1406 44 void paintEvent(QPaintEvent *e) override;
Chris@1406 45 bool shouldLabelSelections() const override { return false; }
Chris@867 46
Chris@1493 47 void buildKeyFrameMap();
Chris@1493 48
Chris@1493 49 std::vector<sv_frame_t> getKeyFrames(View *, sv_frame_t &resolution);
Chris@976 50 std::vector<sv_frame_t> getDefaultKeyFrames();
Chris@868 51
Chris@1493 52 ModelId getSalientModel(View *);
Chris@1493 53
Chris@1493 54 void reconnectModels();
Chris@1493 55
Chris@867 56 View *m_above;
Chris@867 57 View *m_below;
Chris@1493 58
Chris@1493 59 QMutex m_keyFrameMutex;
Chris@1493 60 std::multimap<sv_frame_t, sv_frame_t> m_keyFrameMap;
Chris@867 61 };
Chris@867 62
Chris@867 63 #endif