Mercurial > hg > svgui
comparison widgets/Pane.h @ 0:2a4f26e85b4c
initial import
author | Chris Cannam |
---|---|
date | Tue, 10 Jan 2006 16:33:16 +0000 |
parents | |
children | 37b110168acf |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:2a4f26e85b4c |
---|---|
1 | |
2 /* -*- c-basic-offset: 4 -*- vi:set ts=8 sts=4 sw=4: */ | |
3 | |
4 /* | |
5 A waveform viewer and audio annotation editor. | |
6 Chris Cannam, Queen Mary University of London, 2005 | |
7 | |
8 This is experimental software. Not for distribution. | |
9 */ | |
10 | |
11 #ifndef _PANE_H_ | |
12 #define _PANE_H_ | |
13 | |
14 #include <QFrame> | |
15 #include <QPoint> | |
16 | |
17 #include "base/ZoomConstraint.h" | |
18 #include "base/View.h" | |
19 | |
20 class QWidget; | |
21 class QPaintEvent; | |
22 class Layer; | |
23 | |
24 class Pane : public View | |
25 { | |
26 Q_OBJECT | |
27 | |
28 public: | |
29 Pane(QWidget *parent = 0); | |
30 virtual QString getPropertyContainerIconName() const { return "pane"; } | |
31 | |
32 virtual bool shouldIlluminateLocalFeatures(const Layer *layer, QPoint &pos); | |
33 | |
34 void setCentreLineVisible(bool visible); | |
35 bool getCentreLineVisible() const { return m_centreLineVisible; } | |
36 | |
37 signals: | |
38 void paneInteractedWith(); | |
39 | |
40 protected: | |
41 virtual void paintEvent(QPaintEvent *e); | |
42 virtual void mousePressEvent(QMouseEvent *e); | |
43 virtual void mouseReleaseEvent(QMouseEvent *e); | |
44 virtual void mouseMoveEvent(QMouseEvent *e); | |
45 virtual void mouseDoubleClickEvent(QMouseEvent *e); | |
46 virtual void leaveEvent(QEvent *e); | |
47 virtual void wheelEvent(QWheelEvent *e); | |
48 | |
49 bool m_identifyFeatures; | |
50 QPoint m_identifyPoint; | |
51 QPoint m_clickPos; | |
52 QPoint m_mousePos; | |
53 bool m_clickedInRange; | |
54 bool m_shiftPressed; | |
55 size_t m_dragCentreFrame; | |
56 bool m_centreLineVisible; | |
57 }; | |
58 | |
59 #endif | |
60 |