Mercurial > hg > svgui
diff widgets/LevelPanWidget.h @ 929:20698aa6a517 tonioni
Introduce level/pan toolbar buttons
author | Chris Cannam |
---|---|
date | Wed, 25 Mar 2015 10:33:19 +0000 |
parents | 2a9f1eb6e0ed |
children | 77110abca8a1 |
line wrap: on
line diff
--- a/widgets/LevelPanWidget.h Tue Mar 24 17:05:42 2015 +0000 +++ b/widgets/LevelPanWidget.h Wed Mar 25 10:33:19 2015 +0000 @@ -19,10 +19,6 @@ /** * A simple widget for coarse level and pan control. - * - * For this initial implementation at least, pan is in five steps only - * (hard left, mid-left, centre, mid-right, hard right) and level is - * in five plus mute. */ class LevelPanWidget : public QWidget @@ -42,6 +38,11 @@ /// Find out whether the widget is editable bool isEditable() const; + /// Draw a suitably sized copy of the widget's contents to the given device + void renderTo(QPaintDevice *, QRectF, bool asIfEditable) const; + + QSize sizeHint() const; + public slots: /// Set level in the range [0,1] -- will be rounded void setLevel(float); @@ -70,12 +71,12 @@ int m_pan; bool m_editable; - QSizeF cellSize() const; - QPointF cellCentre(int level, int pan) const; - QSizeF cellLightSize() const; - QRectF cellLightRect(int level, int pan) const; - double thinLineWidth() const; - void toCell(QPointF loc, int &level, int &pan) const; + QSizeF cellSize(QRectF) const; + QPointF cellCentre(QRectF, int level, int pan) const; + QSizeF cellLightSize(QRectF) const; + QRectF cellLightRect(QRectF, int level, int pan) const; + double thinLineWidth(QRectF) const; + void toCell(QRectF, QPointF loc, int &level, int &pan) const; }; #endif