Mercurial > hg > svgui
comparison widgets/LevelPanWidget.h @ 1301:e8368466fa34
Half-steps for level in level-pan widget
author | Chris Cannam |
---|---|
date | Thu, 21 Jun 2018 15:36:29 +0100 |
parents | 8ef67917c301 |
children | f3d3fab250ac |
comparison
equal
deleted
inserted
replaced
1300:1589bc7528b7 | 1301:e8368466fa34 |
---|---|
85 virtual void enterEvent(QEvent *); | 85 virtual void enterEvent(QEvent *); |
86 virtual void leaveEvent(QEvent *); | 86 virtual void leaveEvent(QEvent *); |
87 | 87 |
88 void emitLevelChanged(); | 88 void emitLevelChanged(); |
89 void emitPanChanged(); | 89 void emitPanChanged(); |
90 | 90 |
91 int m_level; | 91 int m_minNotch; |
92 int m_maxNotch; | |
93 int m_notch; | |
92 int m_pan; | 94 int m_pan; |
93 float m_monitorLeft; | 95 float m_monitorLeft; |
94 float m_monitorRight; | 96 float m_monitorRight; |
95 bool m_editable; | 97 bool m_editable; |
96 bool m_editing; | 98 bool m_editing; |
97 bool m_includeMute; | 99 bool m_includeMute; |
100 bool m_includeHalfSteps; | |
98 | 101 |
99 static int audioLevelToLevel(float audioLevel, bool withMute); | 102 int clampNotch(int notch) const; |
100 static float levelToAudioLevel(int level, bool withMute); | |
101 | 103 |
102 static int audioPanToPan(float audioPan); | 104 int audioLevelToNotch(float audioLevel) const; |
103 static float panToAudioPan(int pan); | 105 float notchToAudioLevel(int notch) const; |
106 | |
107 int audioPanToPan(float audioPan) const; | |
108 float panToAudioPan(int pan) const; | |
109 | |
110 int coordsToNotch(QRectF rect, QPointF pos) const; | |
111 int coordsToPan(QRectF rect, QPointF pos) const; | |
112 | |
113 QColor notchToColour(int notch) const; | |
104 | 114 |
105 QSizeF cellSize(QRectF) const; | 115 QSizeF cellSize(QRectF) const; |
106 QPointF cellCentre(QRectF, int level, int pan) const; | 116 QPointF cellCentre(QRectF, int row, int col) const; |
107 QSizeF cellLightSize(QRectF) const; | 117 QSizeF cellLightSize(QRectF) const; |
108 QRectF cellLightRect(QRectF, int level, int pan) const; | 118 QRectF cellLightRect(QRectF, int row, int col) const; |
119 QRectF cellOutlineRect(QRectF, int row, int col) const; | |
109 double thinLineWidth(QRectF) const; | 120 double thinLineWidth(QRectF) const; |
110 void toCell(QRectF, QPointF loc, int &level, int &pan) const; | |
111 }; | 121 }; |
112 | 122 |
113 #endif | 123 #endif |