comparison base/Clipboard.cpp @ 369:007b01b971a6

* function rename & notes
author Chris Cannam
date Mon, 04 Feb 2008 13:35:11 +0000
parents 516819f2b97b
children e73a1a1e8f24
comparison
equal deleted inserted replaced
368:bef4604d82fa 369:007b01b971a6
22 m_haveDuration(false), 22 m_haveDuration(false),
23 m_haveLabel(true), 23 m_haveLabel(true),
24 m_label(label), 24 m_label(label),
25 m_haveLevel(false), 25 m_haveLevel(false),
26 m_level(0.f), 26 m_level(0.f),
27 m_haveReferenceFrame(false), 27 m_referenceFramesDiffer(false),
28 m_referenceFrame(frame) 28 m_referenceFrame(frame)
29 { 29 {
30 } 30 }
31 31
32 Clipboard::Point::Point(long frame, float value, QString label) : 32 Clipboard::Point::Point(long frame, float value, QString label) :
37 m_haveDuration(false), 37 m_haveDuration(false),
38 m_haveLabel(true), 38 m_haveLabel(true),
39 m_label(label), 39 m_label(label),
40 m_haveLevel(false), 40 m_haveLevel(false),
41 m_level(0.f), 41 m_level(0.f),
42 m_haveReferenceFrame(false), 42 m_referenceFramesDiffer(false),
43 m_referenceFrame(frame) 43 m_referenceFrame(frame)
44 { 44 {
45 } 45 }
46 46
47 Clipboard::Point::Point(long frame, float value, size_t duration, QString label) : 47 Clipboard::Point::Point(long frame, float value, size_t duration, QString label) :
53 m_duration(duration), 53 m_duration(duration),
54 m_haveLabel(true), 54 m_haveLabel(true),
55 m_label(label), 55 m_label(label),
56 m_haveLevel(false), 56 m_haveLevel(false),
57 m_level(0.f), 57 m_level(0.f),
58 m_haveReferenceFrame(false), 58 m_referenceFramesDiffer(false),
59 m_referenceFrame(frame) 59 m_referenceFrame(frame)
60 { 60 {
61 } 61 }
62 62
63 Clipboard::Point::Point(long frame, float value, size_t duration, float level, QString label) : 63 Clipboard::Point::Point(long frame, float value, size_t duration, float level, QString label) :
69 m_duration(duration), 69 m_duration(duration),
70 m_haveLabel(true), 70 m_haveLabel(true),
71 m_label(label), 71 m_label(label),
72 m_haveLevel(true), 72 m_haveLevel(true),
73 m_level(level), 73 m_level(level),
74 m_haveReferenceFrame(false), 74 m_referenceFramesDiffer(false),
75 m_referenceFrame(frame) 75 m_referenceFrame(frame)
76 { 76 {
77 } 77 }
78 78
79 Clipboard::Point::Point(const Point &point) : 79 Clipboard::Point::Point(const Point &point) :
85 m_duration(point.m_duration), 85 m_duration(point.m_duration),
86 m_haveLabel(point.m_haveLabel), 86 m_haveLabel(point.m_haveLabel),
87 m_label(point.m_label), 87 m_label(point.m_label),
88 m_haveLevel(point.m_haveLevel), 88 m_haveLevel(point.m_haveLevel),
89 m_level(point.m_level), 89 m_level(point.m_level),
90 m_haveReferenceFrame(point.m_haveReferenceFrame), 90 m_referenceFramesDiffer(point.m_referenceFramesDiffer),
91 m_referenceFrame(point.m_referenceFrame) 91 m_referenceFrame(point.m_referenceFrame)
92 { 92 {
93 } 93 }
94 94
95 Clipboard::Point & 95 Clipboard::Point &
104 m_duration = point.m_duration; 104 m_duration = point.m_duration;
105 m_haveLabel = point.m_haveLabel; 105 m_haveLabel = point.m_haveLabel;
106 m_label = point.m_label; 106 m_label = point.m_label;
107 m_haveLevel = point.m_haveLevel; 107 m_haveLevel = point.m_haveLevel;
108 m_level = point.m_level; 108 m_level = point.m_level;
109 m_haveReferenceFrame = point.m_haveReferenceFrame; 109 m_referenceFramesDiffer = point.m_referenceFramesDiffer;
110 m_referenceFrame = point.m_referenceFrame; 110 m_referenceFrame = point.m_referenceFrame;
111 return *this; 111 return *this;
112 } 112 }
113 113
114 bool 114 bool
170 { 170 {
171 return m_level; 171 return m_level;
172 } 172 }
173 173
174 bool 174 bool
175 Clipboard::Point::haveReferenceFrame() const 175 Clipboard::Point::referenceFramesDiffer() const
176 { 176 {
177 return m_haveReferenceFrame; 177 return m_referenceFramesDiffer;
178 } 178 }
179 179
180 long 180 long
181 Clipboard::Point::getReferenceFrame() const 181 Clipboard::Point::getReferenceFrame() const
182 { 182 {
184 } 184 }
185 185
186 void 186 void
187 Clipboard::Point::setReferenceFrame(long f) 187 Clipboard::Point::setReferenceFrame(long f)
188 { 188 {
189 if (f != m_frame) m_haveReferenceFrame = true; 189 if (f != m_frame) m_referenceFramesDiffer = true;
190 m_referenceFrame = f; 190 m_referenceFrame = f;
191 } 191 }
192 192
193 Clipboard::Clipboard() { } 193 Clipboard::Clipboard() { }
194 Clipboard::~Clipboard() { } 194 Clipboard::~Clipboard() { }
222 { 222 {
223 m_points.push_back(point); 223 m_points.push_back(point);
224 } 224 }
225 225
226 bool 226 bool
227 Clipboard::haveReferenceFrames() const 227 Clipboard::referenceFramesDiffer() const
228 { 228 {
229 for (PointList::const_iterator i = m_points.begin(); 229 for (PointList::const_iterator i = m_points.begin();
230 i != m_points.end(); ++i) { 230 i != m_points.end(); ++i) {
231 if (i->haveReferenceFrame()) return true; 231 if (i->referenceFramesDiffer()) return true;
232 } 232 }
233 return false; 233 return false;
234 } 234 }
235 235