Mercurial > hg > svgui
comparison layer/TimeValueLayer.h @ 21:3a506d25d95a
* Add command history class, and basic undo/redo menus. No actual commands
to undo/redo yet. Selecting the placeholders sometimes seems to cause
a crash, so this looks a little uncertain so far.
* Add Rename Layer
* Remove models from playback when their layers are removed (and ref counts
hit zero)
* Don't hang around waiting so much when there's work to be done in the audio
buffer fill thread
* Put more sensible names on layers generated from transforms
* Add basic editing to time-value layer like existing editing in time-instants
layer, and make both of them snap to the appropriate resolution during drag
author | Chris Cannam |
---|---|
date | Mon, 30 Jan 2006 17:51:56 +0000 |
parents | 0183ebb725ca |
children | 179bf7b5ddea |
comparison
equal
deleted
inserted
replaced
20:1deb5f87a18c | 21:3a506d25d95a |
---|---|
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 | |
42 virtual void editStart(QMouseEvent *); | |
43 virtual void editDrag(QMouseEvent *); | |
44 virtual void editEnd(QMouseEvent *); | |
45 | |
38 virtual const Model *getModel() const { return m_model; } | 46 virtual const Model *getModel() const { return m_model; } |
39 void setModel(SparseTimeValueModel *model); | 47 void setModel(SparseTimeValueModel *model); |
40 | 48 |
41 virtual PropertyList getProperties() const; | 49 virtual PropertyList getProperties() const; |
42 virtual PropertyType getPropertyType(const PropertyName &) const; | 50 virtual PropertyType getPropertyType(const PropertyName &) const; |
62 QString extraAttributes = "") const; | 70 QString extraAttributes = "") const; |
63 | 71 |
64 void setProperties(const QXmlAttributes &attributes); | 72 void setProperties(const QXmlAttributes &attributes); |
65 | 73 |
66 protected: | 74 protected: |
75 int getYForValue(float value) const; | |
76 float getValueForY(int y) const; | |
77 | |
67 SparseTimeValueModel::PointList getLocalPoints(int) const; | 78 SparseTimeValueModel::PointList getLocalPoints(int) const; |
68 | 79 |
69 SparseTimeValueModel *m_model; | 80 SparseTimeValueModel *m_model; |
81 bool m_editing; | |
82 SparseTimeValueModel::Point m_editingPoint; | |
70 QColor m_colour; | 83 QColor m_colour; |
71 PlotStyle m_plotStyle; | 84 PlotStyle m_plotStyle; |
72 }; | 85 }; |
73 | 86 |
74 #endif | 87 #endif |