comparison view/AlignmentView.h @ 1493:c5589d94b731

Improve drawn alignment of lines in AlignmentView against the view below; also cache the mapping locations
author Chris Cannam
date Fri, 09 Aug 2019 19:02:51 +0100
parents a18e78b9c78b
children 911330a28a7c
comparison
equal deleted inserted replaced
1492:a2fbcfeb2572 1493:c5589d94b731
30 void setViewBelow(View *view); 30 void setViewBelow(View *view);
31 31
32 public slots: 32 public slots:
33 void globalCentreFrameChanged(sv_frame_t) override; 33 void globalCentreFrameChanged(sv_frame_t) override;
34 void viewCentreFrameChanged(View *, sv_frame_t) override; 34 void viewCentreFrameChanged(View *, sv_frame_t) override;
35
35 virtual void viewAboveZoomLevelChanged(ZoomLevel, bool); 36 virtual void viewAboveZoomLevelChanged(ZoomLevel, bool);
36 virtual void viewBelowZoomLevelChanged(ZoomLevel, bool); 37 virtual void viewBelowZoomLevelChanged(ZoomLevel, bool);
38
37 void viewManagerPlaybackFrameChanged(sv_frame_t) override; 39 void viewManagerPlaybackFrameChanged(sv_frame_t) override;
40
41 void keyFramesChanged();
38 42
39 protected: 43 protected:
40 void paintEvent(QPaintEvent *e) override; 44 void paintEvent(QPaintEvent *e) override;
41 bool shouldLabelSelections() const override { return false; } 45 bool shouldLabelSelections() const override { return false; }
42 46
43 std::vector<sv_frame_t> getKeyFrames(); 47 void buildKeyFrameMap();
48
49 std::vector<sv_frame_t> getKeyFrames(View *, sv_frame_t &resolution);
44 std::vector<sv_frame_t> getDefaultKeyFrames(); 50 std::vector<sv_frame_t> getDefaultKeyFrames();
51
52 ModelId getSalientModel(View *);
53
54 void reconnectModels();
45 55
46 View *m_above; 56 View *m_above;
47 View *m_below; 57 View *m_below;
58
59 QMutex m_keyFrameMutex;
60 std::multimap<sv_frame_t, sv_frame_t> m_keyFrameMap;
48 }; 61 };
49 62
50 #endif 63 #endif