Mercurial > hg > svcore
annotate base/Clipboard.h @ 1611:b2f32c554199 single-point
Pull out the Point class, plus start testing NoteModel, plus actually add the tests...
| author | Chris Cannam | 
|---|---|
| date | Tue, 05 Mar 2019 15:15:11 +0000 | 
| parents | 7db29268cf4c | 
| children | 23a29e5dc0e9 | 
| rev | line source | 
|---|---|
| Chris@74 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ | 
| Chris@74 | 2 | 
| Chris@74 | 3 /* | 
| Chris@74 | 4 Sonic Visualiser | 
| Chris@74 | 5 An audio file viewer and annotation editor. | 
| Chris@74 | 6 Centre for Digital Music, Queen Mary, University of London. | 
| Chris@74 | 7 This file copyright 2006 Chris Cannam. | 
| Chris@74 | 8 | 
| Chris@74 | 9 This program is free software; you can redistribute it and/or | 
| Chris@74 | 10 modify it under the terms of the GNU General Public License as | 
| Chris@74 | 11 published by the Free Software Foundation; either version 2 of the | 
| Chris@74 | 12 License, or (at your option) any later version. See the file | 
| Chris@74 | 13 COPYING included with this distribution for more information. | 
| Chris@74 | 14 */ | 
| Chris@74 | 15 | 
| Chris@1581 | 16 #ifndef SV_CLIPBOARD_H | 
| Chris@1581 | 17 #define SV_CLIPBOARD_H | 
| Chris@74 | 18 | 
| Chris@74 | 19 #include <vector> | 
| Chris@74 | 20 | 
| Chris@1611 | 21 #include "Point.h" | 
| Chris@1044 | 22 | 
| Chris@74 | 23 class Clipboard | 
| Chris@74 | 24 { | 
| Chris@74 | 25 public: | 
| Chris@74 | 26 Clipboard(); | 
| Chris@74 | 27 ~Clipboard(); | 
| Chris@74 | 28 | 
| Chris@74 | 29 typedef std::vector<Point> PointList; | 
| Chris@74 | 30 | 
| Chris@74 | 31 void clear(); | 
| Chris@74 | 32 bool empty() const; | 
| Chris@74 | 33 const PointList &getPoints() const; | 
| Chris@74 | 34 void setPoints(const PointList &points); | 
| Chris@74 | 35 void addPoint(const Point &point); | 
| Chris@74 | 36 | 
| Chris@370 | 37 bool haveReferenceFrames() const; | 
| Chris@369 | 38 bool referenceFramesDiffer() const; | 
| Chris@340 | 39 | 
| Chris@74 | 40 protected: | 
| Chris@74 | 41 PointList m_points; | 
| Chris@74 | 42 }; | 
| Chris@74 | 43 | 
| Chris@74 | 44 #endif | 
