annotate view/AlignmentView.h @ 1447:8afea53332f3 single-point

Add option to make pane sizes auto-resize-only (i.e. remove user control via a splitter); also place alignment views above panes instead of below, meaning the extra bit of space that we currently have for the pane without one at least goes to the primary pane
author Chris Cannam
date Tue, 30 Apr 2019 15:53:21 +0100
parents a18e78b9c78b
children c5589d94b731
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@1183 35 virtual void viewAboveZoomLevelChanged(ZoomLevel, bool);
Chris@1183 36 virtual void viewBelowZoomLevelChanged(ZoomLevel, bool);
Chris@1406 37 void viewManagerPlaybackFrameChanged(sv_frame_t) override;
Chris@867 38
Chris@867 39 protected:
Chris@1406 40 void paintEvent(QPaintEvent *e) override;
Chris@1406 41 bool shouldLabelSelections() const override { return false; }
Chris@867 42
Chris@976 43 std::vector<sv_frame_t> getKeyFrames();
Chris@976 44 std::vector<sv_frame_t> getDefaultKeyFrames();
Chris@868 45
Chris@867 46 View *m_above;
Chris@867 47 View *m_below;
Chris@867 48 };
Chris@867 49
Chris@867 50 #endif