annotate widgets/PaneStack.h @ 101:0f36cdf407a6 sv1-v0.9rc1

* Make vertical scale alignment modes work in note layer as well as time-value layer, and several significant fixes to it * Make it possible to draw notes properly on the note layer * Show units (and frequencies etc in note layer's case) in the time-value and note layer description boxes * Minor fix to item edit dialog layout * Some minor menu rearrangement * Comment out a lot of debug output * Add SV website and reference URLs to Help menu, and add code to (attempt to) open them in the user's preferred browser
author Chris Cannam
date Fri, 12 May 2006 14:40:43 +0000
parents 803830f186ef
children 4772fc75ac7c
rev   line source
Chris@0 1
Chris@58 2 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@0 3
Chris@0 4 /*
Chris@59 5 Sonic Visualiser
Chris@59 6 An audio file viewer and annotation editor.
Chris@59 7 Centre for Digital Music, Queen Mary, University of London.
Chris@59 8 This file copyright 2006 Chris Cannam.
Chris@0 9
Chris@59 10 This program is free software; you can redistribute it and/or
Chris@59 11 modify it under the terms of the GNU General Public License as
Chris@59 12 published by the Free Software Foundation; either version 2 of the
Chris@59 13 License, or (at your option) any later version. See the file
Chris@59 14 COPYING included with this distribution for more information.
Chris@0 15 */
Chris@0 16
Chris@0 17 #ifndef _PANESTACK_H_
Chris@0 18 #define _PANESTACK_H_
Chris@0 19
Chris@0 20 #include <QSplitter>
Chris@0 21
Chris@0 22 class QWidget;
Chris@0 23 class QLabel;
Chris@52 24 class View;
Chris@0 25 class Pane;
Chris@17 26 class Layer;
Chris@0 27 class ViewManager;
Chris@0 28 class PropertyContainer;
Chris@0 29 class PropertyStack;
Chris@0 30
Chris@0 31 class PaneStack : public QSplitter
Chris@0 32 {
Chris@0 33 Q_OBJECT
Chris@0 34
Chris@0 35 public:
Chris@0 36 PaneStack(QWidget *parent, ViewManager *viewManager);
Chris@0 37
Chris@0 38 Pane *addPane(bool suppressPropertyBox = false); // I own the returned value
Chris@52 39 void deletePane(Pane *pane); // Deletes the pane, but _not_ its layers
Chris@0 40
Chris@52 41 int getPaneCount() const; // Returns only count of visible panes
Chris@52 42 Pane *getPane(int n); // Of visible panes; I own the returned value
Chris@52 43
Chris@52 44 void hidePane(Pane *pane); // Also removes pane from getPane/getPaneCount
Chris@52 45 void showPane(Pane *pane); // Returns pane to getPane/getPaneCount
Chris@52 46
Chris@52 47 int getHiddenPaneCount() const;
Chris@52 48 Pane *getHiddenPane(int n); // I own the returned value
Chris@43 49
Chris@0 50 void setCurrentPane(Pane *pane);
Chris@19 51 void setCurrentLayer(Pane *pane, Layer *layer);
Chris@0 52 Pane *getCurrentPane();
Chris@0 53
Chris@0 54 signals:
Chris@0 55 void currentPaneChanged(Pane *pane);
Chris@17 56 void currentLayerChanged(Pane *pane, Layer *layer);
Chris@89 57 void rightButtonMenuRequested(Pane *pane, QPoint position);
Chris@0 58
Chris@0 59 public slots:
Chris@0 60 void propertyContainerAdded(PropertyContainer *);
Chris@0 61 void propertyContainerRemoved(PropertyContainer *);
Chris@52 62 void propertyContainerSelected(View *client, PropertyContainer *);
Chris@0 63 void paneInteractedWith();
Chris@89 64 void rightButtonMenuRequested(QPoint);
Chris@0 65
Chris@0 66 protected:
Chris@0 67 Pane *m_currentPane;
Chris@52 68
Chris@52 69 struct PaneRec
Chris@52 70 {
Chris@52 71 Pane *pane;
Chris@52 72 QWidget *propertyStack;
Chris@52 73 QLabel *currentIndicator;
Chris@52 74 };
Chris@52 75
Chris@52 76 std::vector<PaneRec> m_panes;
Chris@52 77 std::vector<PaneRec> m_hiddenPanes;
Chris@52 78
Chris@0 79 ViewManager *m_viewManager; // I don't own this
Chris@0 80 void sizePropertyStacks();
Chris@0 81 };
Chris@0 82
Chris@0 83 #endif
Chris@0 84