comparison base/Layer.h @ 12:f67ddc287bc3

* Add ability to create empty layers for editing * Add first basic editing capability (adding points to a time instant layer) * Add various keyboard and mouse shortcuts for navigation &c * Add ability to resize a selection by dragging its edges * Add maximum zoom level
author Chris Cannam
date Thu, 26 Jan 2006 16:15:40 +0000
parents ec6886f0e673
children 1fa7cc0d008b
comparison
equal deleted inserted replaced
11:cb05ba39664a 12:f67ddc287bc3
20 20
21 class ZoomConstraint; 21 class ZoomConstraint;
22 class Model; 22 class Model;
23 class QPainter; 23 class QPainter;
24 class View; 24 class View;
25 class QMouseEvent;
25 26
26 /** 27 /**
27 * The base class for visual representations of the data found in a 28 * The base class for visual representations of the data found in a
28 * Model. Layers are expected to be able to draw themselves onto a 29 * Model. Layers are expected to be able to draw themselves onto a
29 * View, and may also be editable. 30 * View, and may also be editable.
50 return PositionMiddle; 51 return PositionMiddle;
51 } 52 }
52 virtual VerticalPosition getPreferredFrameCountPosition() const { 53 virtual VerticalPosition getPreferredFrameCountPosition() const {
53 return PositionBottom; 54 return PositionBottom;
54 } 55 }
56
57 virtual QString getPropertyContainerIconName() const;
55 58
56 virtual QString getPropertyContainerName() const { 59 virtual QString getPropertyContainerName() const {
57 return objectName(); 60 return objectName();
58 } 61 }
59 62
90 bool snapRight = true) const { 93 bool snapRight = true) const {
91 resolution = 1; 94 resolution = 1;
92 return frame; 95 return frame;
93 } 96 }
94 97
95 // Paint and edit modes: 98 // Draw and edit modes:
96 // 99 //
97 // Layer needs to get actual mouse events, I guess. Paint mode is 100 // Layer needs to get actual mouse events, I guess. Draw mode is
98 // probably the easier. 101 // probably the easier.
102
103 virtual void drawStart(QMouseEvent *e) { }
104 virtual void drawDrag(QMouseEvent *e) { }
105 virtual void drawEnd(QMouseEvent *e) { }
99 106
100 // Text mode: 107 // Text mode:
101 // 108 //
102 // Label nearest feature. We need to get the feature coordinates 109 // Label nearest feature. We need to get the feature coordinates
103 // and current label from the layer, and then the pane can pop up 110 // and current label from the layer, and then the pane can pop up