comparison layer/TimeInstantLayer.h @ 17:0183ebb725ca

* 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 01849cd277e6
children 7c767d41bcee
comparison
equal deleted inserted replaced
16:02a718909b2d 17:0183ebb725ca
33 33
34 virtual int getNearestFeatureFrame(int frame, 34 virtual int getNearestFeatureFrame(int frame,
35 size_t &resolution, 35 size_t &resolution,
36 bool snapRight = true) const; 36 bool snapRight = true) const;
37 37
38 virtual void drawStart(QMouseEvent *);
39 virtual void drawDrag(QMouseEvent *);
40 virtual void drawEnd(QMouseEvent *);
41
38 virtual const Model *getModel() const { return m_model; } 42 virtual const Model *getModel() const { return m_model; }
39 void setModel(SparseOneDimensionalModel *model); 43 void setModel(SparseOneDimensionalModel *model);
40 44
41 virtual PropertyList getProperties() const; 45 virtual PropertyList getProperties() const;
42 virtual PropertyType getPropertyType(const PropertyName &) const; 46 virtual PropertyType getPropertyType(const PropertyName &) const;
47 virtual void setProperty(const PropertyName &, int value); 51 virtual void setProperty(const PropertyName &, int value);
48 52
49 void setBaseColour(QColor); 53 void setBaseColour(QColor);
50 QColor getBaseColour() const { return m_colour; } 54 QColor getBaseColour() const { return m_colour; }
51 55
52 virtual QString getPropertyContainerIconName() const { return "instants"; }
53
54 virtual bool isLayerScrollable() const; 56 virtual bool isLayerScrollable() const;
55 57
56 virtual int getCompletion() const { return m_model->getCompletion(); } 58 virtual int getCompletion() const { return m_model->getCompletion(); }
57 59
58 virtual QString toXmlString(QString indent = "", 60 virtual QString toXmlString(QString indent = "",
62 64
63 protected: 65 protected:
64 SparseOneDimensionalModel::PointList getLocalPoints(int) const; 66 SparseOneDimensionalModel::PointList getLocalPoints(int) const;
65 67
66 SparseOneDimensionalModel *m_model; 68 SparseOneDimensionalModel *m_model;
69 SparseOneDimensionalModel::Point m_editingPoint;
67 QColor m_colour; 70 QColor m_colour;
68 }; 71 };
69 72
70 #endif 73 #endif
71 74