comparison base/Layer.h @ 35:0164c8d3023b

* Rejig project file a bit to do pkg-config detection &c and change some HAVE_* symbol names accordingly * Add selection move/resize/delete * First stubs for add layer / pane commands
author Chris Cannam
date Wed, 01 Mar 2006 18:13:01 +0000
parents 5e28cbb431d0
children 935a2419a77c
comparison
equal deleted inserted replaced
34:aaf73f7309f2 35:0164c8d3023b
11 #ifndef _LAYER_H_ 11 #ifndef _LAYER_H_
12 #define _LAYER_H_ 12 #define _LAYER_H_
13 13
14 #include "PropertyContainer.h" 14 #include "PropertyContainer.h"
15 #include "XmlExportable.h" 15 #include "XmlExportable.h"
16 #include "Selection.h"
16 17
17 #include <QObject> 18 #include <QObject>
18 #include <QRect> 19 #include <QRect>
19 #include <QXmlAttributes> 20 #include <QXmlAttributes>
20 21
38 public: 39 public:
39 Layer(View *w); 40 Layer(View *w);
40 virtual ~Layer(); 41 virtual ~Layer();
41 42
42 virtual const Model *getModel() const = 0; 43 virtual const Model *getModel() const = 0;
44 virtual const View *getView() const { return m_view; }
43 virtual const ZoomConstraint *getZoomConstraint() const { return 0; } 45 virtual const ZoomConstraint *getZoomConstraint() const { return 0; }
44 virtual void paint(QPainter &, QRect) const = 0; 46 virtual void paint(QPainter &, QRect) const = 0;
45 47
46 enum VerticalPosition { 48 enum VerticalPosition {
47 PositionTop, PositionMiddle, PositionBottom 49 PositionTop, PositionMiddle, PositionBottom
117 virtual void editDrag(QMouseEvent *) { } 119 virtual void editDrag(QMouseEvent *) { }
118 virtual void editEnd(QMouseEvent *) { } 120 virtual void editEnd(QMouseEvent *) { }
119 121
120 virtual void editOpen(QMouseEvent *) { } // on double-click 122 virtual void editOpen(QMouseEvent *) { } // on double-click
121 123
124 virtual void moveSelection(Selection s, size_t newStartFrame) { }
125 virtual void resizeSelection(Selection s, Selection newSize) { }
126 virtual void deleteSelection(Selection s) { }
127
128
122 // Text mode: 129 // Text mode:
123 // 130 //
124 // Label nearest feature. We need to get the feature coordinates 131 // Label nearest feature. We need to get the feature coordinates
125 // and current label from the layer, and then the pane can pop up 132 // and current label from the layer, and then the pane can pop up
126 // a little text entry dialog at the right location. Or we edit 133 // a little text entry dialog at the right location. Or we edit