Mercurial > hg > svcore
annotate base/Selection.h @ 9:73d85d19919f
* Add play-selection and looping modes. Looping seems to work OK, but
the plain play-selection is miscalculating current frame number to
feed back to the GUI.
* Cache selection rectanges wherever possible in View::paintEvent.
author | Chris Cannam |
---|---|
date | Tue, 24 Jan 2006 16:20:58 +0000 |
parents | 214054a0d8b8 |
children | bb9291d84810 |
rev | line source |
---|---|
Chris@8 | 1 /* -*- c-basic-offset: 4 -*- vi:set ts=8 sts=4 sw=4: */ |
Chris@8 | 2 |
Chris@8 | 3 /* |
Chris@8 | 4 A waveform viewer and audio annotation editor. |
Chris@8 | 5 Chris Cannam, Queen Mary University of London, 2005-2006 |
Chris@8 | 6 |
Chris@8 | 7 This is experimental software. Not for distribution. |
Chris@8 | 8 */ |
Chris@8 | 9 |
Chris@8 | 10 #ifndef _SELECTION_H_ |
Chris@8 | 11 #define _SELECTION_H_ |
Chris@8 | 12 |
Chris@8 | 13 #include <cstddef> |
Chris@8 | 14 |
Chris@8 | 15 class Selection |
Chris@8 | 16 { |
Chris@8 | 17 public: |
Chris@8 | 18 Selection(); |
Chris@8 | 19 Selection(size_t startFrame, size_t endFrame); |
Chris@8 | 20 Selection(const Selection &); |
Chris@8 | 21 Selection &operator=(const Selection &); |
Chris@8 | 22 virtual ~Selection(); |
Chris@8 | 23 |
Chris@8 | 24 bool isEmpty() const; |
Chris@8 | 25 size_t getStartFrame() const; |
Chris@8 | 26 size_t getEndFrame() const; |
Chris@9 | 27 bool contains(size_t frame) const; |
Chris@8 | 28 |
Chris@8 | 29 bool operator<(const Selection &) const; |
Chris@8 | 30 bool operator==(const Selection &) const; |
Chris@8 | 31 |
Chris@8 | 32 protected: |
Chris@8 | 33 size_t m_startFrame; |
Chris@8 | 34 size_t m_endFrame; |
Chris@8 | 35 }; |
Chris@8 | 36 |
Chris@8 | 37 #endif |