comparison widgets/Pane.h @ 13:01849cd277e6

* Hook up tool selection buttons to switch the cursor mode * Implement simple and multi-selection, snapping to the resolution of the current layer. You can't actually do anything with a selection yet
author Chris Cannam
date Mon, 23 Jan 2006 17:02:57 +0000
parents 06bba0b79b1c
children 0183ebb725ca
comparison
equal deleted inserted replaced
12:484e7320f59f 13:01849cd277e6
14 #include <QFrame> 14 #include <QFrame>
15 #include <QPoint> 15 #include <QPoint>
16 16
17 #include "base/ZoomConstraint.h" 17 #include "base/ZoomConstraint.h"
18 #include "base/View.h" 18 #include "base/View.h"
19 #include "base/Selection.h"
19 20
20 class QWidget; 21 class QWidget;
21 class QPaintEvent; 22 class QPaintEvent;
22 class Layer; 23 class Layer;
23 24
38 QString extraAttributes = "") const; 39 QString extraAttributes = "") const;
39 40
40 signals: 41 signals:
41 void paneInteractedWith(); 42 void paneInteractedWith();
42 43
44 public slots:
45 virtual void toolModeChanged();
46
43 protected: 47 protected:
44 virtual void paintEvent(QPaintEvent *e); 48 virtual void paintEvent(QPaintEvent *e);
45 virtual void mousePressEvent(QMouseEvent *e); 49 virtual void mousePressEvent(QMouseEvent *e);
46 virtual void mouseReleaseEvent(QMouseEvent *e); 50 virtual void mouseReleaseEvent(QMouseEvent *e);
47 virtual void mouseMoveEvent(QMouseEvent *e); 51 virtual void mouseMoveEvent(QMouseEvent *e);
53 QPoint m_identifyPoint; 57 QPoint m_identifyPoint;
54 QPoint m_clickPos; 58 QPoint m_clickPos;
55 QPoint m_mousePos; 59 QPoint m_mousePos;
56 bool m_clickedInRange; 60 bool m_clickedInRange;
57 bool m_shiftPressed; 61 bool m_shiftPressed;
62 bool m_ctrlPressed;
58 size_t m_dragCentreFrame; 63 size_t m_dragCentreFrame;
59 bool m_centreLineVisible; 64 bool m_centreLineVisible;
65 size_t m_selectionStartFrame;
60 }; 66 };
61 67
62 #endif 68 #endif
63 69