Mercurial > hg > svcore
comparison data/model/IntervalModel.h @ 1580:c01cbe41aeb5 fix-static-analysis
Use override throughout
author | Chris Cannam |
---|---|
date | Mon, 26 Nov 2018 13:48:45 +0000 |
parents | 48e9f538e6e9 |
children | ad5f892c0c4d |
comparison
equal
deleted
inserted
replaced
1579:232d6ddf257d | 1580:c01cbe41aeb5 |
---|---|
55 * given frame. Consequently this can be very slow (optimised | 55 * given frame. Consequently this can be very slow (optimised |
56 * data structures still to be done!). | 56 * data structures still to be done!). |
57 */ | 57 */ |
58 virtual typename SparseValueModel<PointType>::PointList getPoints(sv_frame_t frame) const; | 58 virtual typename SparseValueModel<PointType>::PointList getPoints(sv_frame_t frame) const; |
59 | 59 |
60 virtual const typename SparseModel<PointType>::PointList &getPoints() const { | 60 const typename SparseModel<PointType>::PointList &getPoints() const override { |
61 return SparseModel<PointType>::getPoints(); | 61 return SparseModel<PointType>::getPoints(); |
62 } | 62 } |
63 | 63 |
64 /** | 64 /** |
65 * TabularModel methods. | 65 * TabularModel methods. |
66 */ | 66 */ |
67 | 67 |
68 virtual QVariant getData(int row, int column, int role) const | 68 QVariant getData(int row, int column, int role) const override |
69 { | 69 { |
70 if (column < 2) { | 70 if (column < 2) { |
71 return SparseValueModel<PointType>::getData | 71 return SparseValueModel<PointType>::getData |
72 (row, column, role); | 72 (row, column, role); |
73 } | 73 } |
84 case 3: return int(i->duration); //!!! could be better presented | 84 case 3: return int(i->duration); //!!! could be better presented |
85 default: return QVariant(); | 85 default: return QVariant(); |
86 } | 86 } |
87 } | 87 } |
88 | 88 |
89 virtual Command *getSetDataCommand(int row, int column, const QVariant &value, int role) | 89 Command *getSetDataCommand(int row, int column, const QVariant &value, int role) override |
90 { | 90 { |
91 typedef IntervalModel<PointType> I; | 91 typedef IntervalModel<PointType> I; |
92 | 92 |
93 if (column < 2) { | 93 if (column < 2) { |
94 return SparseValueModel<PointType>::getSetDataCommand | 94 return SparseValueModel<PointType>::getSetDataCommand |
113 | 113 |
114 command->addPoint(point); | 114 command->addPoint(point); |
115 return command->finish(); | 115 return command->finish(); |
116 } | 116 } |
117 | 117 |
118 virtual bool isColumnTimeValue(int column) const | 118 bool isColumnTimeValue(int column) const override |
119 { | 119 { |
120 // NB duration is not a "time value" -- that's for columns | 120 // NB duration is not a "time value" -- that's for columns |
121 // whose sort ordering is exactly that of the frame time | 121 // whose sort ordering is exactly that of the frame time |
122 return (column < 2); | 122 return (column < 2); |
123 } | 123 } |