comparison view/Overview.h @ 173:9c40dc10c88c

* Rename the existing Panner to Overview (big duh!) * Fixes to the new Panner.
author Chris Cannam
date Thu, 19 Oct 2006 09:57:27 +0000
parents
children 42118892f428
comparison
equal deleted inserted replaced
172:d0b95a8cac96 173:9c40dc10c88c
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3 /*
4 Sonic Visualiser
5 An audio file viewer and annotation editor.
6 Centre for Digital Music, Queen Mary, University of London.
7 This file copyright 2006 Chris Cannam.
8
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information.
14 */
15
16 #ifndef _OVERVIEW_H_
17 #define _OVERVIEW_H_
18
19 #include "View.h"
20
21 #include <QPoint>
22
23 class QWidget;
24 class QPaintEvent;
25 class Layer;
26 class View;
27
28 #include <map>
29
30 class Overview : public View
31 {
32 Q_OBJECT
33
34 public:
35 Overview(QWidget *parent = 0);
36
37 void registerView(View *widget);
38 void unregisterView(View *widget);
39
40 virtual QString getPropertyContainerIconName() const { return "panner"; }
41
42 public slots:
43 virtual void modelChanged(size_t startFrame, size_t endFrame);
44 virtual void modelReplaced();
45
46 virtual void viewManagerCentreFrameChanged(void *, unsigned long, bool);
47 virtual void viewManagerZoomLevelChanged(void *, unsigned long, bool);
48 virtual void viewManagerPlaybackFrameChanged(unsigned long);
49
50 protected:
51 virtual void paintEvent(QPaintEvent *e);
52 virtual void mousePressEvent(QMouseEvent *e);
53 virtual void mouseReleaseEvent(QMouseEvent *e);
54 virtual void mouseMoveEvent(QMouseEvent *e);
55 virtual bool shouldLabelSelections() const { return false; }
56
57 QPoint m_clickPos;
58 QPoint m_mousePos;
59 bool m_clickedInRange;
60 size_t m_dragCentreFrame;
61
62 typedef std::set<void *> WidgetSet;
63 WidgetSet m_widgets;
64 };
65
66 #endif
67