Mercurial > hg > svgui
diff layer/RegionLayer.h @ 551:c2ba2796cbee sv-v1.7
* Big improvements to editing behaviour in note and region models
author | Chris Cannam |
---|---|
date | Fri, 02 Oct 2009 13:56:10 +0000 |
parents | d666f5f8b154 |
children | 2e8194a30f40 |
line wrap: on
line diff
--- a/layer/RegionLayer.h Mon Sep 28 12:29:12 2009 +0000 +++ b/layer/RegionLayer.h Fri Oct 02 13:56:10 2009 +0000 @@ -120,7 +120,7 @@ protected: void getScaleExtents(View *, float &min, float &max, bool &log) const; int getYForValue(View *v, float value) const; - float getValueForY(View *v, int y) const; + float getValueForY(View *v, int y, int avoid = -1) const; QColor getColourForValue(View *v, float value) const; virtual int getDefaultColourHint(bool dark, bool &impose); @@ -131,8 +131,10 @@ RegionModel *m_model; bool m_editing; - int m_dragYOrigin; - int m_dragYRebase; + int m_dragPointX; + int m_dragPointY; + int m_dragStartX; + int m_dragStartY; RegionModel::Point m_originalPoint; RegionModel::Point m_editingPoint; RegionModel::EditCommand *m_editingCommand; @@ -141,9 +143,13 @@ PlotStyle m_plotStyle; typedef std::map<float, int> SpacingMap; + // region value -> ordering SpacingMap m_spacingMap; + // region value -> number of regions with this value + SpacingMap m_distributionMap; + int spacingIndexToY(View *v, int i) const; float yToSpacingIndex(View *v, int y) const;