Mercurial > hg > svcore
comparison data/model/TextModel.h @ 1038:cc27f35aa75c cxx11
Introducing the signed 64-bit frame index type, and fixing build failures from inclusion of -Wconversion with -Werror. Not finished yet.
author | Chris Cannam |
---|---|
date | Tue, 03 Mar 2015 15:18:24 +0000 |
parents | 59e7fe1b1003 |
children | a1cd5abcb38b |
comparison
equal
deleted
inserted
replaced
1037:bf0e5944289b | 1038:cc27f35aa75c |
---|---|
29 */ | 29 */ |
30 | 30 |
31 struct TextPoint : public XmlExportable | 31 struct TextPoint : public XmlExportable |
32 { | 32 { |
33 public: | 33 public: |
34 TextPoint(long _frame) : frame(_frame), height(0.0f) { } | 34 TextPoint(sv_frame_t _frame) : frame(_frame), height(0.0f) { } |
35 TextPoint(long _frame, float _height, QString _label) : | 35 TextPoint(sv_frame_t _frame, float _height, QString _label) : |
36 frame(_frame), height(_height), label(_label) { } | 36 frame(_frame), height(_height), label(_label) { } |
37 | 37 |
38 int getDimensions() const { return 2; } | 38 int getDimensions() const { return 2; } |
39 | 39 |
40 long frame; | 40 sv_frame_t frame; |
41 float height; | 41 float height; |
42 QString label; | 42 QString label; |
43 | 43 |
44 QString getLabel() const { return label; } | 44 QString getLabel() const { return label; } |
45 | 45 |
153 | 153 |
154 Point point(*i); | 154 Point point(*i); |
155 command->deletePoint(point); | 155 command->deletePoint(point); |
156 | 156 |
157 switch (column) { | 157 switch (column) { |
158 case 2: point.height = value.toDouble(); break; | 158 case 2: point.height = float(value.toDouble()); break; |
159 case 3: point.label = value.toString(); break; | 159 case 3: point.label = value.toString(); break; |
160 } | 160 } |
161 | 161 |
162 command->addPoint(point); | 162 command->addPoint(point); |
163 return command->finish(); | 163 return command->finish(); |