Mercurial > hg > dmlib
diff edwaveform.h @ 565:a4666c9e1336
Moar work on the editor (broken).
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 22 Dec 2012 16:56:30 +0200 |
parents | d34922e6a244 |
children |
line wrap: on
line diff
--- a/edwaveform.h Thu Dec 20 01:44:01 2012 +0200 +++ b/edwaveform.h Sat Dec 22 16:56:30 2012 +0200 @@ -35,8 +35,11 @@ public slots: void setTime(const float mtime); void setOffset(const float moffs); + void setSelection(const float mstart, const float mend); + void clearSelection(); signals: + void selectionChanged(float mstart, float mduration); void timeChanged(float value); void offsetChanged(float value); @@ -48,15 +51,16 @@ void paintEvent(QPaintEvent *event); private: - bool dragging; - QPoint dragPoint; - float dragOffs; // milliseconds - - float scale; - float time, offs, duration; // in milliseconds - + float scale, time, offs, duration; // in milliseconds int size, channels, format, freq, sduration; void *data; + + bool selectionValid; + float selectionStart, selectionDuration; + + QPoint selectionPoint, dragPoint; + bool selecting, dragging; + float selectionOffs, dragOffs; };